Fix timestamp seeking for progressive downloads in mpv/iina/infuse
- Remove avoid_negative_ts from movflags (not a movflag option) - Add explicit -avoid_negative_ts make_zero -start_at_zero for progressive downloads - Ensures timestamps always start at 0 for proper seeking in strict players
This commit is contained in:
@@ -7495,8 +7495,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
// Progressive download - use faststart for proper seeking and duration
|
||||
// Use frag_keyframe for better seeking compatibility with mpv
|
||||
// avoid_negative_ts make_zero ensures timestamps start at 0 for better player compatibility
|
||||
format = " -f mp4 -movflags frag_keyframe+faststart+default_base_moof -avoid_negative_ts make_zero";
|
||||
format = " -f mp4 -movflags frag_keyframe+faststart+default_base_moof";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7603,6 +7602,12 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
args += " -start_at_zero";
|
||||
}
|
||||
}
|
||||
else if (state.TranscodingType == TranscodingJobType.Progressive && !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
|
||||
args += " -avoid_negative_ts make_zero -start_at_zero";
|
||||
}
|
||||
|
||||
var qualityParam = GetVideoQualityParam(state, videoCodec, encodingOptions, defaultPreset);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user