-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Transcoding fails abruptly during stream #440
Comments
Hello! Did you try to increase timeout settings in nginx?
Tell me if that helps. |
Hi, thank you for your reply! Yes, I have done that. This is my current configuration:
On songs that are longer than 8 minutes I usually start having issues. The logs show behavior in exactly the same way as I've described above. |
Can you by chance try without proxy and tell how it behaves? |
I have run into the same behaviour and I've traced it to the way Firefox seems to deal with OGG- (and maybe other) streams of unknown length. My test track has a length of 10:40. I used the request the webplayer creates on playing a file and pasted it standalone into a tab:
Firefox starts loading and playing the file but during playing occasionally "extends" the displayed overall time, starting with about two minutes and increasing in about 60 seconds intervals. I dumped the HTTP2 stream using Wireshark and found out, that despite the entire content being transmitted almost immediately, Firefox kept the HTTP2 connection to my reverse proxy open and used the HTTP2 feature "PING" to keep the state alive in roughly 60 second intervals. Those correlated with the displayed playtime being extended and sure enough, when I force a timeout of about 45 seconds in the mod_proxy setttings or otherwise kill the state, e.g. by resetting the state table in my router, firefox stops playing at whatever time mark it has reached. I tried reproducing that behaviour without a reverse proxy and no TLS in between and sure enough, it is reproducable, but of course without the HTTP2 keep alive magic. Started playing the same, long file in Firefox and paused after about 2:30. Displayed playtime at that point was 3:19 and it had extended once from about 2:51. Let the whole thing sit for ten minutes and clicked play. Playtime extended a few times and then playback stopped at 9:10 of 9:12 displayed playtime. At some point in between during the paused state, the server sends a 200 OK out of the blue, and a while later then ACKs a keep alive from the client for the very same connection that has been reset.... it's all a bit weird and I honestly don't understand that part. EDIT: Note to self: Think about TCP timeouts in the 1:1 NAT part of Docker, maybe. |
This reminds me the local transcode cache discussed in #588 Not sure how other servers do, maybe this would solve all this. The idea would be to start to transcode in a local file, and fake the returned range using some estimated size based on bitrate/length (+ some padding with 0). The client can get/hit the ranges it needs using the cached file, like the current flow without transcoding. Edit: The major drawback would be for very large files (like several hours of a mix), as it would take a long time before being able to serve the bytes if the user scrolls too far ahead too quickly. |
Background
Client: Symfonium 9.1.0
LMS 3.51.0 (Docker)
Running behind NGINX with this config:
Issue Description
Media usually plays fine. However, I've noticed that sometimes they abruptly stop - this phenomenon is especially prevalent in longer tracks.
Today I ran a test and found this:
On NGINX side I'm getting these logs. The timestamps don't really match up so maybe this is irrelevant, but thought to add it anyway for context.
The text was updated successfully, but these errors were encountered: