Simplify conditions for downloads folder and timestamp fixes

- Downloads folder: use for ANY request without SegmentContainer (not just Progressive)
- Timestamp normalization: apply whenever CopyTimestamps=false (not just Progressive)
- Removes overly restrictive conditions that prevented fixes from working
- Should now work for all download scenarios
This commit is contained in:
mani
2026-01-08 03:03:10 +01:00
parent 6a83b149c6
commit 9ddeffa563
2 changed files with 4 additions and 18 deletions

View File

@@ -7504,18 +7504,11 @@ namespace MediaBrowser.Controller.MediaEncoding
var inputModifier = GetInputModifier(state, encodingOptions, null);
// Add timestamp normalization for progressive downloads
// Always normalize timestamps when not copying them - fixes seeking in mpv/iina/infuse
var timestampArgs = string.Empty;
Console.WriteLine($"[EncodingHelper] TranscodingType: {state.TranscodingType}, CopyTimestamps: {state.BaseRequest.CopyTimestamps}, OutputContainer: {state.OutputContainer}");
if (state.TranscodingType == TranscodingJobType.Progressive && !state.BaseRequest.CopyTimestamps)
if (!state.BaseRequest.CopyTimestamps)
{
// For progressive downloads without copyTimestamps, ensure timestamps start at 0
// This fixes seeking issues in strict players like mpv, iina, and infuse
timestampArgs = " -avoid_negative_ts make_zero -start_at_zero";
Console.WriteLine($"[EncodingHelper] Adding timestamp normalization: {timestampArgs}");
}
else
{
Console.WriteLine($"[EncodingHelper] NOT adding timestamp normalization - condition not met");
}
return string.Format(