You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to inactivity when no TS file is accessed by client for 15 > 15 seconds, restarting FFMPEG and deleting all TS files for Segment
...
Deleting /config/semaphore/5c82d7aeb611ad27bacfdba0b8dd23a7.* PID file and other resouces as no corresponding TS files exist. 31 > 30 seconds since it was last modified.
Solution
Increase timeout value for global variables in transcode.cleanup.sh script. The value is given in a number of seconds to monitor for inactivity of specific Jellyfin client.
TS_INACTIVITY_RESTART_SECONDS=120 # default value = 15
KEEP_PID_MOD_SECONDS=120 # default value = 30
The general recommendation for figuring out the right value is to slightly go beyond the time that it takes to produce TS file. You can monitor if problem repeats in upcoming days/weeks and then further increase the timeout if necessary.
Stop the Cleanup script by doing: touch $SEMAPHORE_DIR/transcode.cleanup.stop. If you do not want to create the STOP file then simply restart Jellyfin server. Then change playback position or exit and start watching media again to re-launch updated Cleanup script.
Explanation
When transcoding takes long time then TS files are created slowly. There are two monitoring processes that are related with the problem and requires to be adjusted for the performance capabilities of the server:
TS file inactivity
TS segment inactivity
TS file inactivity
Cleanup script uses global variable TS_INACTIVITY_RESTART_SECONDS to set the time for monitoring TS file inactivity. The purpose of this monitoring is to ensure that FFMPEG process is still active and it will produce TS files. If files are not produced then the Cleanup script considers that FFMPEG process has a problem and it will kill it which can result that Jellyfin will start another FFMPEG to restart producing TS files.
TS segment inactivity
The purpose of this monitoring is to release the portion of directory space that was allocated for the client (TS segment) if there are no TS files produced for this client. Cleanup script calculates space required by every client. If there is a client which does not use transcoding directory then that space can be released for other clients. Cleanup script does not know if Jellyfin will produce TS files or will direct stream, so it will await for TS files and if none are appearing by expiry of KEEP_PID_MOD_SECONDS then it will stop monitoring the particular TS segment (it will delete the Segment PID file).
The text was updated successfully, but these errors were encountered:
Problem
transcode.cleanup.log shows message:
Due to inactivity when no TS file is accessed by client for 15 > 15 seconds, restarting FFMPEG and deleting all TS files for Segment
...
Deleting /config/semaphore/5c82d7aeb611ad27bacfdba0b8dd23a7.* PID file and other resouces as no corresponding TS files exist. 31 > 30 seconds since it was last modified.
Solution
Increase timeout value for global variables in transcode.cleanup.sh script. The value is given in a number of seconds to monitor for inactivity of specific Jellyfin client.
The general recommendation for figuring out the right value is to slightly go beyond the time that it takes to produce TS file. You can monitor if problem repeats in upcoming days/weeks and then further increase the timeout if necessary.
Stop the Cleanup script by doing:
touch $SEMAPHORE_DIR/transcode.cleanup.stop
. If you do not want to create the STOP file then simply restart Jellyfin server. Then change playback position or exit and start watching media again to re-launch updated Cleanup script.Explanation
When transcoding takes long time then TS files are created slowly. There are two monitoring processes that are related with the problem and requires to be adjusted for the performance capabilities of the server:
TS file inactivity
Cleanup script uses global variable
TS_INACTIVITY_RESTART_SECONDS
to set the time for monitoring TS file inactivity. The purpose of this monitoring is to ensure that FFMPEG process is still active and it will produce TS files. If files are not produced then the Cleanup script considers that FFMPEG process has a problem and it will kill it which can result that Jellyfin will start another FFMPEG to restart producing TS files.TS segment inactivity
The purpose of this monitoring is to release the portion of directory space that was allocated for the client (TS segment) if there are no TS files produced for this client. Cleanup script calculates space required by every client. If there is a client which does not use transcoding directory then that space can be released for other clients. Cleanup script does not know if Jellyfin will produce TS files or will direct stream, so it will await for TS files and if none are appearing by expiry of
KEEP_PID_MOD_SECONDS
then it will stop monitoring the particular TS segment (it will delete the Segment PID file).The text was updated successfully, but these errors were encountered: