Enhancement: Segmented streaming #33

Closed
opened 2026-04-24 22:56:50 +02:00 by adam · 4 comments
Owner

Originally created by @Jdiesel87 on GitHub (Sep 25, 2021).

First off thanks for the great project. A self-hosted audiobook platform is greatly needed and currently underserved. I hope this project takes off and I will be following closely and assisting where I can.

I don't know the correct terminology but I have noticed that when playing m4b files on a remote network through the Android app the entire file is downloaded in advance rather than it caching and beginning playback as soon as enough data is available. Is this a limitation of the mb4 file format? If so are there other options to remux or transcode into a container or format that supports this?

Originally created by @Jdiesel87 on GitHub (Sep 25, 2021). First off thanks for the great project. A self-hosted audiobook platform is greatly needed and currently underserved. I hope this project takes off and I will be following closely and assisting where I can. I don't know the correct terminology but I have noticed that when playing m4b files on a remote network through the Android app the entire file is downloaded in advance rather than it caching and beginning playback as soon as enough data is available. Is this a limitation of the mb4 file format? If so are there other options to remux or transcode into a container or format that supports this?
adam closed this issue 2026-04-24 22:56:50 +02:00
Author
Owner

@advplyr commented on GitHub (Sep 26, 2021):

Thanks for supporting the project. I just added install instructions to the readme for linux users not using docker.

I'm not sure what you mean exactly. There are 2 ways to play an audiobook in the app, from a download or from a stream on the server.
Buffering and caching for streams is handled by the audio player (ExoPlayer). The file isn't getting downloaded, your server transcodes the file into an HLS stream and the audio player requests segments as needed.
What do you mean with the file is downloaded?

@advplyr commented on GitHub (Sep 26, 2021): Thanks for supporting the project. I just added install instructions to the [readme](https://github.com/advplyr/audiobookshelf#linux-amd64-install) for linux users not using docker. I'm not sure what you mean exactly. There are 2 ways to play an audiobook in the app, from a download or from a stream on the server. Buffering and caching for streams is handled by the audio player ([ExoPlayer](https://github.com/google/ExoPlayer)). The file isn't getting downloaded, your server transcodes the file into an HLS stream and the audio player requests segments as needed. What do you mean with the file is downloaded?
Author
Owner

@Jdiesel87 commented on GitHub (Sep 27, 2021):

Hey looks like it is working for me now. When I was first testing the files were failing to start playing on my remote network. I thought the entire m4b was being sent to my android device prior to playback starting and thus the delay. I tried again today and playback started within a few seconds. Maybe it was an issue with my reverse proxy? Does the app use a websocket or any special headers that need to be passed through?

@Jdiesel87 commented on GitHub (Sep 27, 2021): Hey looks like it is working for me now. When I was first testing the files were failing to start playing on my remote network. I thought the entire m4b was being sent to my android device prior to playback starting and thus the delay. I tried again today and playback started within a few seconds. Maybe it was an issue with my reverse proxy? Does the app use a websocket or any special headers that need to be passed through?
Author
Owner

@advplyr commented on GitHub (Sep 27, 2021):

Yes the app and the main web gui relies heavily on a socket.io connection. The login won't be successful until the socket connection is established.

@advplyr commented on GitHub (Sep 27, 2021): Yes the app and the main web gui relies heavily on a socket.io connection. The login won't be successful until the socket connection is established.
Author
Owner

@Jdiesel87 commented on GitHub (Sep 27, 2021):

Thanks. Turns out this is not an issue but a user error

@Jdiesel87 commented on GitHub (Sep 27, 2021): Thanks. Turns out this is not an issue but a user error
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#33