Originally created by @JakobTischler on GitHub (Nov 18, 2022).
I have one specific .m4b file that doesn't play when it's downloaded locally, but does play when it's streaming. The error I get is Playback Failed: Source error on local file. It is a rather large file (2.04 GiB), which might possibly play into cache or buffer issues (?). Other than its size, it has the same characteristics of all my other .m4b files (encoding, tagging etc.).
The file should play no matter if streaming or downloaded
Actual behaviour
If downloaded, when trying to play the file, I get the error Playback Failed: Source error.
Additionally, unlike other local files, it doesn't have the "Manage local files" entry in the context many, only "View Details". The file is there though, and it's absolutely identical to the file on the server (comparing size and MediaInfo). It can be found and deleted via the main "Local Media" sub-menu, though.
Environment data
Audiobookshelf Version:
Android App?
iOS App?
Android Issue
Android version: 13
Device model: Google Pixel 7
Stock or customized system: Stock
Originally created by @JakobTischler on GitHub (Nov 18, 2022).
I have one specific .m4b file that doesn't play when it's downloaded locally, but does play when it's streaming. The error I get is `Playback Failed: Source error on local file`. It is a rather large file (2.04 GiB), which might possibly play into cache or buffer issues (?). Other than its size, it has the same characteristics of all my other .m4b files (encoding, tagging etc.).
[MediaInfo dance-with-dragons.txt](https://github.com/advplyr/audiobookshelf-app/files/10041172/dance-with-dragons.txt)
### Steps to reproduce
1. Download file locally
2. Try to play → Error
3. Delete local file
4. Play (Streaming) → Success
### Expected behaviour
- The file should play no matter if streaming or downloaded
### Actual behaviour
- If downloaded, when trying to play the file, I get the error `Playback Failed: Source error`.
- 
- Additionally, unlike other local files, it doesn't have the "Manage local files" entry in the context many, only "View Details". The file is there though, and it's absolutely identical to the file on the server (comparing size and MediaInfo). It can be found and deleted via the main "Local Media" sub-menu, though.
### Environment data
Audiobookshelf Version:
- [x] Android App?
- [ ] iOS App?
#### Android Issue
* Android version: 13
* Device model: Google Pixel 7
* Stock or customized system: Stock
adam
added the bug label 2026-04-24 23:17:16 +02:00
When you stream the book can you open the audio player fullscreen to see if it says "Direct" or "Transcode" at the top.
Normally when this error has been reported there is something wrong with the source file and re-encoding the audio file fixes it. That is why I'm wondering if the stream is failing to direct play and falling back to transcoding.
@advplyr commented on GitHub (Nov 18, 2022):
When you stream the book can you open the audio player fullscreen to see if it says "Direct" or "Transcode" at the top.
Normally when this error has been reported there is something wrong with the source file and re-encoding the audio file fixes it. That is why I'm wondering if the stream is failing to direct play and falling back to transcoding.
@JakobTischler commented on GitHub (Nov 18, 2022):
It does indeed say transcode. Can you elaborate (maybe based on the MediaInfo) what might be the cause? Like I said in my initial post, all my files are encoded the same way (using m4b-tool merge).
@JakobTischler commented on GitHub (Nov 18, 2022):
It does indeed say _transcode_. Can you elaborate (maybe based on the MediaInfo) what might be the cause? Like I said in my initial post, all my files are encoded the same way (using m4b-tool merge).
I don't know what the cause could be or how to troubleshoot it. You could see if the web browser is able to direct play it, for that you would need to watch the server logs with debug logs on.
There isn't anything we can do if the media player isn't able to play the file. You could try playing it with another mobile app to see if they are able to since they are all using the same media player.
@advplyr commented on GitHub (Nov 19, 2022):
I don't know what the cause could be or how to troubleshoot it. You could see if the web browser is able to direct play it, for that you would need to watch the server logs with debug logs on.
There isn't anything we can do if the media player isn't able to play the file. You could try playing it with another mobile app to see if they are able to since they are all using the same media player.
@JakobTischler commented on GitHub (Nov 19, 2022):
Alright so I did a few tests to try to get to the bottom of this.
Other apps also don't play the file (Voice, Chronicle via Plex)
The web interface does play it. The log didn't really give me any info other than the sync state: [PlaybackSessionManager] syncSession "play_qq4fb9ue05vuz1q10q" | Total Time Listened: 16
96 kbit @ 22050 Hz, file size ca. 2.10 GB → Stream: Direct; Local: Plays
64 kbit @ 22050 Hz, file size ca. 1.37 GB → Stream: Direct; Local: Plays
Now this might be a faulty correlation, but the sample rate does seem to make the difference, at least in this case. I need to check if I have other 44100 Hz files that don't play.
@JakobTischler commented on GitHub (Nov 19, 2022):
Alright so I did a few tests to try to get to the bottom of this.
1. Other apps also don't play the file (Voice, Chronicle via Plex)
2. The web interface does play it. The log didn't really give me any info other than the sync state: `[PlaybackSessionManager] syncSession "play_qq4fb9ue05vuz1q10q" | Total Time Listened: 16`
3. I tried different re-encodings (all mp4 as .m4b):
1. 96 kbit @ 44100 Hz, file size ca. 2.05 GB (Same settings as existing file) → Stream: Transcode; Local: Playback error
2. 64 kbit @ 44100 Hz, file size ca. 1.38 GB → Stream: Transcode; Local: Playback error
3. 96 kbit @ 22050 Hz, file size ca. 2.10 GB → Stream: **Direct**; Local: **Plays**
4. 64 kbit @ 22050 Hz, file size ca. 1.37 GB → Stream: Direct; Local: Plays
Now this might be a faulty correlation, but the sample rate does seem to make the difference, at least in this case. I need to check if I have other 44100 Hz files that don't play.
I don't know enough about audio encoding to help out with that.
If there is an issue with the Android media player then that would be something to report here
My guess is the server web app is also transcoding it. As far as I can tell this isn't a bug with the mobile app
@advplyr commented on GitHub (Nov 19, 2022):
I don't know enough about audio encoding to help out with that.
If there is an issue with the Android media player then that would be something to report [here](https://github.com/google/ExoPlayer)
My guess is the server web app is also transcoding it. As far as I can tell this isn't a bug with the mobile app
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @JakobTischler on GitHub (Nov 18, 2022).
I have one specific .m4b file that doesn't play when it's downloaded locally, but does play when it's streaming. The error I get is
Playback Failed: Source error on local file. It is a rather large file (2.04 GiB), which might possibly play into cache or buffer issues (?). Other than its size, it has the same characteristics of all my other .m4b files (encoding, tagging etc.).MediaInfo dance-with-dragons.txt
Steps to reproduce
Expected behaviour
Actual behaviour
Playback Failed: Source error.Environment data
Audiobookshelf Version:
Android Issue
@advplyr commented on GitHub (Nov 18, 2022):
When you stream the book can you open the audio player fullscreen to see if it says "Direct" or "Transcode" at the top.
Normally when this error has been reported there is something wrong with the source file and re-encoding the audio file fixes it. That is why I'm wondering if the stream is failing to direct play and falling back to transcoding.
@JakobTischler commented on GitHub (Nov 18, 2022):
It does indeed say transcode. Can you elaborate (maybe based on the MediaInfo) what might be the cause? Like I said in my initial post, all my files are encoded the same way (using m4b-tool merge).
@advplyr commented on GitHub (Nov 19, 2022):
I don't know what the cause could be or how to troubleshoot it. You could see if the web browser is able to direct play it, for that you would need to watch the server logs with debug logs on.
There isn't anything we can do if the media player isn't able to play the file. You could try playing it with another mobile app to see if they are able to since they are all using the same media player.
@JakobTischler commented on GitHub (Nov 19, 2022):
Alright so I did a few tests to try to get to the bottom of this.
[PlaybackSessionManager] syncSession "play_qq4fb9ue05vuz1q10q" | Total Time Listened: 16Now this might be a faulty correlation, but the sample rate does seem to make the difference, at least in this case. I need to check if I have other 44100 Hz files that don't play.
@advplyr commented on GitHub (Nov 19, 2022):
I don't know enough about audio encoding to help out with that.
If there is an issue with the Android media player then that would be something to report here
My guess is the server web app is also transcoding it. As far as I can tell this isn't a bug with the mobile app
@JakobTischler commented on GitHub (Nov 20, 2022):
I agree. Thanks for the help, though.