[Bug]: stream failed: undefined when playing from the web app #1803

Closed
opened 2026-04-24 23:58:35 +02:00 by adam · 24 comments
Owner

Originally created by @eudes on GitHub (Mar 7, 2024).

Describe the issue

In the web app, when playing a lot of my new library items (but no all) I get a pillbox alert saying "stream failed: undefined".
Playing the same item from the Android app works fine.

Attached console and HAR logs.
This is the server log:

[2024-03-07 21:33:46.442] INFO: [STREAM] START STREAM - Num Segments: 9618
[2024-03-07 21:33:46.444] INFO: [STREAM] Starting Stream at startTime 4:07:27.0 (User startTime 4:07:57.0) and Segment #2474
[2024-03-07 21:33:46.446] INFO: [INFO] FFMPEG transcoding started with command: ffmpeg -seek_timestamp 1 -f concat -safe 0 -ss 14847.2s -noaccurate_seek -i /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/files.txt -y -loglevel error -map 0:a -c:a copy -f hls -copyts -avoid_negative_ts make_non_negative -max_delay 5000000 -max_muxing_queue_size 2048 -hls_time 6 -hls_segment_type mpegts -start_number 2474 -hls_playlist_type vod -hls_list_size 0 -hls_allow_cache 0 -hls_segment_filename /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/output-%d.ts /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/final-output.m3u8
[2024-03-07 21:33:46.447] INFO:
[2024-03-07 21:33:46.629] INFO: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7c6a78525200] Chapter 1 not found in file
[2024-03-07 21:33:46.633] INFO: [adts @ 0x7c6a736fe400] Scalable configurations are not allowed in ADTS
[2024-03-07 21:33:46.634] INFO: [out#0/hls @ 0x7c6a74107500] Could not write header (incorrect codec parameters ?): Invalid data found when processing input
[2024-03-07 21:33:46.634] INFO: Error opening output file /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/final-output.m3u8.
[2024-03-07 21:33:46.634] INFO: Error opening output files: Invalid data found when processing input
[2024-03-07 21:33:46.638] INFO:
[2024-03-07 21:33:46.638] ERROR: Ffmpeg Err "ffmpeg exited with code 183: Error opening output file /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/final-output.m3u8.
Error opening output files: Invalid data found when processing input
" (Stream.js:342)
[2024-03-07 21:33:46.639] INFO: Closing Stream 2afd2af8-449e-4ba5-912f-0d9b17c30fda
[2024-03-07 21:33:46.640] INFO: Deleted session data /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda
[2024-03-07 21:33:47.532] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56)
[2024-03-07 21:33:47.610] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56)
[2024-03-07 21:33:47.630] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56)
[2024-03-07 21:33:47.650] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56)
[2024-03-07 21:33:47.666] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56)
[2024-03-07 21:33:47.683] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56)
[2024-03-07 21:33:47.699] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56)

console-export-2024-3-7_22-28-26.txt
audiobookshelf.media.lo_Archive [24-03-07 22-28-41].zip

Steps to reproduce the issue

  1. Open the web app
  2. Stream an audiobook

Audiobookshelf version

2.8.0

How are you running audiobookshelf?

Docker

