mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 04:05:50 -04:00
Fix image extractor with more strict ffmpeg requirement (#14013)
* Correctly handle retry when I frame only failed * Use full range output for image * Don't trim image extractor option
This commit is contained in:
commit
aa24d08d33
@ -737,12 +737,12 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
{
|
{
|
||||||
var peak = videoStream.VideoRangeType == VideoRangeType.DOVI ? "400" : "100";
|
var peak = videoStream.VideoRangeType == VideoRangeType.DOVI ? "400" : "100";
|
||||||
enableHdrExtraction = true;
|
enableHdrExtraction = true;
|
||||||
filters.Add($"tonemapx=tonemap=bt2390:desat=0:peak={peak}:t=bt709:m=bt709:p=bt709:format=yuv420p");
|
filters.Add($"tonemapx=tonemap=bt2390:desat=0:peak={peak}:t=bt709:m=bt709:p=bt709:format=yuv420p:range=full");
|
||||||
}
|
}
|
||||||
else if (SupportsFilter("zscale") && videoStream.VideoRangeType != VideoRangeType.DOVI)
|
else if (SupportsFilter("zscale") && videoStream.VideoRangeType != VideoRangeType.DOVI)
|
||||||
{
|
{
|
||||||
enableHdrExtraction = true;
|
enableHdrExtraction = true;
|
||||||
filters.Add("zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0:peak=100,zscale=t=bt709:m=bt709,format=yuv420p");
|
filters.Add("zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0:peak=100,zscale=t=bt709:m=bt709:out_range=full,format=yuv420p");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -756,7 +756,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
_threads,
|
_threads,
|
||||||
vf,
|
vf,
|
||||||
isAudio ? string.Empty : GetImageResolutionParameter(),
|
isAudio ? string.Empty : GetImageResolutionParameter(),
|
||||||
EncodingHelper.GetVideoSyncOption("-1", EncoderVersion).Trim(), // auto decide fps mode
|
EncodingHelper.GetVideoSyncOption("-1", EncoderVersion), // auto decide fps mode
|
||||||
tempExtractPath);
|
tempExtractPath);
|
||||||
|
|
||||||
if (offset.HasValue)
|
if (offset.HasValue)
|
||||||
@ -767,7 +767,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
// The mpegts demuxer cannot seek to keyframes, so we have to let the
|
// The mpegts demuxer cannot seek to keyframes, so we have to let the
|
||||||
// decoder discard non-keyframes, which may contain corrupted images.
|
// decoder discard non-keyframes, which may contain corrupted images.
|
||||||
var seekMpegTs = offset.HasValue && string.Equals("mpegts", container, StringComparison.OrdinalIgnoreCase);
|
var seekMpegTs = offset.HasValue && string.Equals("mpegts", container, StringComparison.OrdinalIgnoreCase);
|
||||||
if ((useIFrame && useTradeoff) || seekMpegTs)
|
if (useIFrame && (useTradeoff || seekMpegTs))
|
||||||
{
|
{
|
||||||
args = "-skip_frame nokey " + args;
|
args = "-skip_frame nokey " + args;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user