Remove too restrictive Progressive-only conditions

- Apply timestamp normalization to all transcodes, not just Progressive
- Use /downloads/ folder for all full-file downloads, not just Progressive
- Fixes MKV streaming issues with timestamps
This commit is contained in:
mani
2026-01-08 15:23:22 +01:00
parent cbb80d7d9e
commit 17a7e0e0e8
2 changed files with 6 additions and 6 deletions

View File

@@ -384,13 +384,13 @@ public static class StreamingHelpers
// Progressive downloads: use disk-based path (large files OK, slower cleanup)
var folder = serverConfigurationManager.GetTranscodePath();
// Check if this is a progressive download (no segments) vs HLS streaming
// Check if this is a full file download (no segments) vs HLS streaming
var streamingRequest = state.BaseRequest as StreamingRequestDto;
// Progressive download: full file download with no HLS segmentation
if (streamingRequest?.SegmentContainer is null && state.TranscodingType == TranscodingJobType.Progressive)
// Full file download: no HLS segmentation
if (streamingRequest?.SegmentContainer is null)
{
// Progressive download - use disk-based transcode path
// Full file download - use disk-based transcode path
var diskTranscodePath = Path.Combine(folder, "downloads");
Directory.CreateDirectory(diskTranscodePath);
folder = diskTranscodePath;

View File

@@ -7503,10 +7503,10 @@ namespace MediaBrowser.Controller.MediaEncoding
var inputModifier = GetInputModifier(state, encodingOptions, null);
// Add timestamp normalization for progressive downloads
// Add timestamp normalization to fix seeking issues
// Fixes seeking issues in strict players like mpv, iina, and infuse
var timestampArgs = string.Empty;
if (state.TranscodingType == TranscodingJobType.Progressive && !state.BaseRequest.CopyTimestamps)
if (!state.BaseRequest.CopyTimestamps)
{
timestampArgs = " -avoid_negative_ts make_zero -start_at_zero";
}