Bug: Web Player: Attempted Stream of nonexistent file results in unclosable player that keeps trying the file. #22

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

Originally created by @Budlyte on GitHub (Sep 17, 2021).

If a user attempts to play a file that has been removed/renamed but the scanner hasn't picked it up, then the player just keeps hitting the server for the file.

I suppose the player could be closed by attempting to play another book and then stopping, but I didn't think to try it until after.

[2021-09-17T20:38:56.208Z] INFO: Stream Opened for client root for audiobook The Empire's Corps with streamId ktotr7qw
[2021-09-17T20:38:56.217Z] INFO: [INFO] FFMPEG transcoding started with command: ffmpeg -f concat -safe 0 -i /metadata/ktotr7qw/files.txt -y -loglevel error -map 0:a -c:a copy -f hls -copyts -avoid_negative_ts disabled -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/ktotr7qw/output-%d.ts /metadata/ktotr7qw/final-output.m3u8

[2021-09-17T20:38:56.217Z] INFO:
[2021-09-17T20:38:56.228Z] INFO: [concat @ 0x56357479b140] Impossible to open '/audiobooks/Christopher Nuttall/The Empire's Corps/The Empire's Corps - Book 10 - Never Surrender/The Empire's Corps - Book 10 - Never Surrender 2.mp3'
[2021-09-17T20:38:56.228Z] INFO: /metadata/ktotr7qw/files.txt: No such file or directory
[2021-09-17T20:38:56.229Z] INFO:
[2021-09-17T20:38:56.230Z] ERROR: Ffmpeg Err ffmpeg exited with code 1: /metadata/ktotr7qw/files.txt: No such file or directory

[2021-09-17T20:38:58.219Z] WARN: No Segments
[2021-09-17T20:39:00.220Z] WARN: No Segments
[2021-09-17T20:39:02.222Z] WARN: No Segments
[2021-09-17T20:39:04.223Z] WARN: No Segments
[2021-09-17T20:39:06.226Z] WARN: No Segments

Originally created by @Budlyte on GitHub (Sep 17, 2021). If a user attempts to play a file that has been removed/renamed but the scanner hasn't picked it up, then the player just keeps hitting the server for the file. I suppose the player could be closed by attempting to play another book and then stopping, but I didn't think to try it until after. [2021-09-17T20:38:56.208Z] INFO: Stream Opened for client root for audiobook The Empire's Corps with streamId ktotr7qw [2021-09-17T20:38:56.217Z] INFO: [INFO] FFMPEG transcoding started with command: ffmpeg -f concat -safe 0 -i /metadata/ktotr7qw/files.txt -y -loglevel error -map 0:a -c:a copy -f hls -copyts -avoid_negative_ts disabled -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/ktotr7qw/output-%d.ts /metadata/ktotr7qw/final-output.m3u8 [2021-09-17T20:38:56.217Z] INFO: [2021-09-17T20:38:56.228Z] INFO: [concat @ 0x56357479b140] Impossible to open '/audiobooks/Christopher Nuttall/The Empire's Corps/The Empire's Corps - Book 10 - Never Surrender/The Empire's Corps - Book 10 - Never Surrender 2.mp3' [2021-09-17T20:38:56.228Z] INFO: /metadata/ktotr7qw/files.txt: No such file or directory [2021-09-17T20:38:56.229Z] INFO: [2021-09-17T20:38:56.230Z] ERROR: Ffmpeg Err ffmpeg exited with code 1: /metadata/ktotr7qw/files.txt: No such file or directory [2021-09-17T20:38:58.219Z] WARN: No Segments [2021-09-17T20:39:00.220Z] WARN: No Segments [2021-09-17T20:39:02.222Z] WARN: No Segments [2021-09-17T20:39:04.223Z] WARN: No Segments [2021-09-17T20:39:06.226Z] WARN: No Segments
adam closed this issue 2026-04-24 22:56:36 +02:00
Author
Owner

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

The player is using HLS.js under the hood, so it should time out eventually.
This file The Empire's Corps - Book 10 - Never Surrender 2.mp3 didn't exist is what you are saying?

The stream needs to be updated to verify each audio file exists before playing. If an audio file is missing the stream is cancelled and (ideally) it notifies the user and tells the scanner to re-scan that directory.

@advplyr commented on GitHub (Sep 17, 2021): The player is using HLS.js under the hood, so it should time out eventually. This file `The Empire's Corps - Book 10 - Never Surrender 2.mp3` didn't exist is what you are saying? The stream needs to be updated to verify each audio file exists before playing. If an audio file is missing the stream is cancelled and (ideally) it notifies the user and tells the scanner to re-scan that directory.
Author
Owner

@Budlyte commented on GitHub (Sep 17, 2021):

I had renamed the file, but had not rescanned yet, so the player kept trying to hit a filename that no longer exists. That same "WARN: No Segments" went on for a few minutes, it filled up my log screen.

As for the player the Play button just kept spinning. What sort of timeout length should be expected?

@Budlyte commented on GitHub (Sep 17, 2021): I had renamed the file, but had not rescanned yet, so the player kept trying to hit a filename that no longer exists. That same "WARN: No Segments" went on for a few minutes, it filled up my log screen. As for the player the Play button just kept spinning. What sort of timeout length should be expected?
Author
Owner

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

The timeout for HLS.js defaults to about a minute. However, I realized the WARN: No Segments was due to the progress loop in the stream not getting closed when Ffmpeg error quits. That part is resolved in v1.1.12, but the other half of this still needs to be done.

@advplyr commented on GitHub (Sep 18, 2021): The timeout for HLS.js defaults to about a minute. However, I realized the `WARN: No Segments` was due to the progress loop in the stream not getting closed when Ffmpeg error quits. That part is resolved in `v1.1.12`, but the other half of this still needs to be done.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#22