diff options
| author | crobibero <cody@robibe.ro> | 2026-09-15 11:15:47 -0400 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2026-09-15 11:15:47 -0400 |
| commit | 51abf6f503dae58428f3558e77805f2937335d8f (patch) | |
| tree | 7a2f5ea269eec8755ca03604581a5ca3524e8ced /MediaBrowser.MediaEncoding/Encoder | |
| parent | 006ecadbe041ea422b34adf6a3fcf6638d189a70 (diff) | |
Backport pull request #17883 from jellyfin/release-12.z
Fix trickplay using the wrong video stream
Original-merge: 31f05331911748eeda047be92f19dfd801b9fff6
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Cody Robibero <cody@robibe.ro>
Diffstat (limited to 'MediaBrowser.MediaEncoding/Encoder')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index f64fd73763..fa43d756a4 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -922,6 +922,15 @@ namespace MediaBrowser.MediaEncoding.Encoder inputArg = "-hwaccel_flags +low_priority " + inputArg; } + // Force the video stream, otherwise ffmpeg may pick a cover image. + var streamIndex = EncodingHelper.FindIndex(mediaSource.MediaStreams, imageStream); + if (streamIndex < 0) + { + throw new InvalidOperationException($"Unable to locate requested stream {imageStream.Title}"); + } + + inputArg += " -map 0:" + streamIndex; + var filterParam = encodingHelper.GetVideoProcessingFilterParam(jobState, options, vidEncoder).Trim(); if (string.IsNullOrWhiteSpace(filterParam)) { |
