mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-03 22:40:09 +00:00
Fix explicit stream selection in MediaEncoder.ExtractImageInternal
This commit is contained in:
parent
04571e93f8
commit
2345646ff1
2 changed files with 3 additions and 27 deletions
|
|
@ -503,15 +503,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
{
|
||||
var inputArgument = GetInputArgument(inputFile, mediaSource);
|
||||
|
||||
if (isAudio)
|
||||
{
|
||||
if (imageStreamIndex.HasValue && imageStreamIndex.Value > 0)
|
||||
{
|
||||
// It seems for audio files we need to subtract 1 (for the audio stream??)
|
||||
imageStreamIndex = imageStreamIndex.Value - 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!isAudio)
|
||||
{
|
||||
// The failure of HDR extraction usually occurs when using custom ffmpeg that does not contain the zscale filter.
|
||||
try
|
||||
|
|
@ -582,7 +574,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
_ => string.Empty
|
||||
};
|
||||
|
||||
var mapArg = imageStreamIndex.HasValue ? (" -map 0:v:" + imageStreamIndex.Value.ToString(CultureInfo.InvariantCulture)) : string.Empty;
|
||||
var mapArg = imageStreamIndex.HasValue ? (" -map 0:" + imageStreamIndex.Value.ToString(CultureInfo.InvariantCulture)) : string.Empty;
|
||||
|
||||
var enableHdrExtraction = allowTonemap && string.Equals(videoStream?.VideoRange, "HDR", StringComparison.OrdinalIgnoreCase);
|
||||
if (enableHdrExtraction)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue