Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Budlyte opened this issue Sep 17, 2021 · 3 comments

Comments

@Budlyte
Copy link

Budlyte commented 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

@advplyr
Copy link
Owner

advplyr commented 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.

@Budlyte
Copy link
Author

Budlyte commented 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?

@advplyr
Copy link
Owner

advplyr commented Sep 17, 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 advplyr closed this as completed Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants