-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Trickplay is being killed too soon #13116
Comments
30 seconds is not a more useful timeout and that is a ridiculously high timeout. If your CPU needs 30 seconds to even extract one single frame you really should not enable this feature because the generation will take years or even lifetime. |
As I understand the code, if any image takes longer than The idle priority means that when the system is busy for longer than 20 seconds, no idle cycles are assigned to trickplay, then the process is killed. This is suboptimal behavior, because it wasted all the completed images and if the process were not killed it would have completed as normal when idle cycles became available. For reference, here is one of my recent successful Trickplay creation tasks with the 30 second timeout active:
As you can see, when there are idle cycles available it doesn't take years, but extended busy periods do occur. Also, this is a background scheduled task, so I wouldn't actually care if it took more than 30 minutes total. |
After seeing repeated logs about `ffmpeg` being started then killed for being unresponsive, I tracked down this configuration setting on GitHub. So far, my Trickplay generation is much more reliable with a timeout of 30,000 instead. See: jellyfin/jellyfin#13116
There should really be a mention on the settings page that when using "Idle" process priority, the interval between images needs to be set higher.
jellyfin/MediaBrowser.Model/Configuration/ServerConfiguration.cs
Lines 211 to 213 in 1272bb9
My logs are full of "Creating trickplay files" followed by "Killing ffmpeg process" because while sometimes there were 7 seconds between images, often enough the system wasn't idle and it took much longer.
I'm trying 30 seconds now, to see if that's a more useful timeout. Maybe the default should just be to wait longer?
jellyfin/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
Lines 44 to 53 in 1272bb9
jellyfin/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
Lines 991 to 1055 in 1272bb9
I had no idea why the logs were not making sense until I searched / browsed GitHub to see what the conditions were for "Trickplay process unresponsive" in the code.
The text was updated successfully, but these errors were encountered: