aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/MediaEncoding/TranscodingJob.cs
AgeCommit message (Collapse)Author
4 daysFix concurrent ffmpeg segment racinggnattu
This is a nasty one. The failure mode is: 1. Request A started FFmpeg and waited for a segment. 2. Request B requested an earlier or far away segment. 3. Jellyfin thought FFmpeg should to restart at a different position. 4. Request B killed the existing transcoding job. 5. Killing that job cancelled the same token request A was using. 6. The cancellation produced http 500 to request A. To fix this: we lock transcoding job state changes and segment handling per playlist, and use a thread safe counter to track how many http responses are still using each job’s segments. A job is only stopped or replaced once that counter reaches zero.
2024-12-12move to new System.Threading.Lock type for better performanceDaniyar Alpyspayev
2024-08-30Remove BOM from UTF-8 filesBond_009
I think some people need to change their IDE configuration ;)
2024-03-16Add TranscodingSegmentCleaner to replace ffmpeg's hlsenc deletionnyanmisaka
FFmpeg deletes segments based on its own transcoding progress, but we need to delete segments based on client download progress. Since disk and GPU speeds vary, using hlsenc's built-in deletion will result in premature deletion of some segments. As a consequence, the server has to constantly respin new ffmpeg instances, resulting in choppy video playback. Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2023-12-21Rename and clean up TranscodingJobPatrick Barron