Originally created by @eudes on GitHub (Mar 7, 2024). ### Describe the issue In the web app, when playing a lot of my new library items (but no all) I get a pillbox alert saying "stream failed: undefined". Playing the same item from the Android app works fine. Attached console and HAR logs. This is the server log: ``` [2024-03-07 21:33:46.442] INFO: [STREAM] START STREAM - Num Segments: 9618 [2024-03-07 21:33:46.444] INFO: [STREAM] Starting Stream at startTime 4:07:27.0 (User startTime 4:07:57.0) and Segment #2474 [2024-03-07 21:33:46.446] INFO: [INFO] FFMPEG transcoding started with command: ffmpeg -seek_timestamp 1 -f concat -safe 0 -ss 14847.2s -noaccurate_seek -i /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/files.txt -y -loglevel error -map 0:a -c:a copy -f hls -copyts -avoid_negative_ts make_non_negative -max_delay 5000000 -max_muxing_queue_size 2048 -hls_time 6 -hls_segment_type mpegts -start_number 2474 -hls_playlist_type vod -hls_list_size 0 -hls_allow_cache 0 -hls_segment_filename /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/output-%d.ts /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/final-output.m3u8 [2024-03-07 21:33:46.447] INFO: [2024-03-07 21:33:46.629] INFO: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7c6a78525200] Chapter 1 not found in file [2024-03-07 21:33:46.633] INFO: [adts @ 0x7c6a736fe400] Scalable configurations are not allowed in ADTS [2024-03-07 21:33:46.634] INFO: [out#0/hls @ 0x7c6a74107500] Could not write header (incorrect codec parameters ?): Invalid data found when processing input [2024-03-07 21:33:46.634] INFO: Error opening output file /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/final-output.m3u8. [2024-03-07 21:33:46.634] INFO: Error opening output files: Invalid data found when processing input [2024-03-07 21:33:46.638] INFO: [2024-03-07 21:33:46.638] ERROR: Ffmpeg Err "ffmpeg exited with code 183: Error opening output file /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda/final-output.m3u8. Error opening output files: Invalid data found when processing input " (Stream.js:342) [2024-03-07 21:33:46.639] INFO: Closing Stream 2afd2af8-449e-4ba5-912f-0d9b17c30fda [2024-03-07 21:33:46.640] INFO: Deleted session data /metadata/streams/2afd2af8-449e-4ba5-912f-0d9b17c30fda [2024-03-07 21:33:47.532] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56) [2024-03-07 21:33:47.610] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56) [2024-03-07 21:33:47.630] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56) [2024-03-07 21:33:47.650] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56) [2024-03-07 21:33:47.666] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56) [2024-03-07 21:33:47.683] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56) [2024-03-07 21:33:47.699] ERROR: [HlsRouter] Stream "2afd2af8-449e-4ba5-912f-0d9b17c30fda" does not exist (HlsRouter.js:56) ``` [console-export-2024-3-7_22-28-26.txt](https://github.com/advplyr/audiobookshelf/files/14530360/console-export-2024-3-7_22-28-26.txt) [audiobookshelf.media.lo_Archive [24-03-07 22-28-41].zip](https://github.com/advplyr/audiobookshelf/files/14530363/audiobookshelf.media.lo_Archive.24-03-07.22-28-41.zip) ### Steps to reproduce the issue 1. Open the web app 2. Stream an audiobook ### Audiobookshelf version 2.8.0 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:58:35 +02:00
adam closed this issue 2026-04-24 23:58:35 +02:00
Author
Owner

@datenzar commented on GitHub (Mar 11, 2024):

Same issue here. I observe it in particular with m4b audiobooks that I converted from Audible. Some relevant codec details (hope that helps):

dio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 5 min 3 s
Duration_LastFrame                       : -2 ms
Bit rate mode                            : Constant
Bit rate                                 : 126 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 4.54 MiB (98%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 1
Encoded date                             : 2019-06-04 03:42:50 UTC
Tagged date                              : 2019-06-04 03:42:50 UTC
Menus                                    : 3
@datenzar commented on GitHub (Mar 11, 2024): Same issue here. I observe it in particular with m4b audiobooks that I converted from Audible. Some relevant codec details (hope that helps): ``` dio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 5 min 3 s Duration_LastFrame : -2 ms Bit rate mode : Constant Bit rate : 126 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Stream size : 4.54 MiB (98%) Language : English Default : Yes Alternate group : 1 Encoded date : 2019-06-04 03:42:50 UTC Tagged date : 2019-06-04 03:42:50 UTC Menus : 3 ```
Author
Owner

@advplyr commented on GitHub (Mar 11, 2024):

The error message here needs to be fixed but I think I'll need a sample audio file to test with if you can send one

@advplyr commented on GitHub (Mar 11, 2024): The error message here needs to be fixed but I think I'll need a sample audio file to test with if you can send one
Author
Owner

@datenzar commented on GitHub (Mar 12, 2024):

Hi @advplyr,

thanks for your response! I provided you with a sample to your mail address. Let me know if you need anything else.

@datenzar commented on GitHub (Mar 12, 2024): Hi @advplyr, thanks for your response! I provided you with a sample to your mail address. Let me know if you need anything else.
Author
Owner

@eudes commented on GitHub (Mar 12, 2024):

I've also provided a sample via email.

General
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/mp41)
File size                                : 874 MiB
Duration                                 : 16 h 1 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 127 kb/s
Track name/Position                      : 1
Cover                                    : Yes
IsTruncated                              : Yes

Audio
ID                                       : 1
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 16 h 1 min
Duration_LastFrame                       : -2 ms
Bit rate mode                            : Variable
Bit rate                                 : 126 kb/s
Maximum bit rate                         : 133 kb/s / 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 864 MiB (99%)
Language                                 : English
Default                                  : Yes
Alternate group                          : 1
Menus                                    : 3
@eudes commented on GitHub (Mar 12, 2024): I've also provided a sample via email. ``` General Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/mp41) File size : 874 MiB Duration : 16 h 1 min Overall bit rate mode : Variable Overall bit rate : 127 kb/s Track name/Position : 1 Cover : Yes IsTruncated : Yes Audio ID : 1 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 16 h 1 min Duration_LastFrame : -2 ms Bit rate mode : Variable Bit rate : 126 kb/s Maximum bit rate : 133 kb/s / 128 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 44.1 kHz Frame rate : 43.066 FPS (1024 SPF) Compression mode : Lossy Stream size : 864 MiB (99%) Language : English Default : Yes Alternate group : 1 Menus : 3 ````
Author
Owner

@Poizunlol commented on GitHub (Mar 12, 2024):

Not sure if this is helpful, I also listen to m4b audiobooks that I converted from Audible.
I exclusive run into this issue when I use Firefox. If I use a Chromium based browser I don't have any issues.

@Poizunlol commented on GitHub (Mar 12, 2024): Not sure if this is helpful, I also listen to m4b audiobooks that I converted from Audible. I exclusive run into this issue when I use Firefox. If I use a Chromium based browser I don't have any issues.
Author
Owner

@datenzar commented on GitHub (Mar 12, 2024):

Hi @Poizunlol,
thanks a lot, your tip was indeed helpful! Switching to another browser solved the issue.

Though it makes me wonder why Firefox cannot play the file...

@datenzar commented on GitHub (Mar 12, 2024): Hi @Poizunlol, thanks a lot, your tip was indeed helpful! Switching to another browser solved the issue. Though it makes me wonder why Firefox cannot play the file...
Author
Owner

@Poizunlol commented on GitHub (Mar 13, 2024):

Hi @Poizunlol, thanks a lot, your tip was indeed helpful! Switching to another browser solved the issue.

Though it makes me wonder why Firefox cannot play the file...

@datenzar I don't know why, it worked previously I seem to remember that this happened after a recent update of Firefox.

@Poizunlol commented on GitHub (Mar 13, 2024): > Hi @Poizunlol, thanks a lot, your tip was indeed helpful! Switching to another browser solved the issue. > > Though it makes me wonder why Firefox cannot play the file... @datenzar I don't know why, it worked previously I seem to remember that this happened after a recent update of Firefox.
Author
Owner

@legohero commented on GitHub (Mar 13, 2024):

I had the same issue and it seems like it goes way back to 2021. The solution seems to be to reencode the problematic file. Examples in #1872 and #172 (comment). #1872 comment might be helpful. Tried it myself yesterday and can confirm it works.

@legohero commented on GitHub (Mar 13, 2024): I had the same issue and it seems like it goes way back to 2021. The solution seems to be to reencode the problematic file. Examples in #1872 and [#172 (comment)](https://github.com/advplyr/audiobookshelf/issues/172#issuecomment-968064121). [#1872 comment](https://github.com/advplyr/audiobookshelf/issues/1872#issuecomment-1695932462) might be helpful. Tried it myself yesterday and can confirm it works.
Author
Owner

@advplyr commented on GitHub (Mar 13, 2024):

Ah yeah this is the same issue that keeps coming up specifically with certain audible audiobooks. The transcoding should still work though so I'll look into that. I recommend re-encoding those anyway just so you can direct play the file everywhere you need.

@advplyr commented on GitHub (Mar 13, 2024): Ah yeah this is the same issue that keeps coming up specifically with certain audible audiobooks. The transcoding should still work though so I'll look into that. I recommend re-encoding those anyway just so you can direct play the file everywhere you need.
Author
Owner

@legohero commented on GitHub (Mar 14, 2024):

Indeed, my problem file is also from audible. I appreciate ya @advplyr

@legohero commented on GitHub (Mar 14, 2024): Indeed, my problem file is also from audible. I appreciate ya @advplyr
Author
Owner

@advplyr commented on GitHub (Mar 15, 2024):

Thanks for the sample files. I found the issue with HLS.js that handles streaming and was able to play the bad files after a few second delay. Just to reiterate this is only an issue with firefox that I'm aware of. Chromium browsers can direct play those files still.

This is the series of events that happen:

  1. firefox fails to direct play
  2. the Abs audio player falls back to transcoding
  3. the server fails to transcode the file
  4. the server falls back to forcing AAC codec re-encoding
  5. the Abs audio player starts playing shortly after

That explains the additional delay you will see

@advplyr commented on GitHub (Mar 15, 2024): Thanks for the sample files. I found the issue with HLS.js that handles streaming and was able to play the bad files after a few second delay. Just to reiterate this is only an issue with firefox that I'm aware of. Chromium browsers can direct play those files still. This is the series of events that happen: 1. firefox fails to direct play 2. the Abs audio player falls back to transcoding 3. the server fails to transcode the file 4. the server falls back to forcing AAC codec re-encoding 5. the Abs audio player starts playing shortly after That explains the additional delay you will see
Author
Owner

@advplyr commented on GitHub (Mar 17, 2024):

Fixed in v2.8.1

@advplyr commented on GitHub (Mar 17, 2024): Fixed in [v2.8.1](https://github.com/advplyr/audiobookshelf/releases/tag/v2.8.1)
Author
Owner

@whoopn commented on GitHub (Mar 17, 2024):

This doesn't appear to be fixed in firefox still.

Unraid using Docker, on 2.8.1

`2024-03-16 19:39:11.279

INFO

[STREAM] START STREAM - Num Segments: 691

2024-03-16 19:39:11.296

INFO

[INFO] FFMPEG transcoding started with command: ffmpeg -seek_timestamp 1 -f concat -safe 0 -i /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/files.txt -y -loglevel error -map 0:a -c:a copy -f hls -copyts -avoid_negative_ts make_non_negative -max_delay 5000000 -max_muxing_queue_size 2048 -hls_time 6 -hls_segment_type mpegts -start_number 0 -hls_playlist_type vod -hls_list_size 0 -hls_allow_cache 0 -hls_segment_filename /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/output-%d.ts /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/final-output.m3u8

2024-03-16 19:39:11.297

INFO

2024-03-16 19:39:11.370

WARN

File path does not exist /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/output-0.ts

2024-03-16 19:39:11.463

INFO

[adts @ 0x1526055e0680] Scalable configurations are not allowed in ADTS

2024-03-16 19:39:11.465

INFO

[out#0/hls @ 0x152608b48c00] Could not write header (incorrect codec parameters ?): Invalid data found when processing input

2024-03-16 19:39:11.465

INFO

Error opening output file /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/final-output.m3u8.

2024-03-16 19:39:11.466

INFO

Error opening output files: Invalid data found when processing input

2024-03-16 19:39:11.481

INFO

2024-03-16 19:39:11.482

ERROR

Ffmpeg Err "ffmpeg exited with code 183: Error opening output file /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/final-output.m3u8. Error opening output files: Invalid data found when processing input "

2024-03-16 19:39:11.483

INFO

Closing Stream e2915e19-af34-449f-bab3-2249a1848512

2024-03-16 19:39:11.490

INFO

Deleted session data /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512

2024-03-16 19:39:11.492

DEBUG

[PlaybackSessionManager] Stream closed for session "e2915e19-af34-449f-bab3-2249a1848512" (Device: Windows 10 / Firefox)

2024-03-16 19:39:12.613

ERROR

[HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist

2024-03-16 19:39:14.676

ERROR

[HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist

2024-03-16 19:39:19.489

ERROR

[HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist

2024-03-16 19:39:27.607

ERROR

[HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist

2024-03-16 19:39:35.696

ERROR

[HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist

2024-03-16 19:39:43.801

ERROR

[HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist

2024-03-16 19:39:51.874

ERROR

[HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist

2024-03-16 19:40:00.012

ERROR

[HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist`

@whoopn commented on GitHub (Mar 17, 2024): This doesn't appear to be fixed in firefox still. Unraid using Docker, on 2.8.1 `2024-03-16 19:39:11.279 INFO [STREAM] START STREAM - Num Segments: 691 2024-03-16 19:39:11.296 INFO [INFO] FFMPEG transcoding started with command: ffmpeg -seek_timestamp 1 -f concat -safe 0 -i /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/files.txt -y -loglevel error -map 0:a -c:a copy -f hls -copyts -avoid_negative_ts make_non_negative -max_delay 5000000 -max_muxing_queue_size 2048 -hls_time 6 -hls_segment_type mpegts -start_number 0 -hls_playlist_type vod -hls_list_size 0 -hls_allow_cache 0 -hls_segment_filename /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/output-%d.ts /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/final-output.m3u8 2024-03-16 19:39:11.297 INFO 2024-03-16 19:39:11.370 WARN File path does not exist /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/output-0.ts 2024-03-16 19:39:11.463 INFO [adts @ 0x1526055e0680] Scalable configurations are not allowed in ADTS 2024-03-16 19:39:11.465 INFO [out#0/hls @ 0x152608b48c00] Could not write header (incorrect codec parameters ?): Invalid data found when processing input 2024-03-16 19:39:11.465 INFO Error opening output file /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/final-output.m3u8. 2024-03-16 19:39:11.466 INFO Error opening output files: Invalid data found when processing input 2024-03-16 19:39:11.481 INFO 2024-03-16 19:39:11.482 ERROR Ffmpeg Err "ffmpeg exited with code 183: Error opening output file /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512/final-output.m3u8. Error opening output files: Invalid data found when processing input " 2024-03-16 19:39:11.483 INFO Closing Stream e2915e19-af34-449f-bab3-2249a1848512 2024-03-16 19:39:11.490 INFO Deleted session data /metadata/streams/e2915e19-af34-449f-bab3-2249a1848512 2024-03-16 19:39:11.492 DEBUG [PlaybackSessionManager] Stream closed for session "e2915e19-af34-449f-bab3-2249a1848512" (Device: Windows 10 / Firefox) 2024-03-16 19:39:12.613 ERROR [HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist 2024-03-16 19:39:14.676 ERROR [HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist 2024-03-16 19:39:19.489 ERROR [HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist 2024-03-16 19:39:27.607 ERROR [HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist 2024-03-16 19:39:35.696 ERROR [HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist 2024-03-16 19:39:43.801 ERROR [HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist 2024-03-16 19:39:51.874 ERROR [HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist 2024-03-16 19:40:00.012 ERROR [HlsRouter] Stream "e2915e19-af34-449f-bab3-2249a1848512" does not exist`
Author
Owner

@yaakovfeldman commented on GitHub (Mar 17, 2024):

I am also still getting this error on Firefox with v2.8.1.

Here are the docker logs:

17/03/2024
14:02:54
[2024-03-17 14:02:54.930] INFO: [STREAM] START STREAM - Num Segments: 12233
17/03/2024
14:02:54
[2024-03-17 14:02:54.934] INFO: [STREAM] Starting Stream at startTime 5:09:40.0 (User startTime 5:10:10.0) and Segment #3096
17/03/2024
14:02:55
[2024-03-17 14:02:55.051] INFO: [INFO] FFMPEG transcoding started with command: ffmpeg -seek_timestamp 1 -f concat -safe 0 -ss 18580.5s -noaccurate_seek -i /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/files.txt -y -loglevel error -map 0:a -c:a copy -f hls -copyts -avoid_negative_ts make_non_negative -max_delay 5000000 -max_muxing_queue_size 2048 -hls_time 6 -hls_segment_type mpegts -start_number 3096 -hls_playlist_type vod -hls_list_size 0 -hls_allow_cache 0 -hls_segment_filename /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/output-%d.ts /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/final-output.m3u8
17/03/2024
14:02:55
[2024-03-17 14:02:55.051] INFO: 
17/03/2024
14:02:55
[2024-03-17 14:02:55.302] INFO: [adts @ 0x73ad1f528bc0] Scalable configurations are not allowed in ADTS
17/03/2024
14:02:55
[2024-03-17 14:02:55.302] INFO: [out#0/hls @ 0x73ad1fedf600] Could not write header (incorrect codec parameters ?): Invalid data found when processing input
17/03/2024
14:02:55
[2024-03-17 14:02:55.302] INFO: Error opening output file /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/final-output.m3u8.
17/03/2024
14:02:55
[2024-03-17 14:02:55.302] INFO: Error opening output files: Invalid data found when processing input
17/03/2024
14:02:55
[2024-03-17 14:02:55.312] INFO: 
17/03/2024
14:02:55
[2024-03-17 14:02:55.313] ERROR: Ffmpeg Err "ffmpeg exited with code 183: Error opening output file /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/final-output.m3u8.
17/03/2024
14:02:55
Error opening output files: Invalid data found when processing input
17/03/2024
14:02:55
" (Stream.js:342)
17/03/2024
14:02:55
[2024-03-17 14:02:55.313] INFO: Closing Stream b3aa071e-6460-4273-a377-39ae6cb83947
17/03/2024
14:02:55
[2024-03-17 14:02:55.316] INFO: Deleted session data /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947
17/03/2024
14:02:58
[2024-03-17 14:02:58.096] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56)
17/03/2024
14:02:59
[2024-03-17 14:02:59.746] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56)
17/03/2024
14:03:03
[2024-03-17 14:03:03.435] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56)
17/03/2024
14:03:07
[2024-03-17 14:03:07.882] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56)
17/03/2024
14:03:15
[2024-03-17 14:03:15.936] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56)
17/03/2024
14:03:24
[2024-03-17 14:03:24.008] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56)
17/03/2024
14:03:32
[2024-03-17 14:03:32.320] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56)
17/03/2024
14:03:41
[2024-03-17 14:03:41.218] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56)
17/03/2024
14:03:49
[2024-03-17 14:03:49.399] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56)



@yaakovfeldman commented on GitHub (Mar 17, 2024): I am also still getting this error on Firefox with v2.8.1. Here are the docker logs: ``` 17/03/2024 14:02:54 [2024-03-17 14:02:54.930] INFO: [STREAM] START STREAM - Num Segments: 12233 17/03/2024 14:02:54 [2024-03-17 14:02:54.934] INFO: [STREAM] Starting Stream at startTime 5:09:40.0 (User startTime 5:10:10.0) and Segment #3096 17/03/2024 14:02:55 [2024-03-17 14:02:55.051] INFO: [INFO] FFMPEG transcoding started with command: ffmpeg -seek_timestamp 1 -f concat -safe 0 -ss 18580.5s -noaccurate_seek -i /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/files.txt -y -loglevel error -map 0:a -c:a copy -f hls -copyts -avoid_negative_ts make_non_negative -max_delay 5000000 -max_muxing_queue_size 2048 -hls_time 6 -hls_segment_type mpegts -start_number 3096 -hls_playlist_type vod -hls_list_size 0 -hls_allow_cache 0 -hls_segment_filename /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/output-%d.ts /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/final-output.m3u8 17/03/2024 14:02:55 [2024-03-17 14:02:55.051] INFO: 17/03/2024 14:02:55 [2024-03-17 14:02:55.302] INFO: [adts @ 0x73ad1f528bc0] Scalable configurations are not allowed in ADTS 17/03/2024 14:02:55 [2024-03-17 14:02:55.302] INFO: [out#0/hls @ 0x73ad1fedf600] Could not write header (incorrect codec parameters ?): Invalid data found when processing input 17/03/2024 14:02:55 [2024-03-17 14:02:55.302] INFO: Error opening output file /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/final-output.m3u8. 17/03/2024 14:02:55 [2024-03-17 14:02:55.302] INFO: Error opening output files: Invalid data found when processing input 17/03/2024 14:02:55 [2024-03-17 14:02:55.312] INFO: 17/03/2024 14:02:55 [2024-03-17 14:02:55.313] ERROR: Ffmpeg Err "ffmpeg exited with code 183: Error opening output file /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947/final-output.m3u8. 17/03/2024 14:02:55 Error opening output files: Invalid data found when processing input 17/03/2024 14:02:55 " (Stream.js:342) 17/03/2024 14:02:55 [2024-03-17 14:02:55.313] INFO: Closing Stream b3aa071e-6460-4273-a377-39ae6cb83947 17/03/2024 14:02:55 [2024-03-17 14:02:55.316] INFO: Deleted session data /metadata/streams/b3aa071e-6460-4273-a377-39ae6cb83947 17/03/2024 14:02:58 [2024-03-17 14:02:58.096] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56) 17/03/2024 14:02:59 [2024-03-17 14:02:59.746] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56) 17/03/2024 14:03:03 [2024-03-17 14:03:03.435] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56) 17/03/2024 14:03:07 [2024-03-17 14:03:07.882] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56) 17/03/2024 14:03:15 [2024-03-17 14:03:15.936] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56) 17/03/2024 14:03:24 [2024-03-17 14:03:24.008] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56) 17/03/2024 14:03:32 [2024-03-17 14:03:32.320] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56) 17/03/2024 14:03:41 [2024-03-17 14:03:41.218] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56) 17/03/2024 14:03:49 [2024-03-17 14:03:49.399] ERROR: [HlsRouter] Stream "b3aa071e-6460-4273-a377-39ae6cb83947" does not exist (HlsRouter.js:56) ```
Author
Owner

@yaakovfeldman commented on GitHub (Mar 17, 2024):

I had the same issue and it seems like it goes way back to 2021. The solution seems to be to reencode the problematic file. Examples in #1872 and #172 (comment). #1872 comment might be helpful. Tried it myself yesterday and can confirm it works.

Thanks that worked. I was slightly surprised the file size changed (from 1,177,747,344 bytes to 1,177,746,721) if it is just flipping a bit but it worked perfectly. For anyone else finding this https://superuser.com/a/1670248 helped install the bento tools.

@yaakovfeldman commented on GitHub (Mar 17, 2024): > I had the same issue and it seems like it goes way back to 2021. The solution seems to be to reencode the problematic file. Examples in #1872 and [#172 (comment)](https://github.com/advplyr/audiobookshelf/issues/172#issuecomment-968064121). [#1872 comment](https://github.com/advplyr/audiobookshelf/issues/1872#issuecomment-1695932462) might be helpful. Tried it myself yesterday and can confirm it works. Thanks that worked. I was slightly surprised the file size changed (from 1,177,747,344 bytes to 1,177,746,721) if it is just flipping a bit but it worked perfectly. For anyone else finding this https://superuser.com/a/1670248 helped install the bento tools.
Author
Owner

@whoopn commented on GitHub (Mar 17, 2024):

I had the same issue and it seems like it goes way back to 2021. The solution seems to be to reencode the problematic file. Examples in #1872 and #172 (comment). #1872 comment might be helpful. Tried it myself yesterday and can confirm it works.

Thanks that worked. I was slightly surprised the file size changed (from 1,177,747,344 bytes to 1,177,746,721) if it is just flipping a bit but it worked perfectly. For anyone else finding this https://superuser.com/a/1670248 helped install the bento tools.

While that is a good workaround it’s still a bug no?

Chromium based browsers have zero issues with any file. And WebKit based browsers (iOS) have zero issues. So the question I have is if it’s Firefox and not Audiobookshelf.

@whoopn commented on GitHub (Mar 17, 2024): > > I had the same issue and it seems like it goes way back to 2021. The solution seems to be to reencode the problematic file. Examples in #1872 and [#172 (comment)](https://github.com/advplyr/audiobookshelf/issues/172#issuecomment-968064121). [#1872 comment](https://github.com/advplyr/audiobookshelf/issues/1872#issuecomment-1695932462) might be helpful. Tried it myself yesterday and can confirm it works. > > Thanks that worked. I was slightly surprised the file size changed (from 1,177,747,344 bytes to 1,177,746,721) if it is just flipping a bit but it worked perfectly. For anyone else finding this https://superuser.com/a/1670248 helped install the bento tools. While that is a good workaround it’s still a bug no? Chromium based browsers have zero issues with any file. And WebKit based browsers (iOS) have zero issues. So the question I have is if it’s Firefox and not Audiobookshelf.
Author
Owner

@advplyr commented on GitHub (Mar 18, 2024):

I'm not able to reproduce the issue anymore but from your logs I can see why it is still not working for you.

You are getting a different ffmpeg error then we typically get from that issue.

In the code snippet below we are specifically checking for an ffmpeg error "ffmpeg exited with code 1:" and some other criteria before we switch to forcing an AAC encode.

https://github.com/advplyr/audiobookshelf/blob/8e5b7504aead8972d26755a4ee9f4b6420527576/server/objects/Stream.js#L335-L355

You can see this is a hacky solution to try to workaround these (what I believe to be) poorly encoded audio files. As far as I know there is no way to detect beforehand if an m4b audio file has that issue so we have to let it fail first.

We can continue putting in hacky workarounds since this is a common issue. Hopefully someone can come up with a better way to handle this.

I believe this post from 4 years ago identifies the problem. https://rentry.co/n4ost
However, Android can direct play these files now. I think it's only Firefox that doesn't play them.

@advplyr commented on GitHub (Mar 18, 2024): I'm not able to reproduce the issue anymore but from your logs I can see why it is still not working for you. You are getting a different ffmpeg error then we typically get from that issue. In the code snippet below we are specifically checking for an ffmpeg error "ffmpeg exited with code 1:" and some other criteria before we switch to forcing an AAC encode. https://github.com/advplyr/audiobookshelf/blob/8e5b7504aead8972d26755a4ee9f4b6420527576/server/objects/Stream.js#L335-L355 You can see this is a hacky solution to try to workaround these (what I believe to be) poorly encoded audio files. As far as I know there is no way to detect beforehand if an m4b audio file has that issue so we have to let it fail first. We can continue putting in hacky workarounds since this is a common issue. Hopefully someone can come up with a better way to handle this. I believe this post from 4 years ago identifies the problem. https://rentry.co/n4ost However, Android can direct play these files now. I think it's only Firefox that doesn't play them.
Author
Owner

@whoopn commented on GitHub (Mar 18, 2024):

I'm not able to reproduce the issue anymore but from your logs I can see why it is still not working for you.

You are getting a different ffmpeg error then we typically get from that issue.

In the code snippet below we are specifically checking for an ffmpeg error "ffmpeg exited with code 1:" and some other criteria before we switch to forcing an AAC encode.

https://github.com/advplyr/audiobookshelf/blob/8e5b7504aead8972d26755a4ee9f4b6420527576/server/objects/Stream.js#L335-L355

You can see this is a hacky solution to try to workaround these (what I believe to be) poorly encoded audio files. As far as I know there is no way to detect beforehand if an m4b audio file has that issue so we have to let it fail first.

We can continue putting in hacky workarounds since this is a common issue. Hopefully someone can come up with a better way to handle this.

I believe this post from 4 years ago identifies the problem. https://rentry.co/n4ost However, Android can direct play these files now. I think it's only Firefox that doesn't play them.

That is interesting and I can appreciate the not great situation that puts you in. I’ll be honest I’m not re-encoding anything. Here is why: it works on iOS, chrome, edge, safari (on Mac) but only breaks on Firefox.

IMO Firefox needs to be able to handle the situation as all the other browsers do. I think a Mozilla bug is necessary. I realize ffmpeg is involved but I don’t see it as the culprit.

@whoopn commented on GitHub (Mar 18, 2024): > I'm not able to reproduce the issue anymore but from your logs I can see why it is still not working for you. > > You are getting a different ffmpeg error then we typically get from that issue. > > In the code snippet below we are specifically checking for an ffmpeg error "ffmpeg exited with code 1:" and some other criteria before we switch to forcing an AAC encode. > > https://github.com/advplyr/audiobookshelf/blob/8e5b7504aead8972d26755a4ee9f4b6420527576/server/objects/Stream.js#L335-L355 > > You can see this is a hacky solution to try to workaround these (what I believe to be) poorly encoded audio files. As far as I know there is no way to detect beforehand if an m4b audio file has that issue so we have to let it fail first. > > We can continue putting in hacky workarounds since this is a common issue. Hopefully someone can come up with a better way to handle this. > > I believe this post from 4 years ago identifies the problem. https://rentry.co/n4ost However, Android can direct play these files now. I think it's only Firefox that doesn't play them. That is interesting and I can appreciate the not great situation that puts you in. I’ll be honest I’m not re-encoding anything. Here is why: it works on iOS, chrome, edge, safari (on Mac) but only breaks on Firefox. IMO Firefox needs to be able to handle the situation as all the other browsers do. I think a Mozilla bug is necessary. I realize ffmpeg is involved but I don’t see it as the culprit.
Author
Owner

@advplyr commented on GitHub (Mar 18, 2024):

When you press play in Abs the very first thing it tries to do is play the audio file directly with the browser audio player. If that fails for any reason the next thing we do is try to transcode it with ffmpeg. So ffmpeg is only involved if playing the file directly fails.

If you open up a bug report with Mozilla please share it here so we can follow it.

To re-encode the audio file you don't need to follow that method linked above or download anything at all. It is one line in ffmpeg that you could enter in the command line. Ffmpeg is already installed in the docker container.

It doesn't involve anything complicated to re-encode the files, I just wanted to clarify that for anyone else following along.

@advplyr commented on GitHub (Mar 18, 2024): When you press play in Abs the very first thing it tries to do is play the audio file directly with the browser audio player. If that fails for any reason the next thing we do is try to transcode it with ffmpeg. So ffmpeg is only involved if playing the file directly fails. If you open up a bug report with Mozilla please share it here so we can follow it. To re-encode the audio file you don't need to follow that method linked above or download anything at all. It is one line in ffmpeg that you could enter in the command line. Ffmpeg is already installed in the docker container. It doesn't involve anything complicated to re-encode the files, I just wanted to clarify that for anyone else following along.
Author
Owner

@whoopn commented on GitHub (Mar 18, 2024):

When you press play in Abs the very first thing it tries to do is play the audio file directly with the browser audio player. If that fails for any reason the next thing we do is try to transcode it with ffmpeg. So ffmpeg is only involved if playing the file directly fails.

If you open up a bug report with Mozilla please share it here so we can follow it.

To re-encode the audio file you don't need to follow that method linked above or download anything at all. It is one line in ffmpeg that you could enter in the command line. Ffmpeg is already installed in the docker container.

It doesn't involve anything complicated to re-encode the files, I just wanted to clarify that for anyone else following along.

Understood.

I am a mere user and not sure I could furnish the information Mozilla needs to properly troubleshoot the issue.

I do want to say Audiobookshelf is amazing and I’m really really impressed with its capabilities. For me, the easiest thing to do is not use Firefox.

@whoopn commented on GitHub (Mar 18, 2024): > When you press play in Abs the very first thing it tries to do is play the audio file directly with the browser audio player. If that fails for any reason the next thing we do is try to transcode it with ffmpeg. So ffmpeg is only involved if playing the file directly fails. > > If you open up a bug report with Mozilla please share it here so we can follow it. > > To re-encode the audio file you don't need to follow that method linked above or download anything at all. It is one line in ffmpeg that you could enter in the command line. Ffmpeg is already installed in the docker container. > > It doesn't involve anything complicated to re-encode the files, I just wanted to clarify that for anyone else following along. Understood. I am a mere user and not sure I could furnish the information Mozilla needs to properly troubleshoot the issue. I do want to say Audiobookshelf is amazing and I’m really really impressed with its capabilities. For me, the easiest thing to do is not use Firefox.
Author
Owner

@fayeinmay commented on GitHub (Apr 2, 2024):

Just adding my 2 cents here by saying that I've been using ABS and Firefox for months now and I could play my converted m4b audiobooks just fine, but it has indeed stopped working on the same files recently. I cannot say if it is due to a Firefox or ABS update though.

@fayeinmay commented on GitHub (Apr 2, 2024): Just adding my 2 cents here by saying that I've been using ABS and Firefox for months now and I could play my converted m4b audiobooks just fine, but it has indeed stopped working on the same files recently. I cannot say if it is due to a Firefox or ABS update though.
Author
Owner

@advplyr commented on GitHub (Apr 15, 2024):

It seems like ffmpeg changed their error code to 183 for those files and the fallback was only catching error code 1. This will be updated in the next release.

@advplyr commented on GitHub (Apr 15, 2024): It seems like ffmpeg changed their error code to 183 for those files and the fallback was only catching error code 1. This will be updated in the next release.
Author
Owner

@fayeinmay commented on GitHub (Apr 22, 2024):

It seems like ffmpeg changed their error code to 183 for those files and the fallback was only catching error code 1. This will be updated in the next release.

Works fine again with the 2.9.0 release! (Obviously, it does take a while to load because it needs to re-encode first I think, but that's intended.)

@fayeinmay commented on GitHub (Apr 22, 2024): > It seems like ffmpeg changed their error code to 183 for those files and the fallback was only catching error code 1. This will be updated in the next release. Works fine again with the 2.9.0 release! (Obviously, it does take a while to load because it needs to re-encode first I think, but that's intended.)
Author
Owner

@advplyr commented on GitHub (Apr 22, 2024):

Updated in v2.9.0

@advplyr commented on GitHub (Apr 22, 2024): Updated in [v2.9.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.9.0)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1803