mirror of https://github.com/jellyfin/jellyfin.git
fix: move trickplay specific option into TrickplayOptions (#11229)
This commit is contained in:
parent
aac96addfe
commit
be21d51742
|
@ -141,6 +141,7 @@ public class TrickplayManager : ITrickplayManager
|
||||||
width,
|
width,
|
||||||
TimeSpan.FromMilliseconds(options.Interval),
|
TimeSpan.FromMilliseconds(options.Interval),
|
||||||
options.EnableHwAcceleration,
|
options.EnableHwAcceleration,
|
||||||
|
options.EnableHwEncoding,
|
||||||
options.ProcessThreads,
|
options.ProcessThreads,
|
||||||
options.Qscale,
|
options.Qscale,
|
||||||
options.ProcessPriority,
|
options.ProcessPriority,
|
||||||
|
|
|
@ -149,6 +149,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
/// <param name="maxWidth">The maximum width.</param>
|
/// <param name="maxWidth">The maximum width.</param>
|
||||||
/// <param name="interval">The interval.</param>
|
/// <param name="interval">The interval.</param>
|
||||||
/// <param name="allowHwAccel">Allow for hardware acceleration.</param>
|
/// <param name="allowHwAccel">Allow for hardware acceleration.</param>
|
||||||
|
/// <param name="enableHwEncoding">Use hardware mjpeg encoder.</param>
|
||||||
/// <param name="threads">The input/output thread count for ffmpeg.</param>
|
/// <param name="threads">The input/output thread count for ffmpeg.</param>
|
||||||
/// <param name="qualityScale">The qscale value for ffmpeg.</param>
|
/// <param name="qualityScale">The qscale value for ffmpeg.</param>
|
||||||
/// <param name="priority">The process priority for the ffmpeg process.</param>
|
/// <param name="priority">The process priority for the ffmpeg process.</param>
|
||||||
|
@ -163,6 +164,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
int maxWidth,
|
int maxWidth,
|
||||||
TimeSpan interval,
|
TimeSpan interval,
|
||||||
bool allowHwAccel,
|
bool allowHwAccel,
|
||||||
|
bool enableHwEncoding,
|
||||||
int? threads,
|
int? threads,
|
||||||
int? qualityScale,
|
int? qualityScale,
|
||||||
ProcessPriorityClass? priority,
|
ProcessPriorityClass? priority,
|
||||||
|
|
|
@ -800,6 +800,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
int maxWidth,
|
int maxWidth,
|
||||||
TimeSpan interval,
|
TimeSpan interval,
|
||||||
bool allowHwAccel,
|
bool allowHwAccel,
|
||||||
|
bool enableHwEncoding,
|
||||||
int? threads,
|
int? threads,
|
||||||
int? qualityScale,
|
int? qualityScale,
|
||||||
ProcessPriorityClass? priority,
|
ProcessPriorityClass? priority,
|
||||||
|
@ -828,7 +829,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
MediaPath = inputFile,
|
MediaPath = inputFile,
|
||||||
OutputVideoCodec = "mjpeg"
|
OutputVideoCodec = "mjpeg"
|
||||||
};
|
};
|
||||||
var vidEncoder = options.AllowMjpegEncoding ? encodingHelper.GetVideoEncoder(jobState, options) : jobState.OutputVideoCodec;
|
var vidEncoder = enableHwEncoding ? encodingHelper.GetVideoEncoder(jobState, options) : jobState.OutputVideoCodec;
|
||||||
|
|
||||||
// Get input and filter arguments
|
// Get input and filter arguments
|
||||||
var inputArg = encodingHelper.GetInputArgument(jobState, options, container).Trim();
|
var inputArg = encodingHelper.GetInputArgument(jobState, options, container).Trim();
|
||||||
|
|
|
@ -51,7 +51,6 @@ public class EncodingOptions
|
||||||
EnableHardwareEncoding = true;
|
EnableHardwareEncoding = true;
|
||||||
AllowHevcEncoding = false;
|
AllowHevcEncoding = false;
|
||||||
AllowAv1Encoding = false;
|
AllowAv1Encoding = false;
|
||||||
AllowMjpegEncoding = false;
|
|
||||||
EnableSubtitleExtraction = true;
|
EnableSubtitleExtraction = true;
|
||||||
AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = new[] { "mkv" };
|
AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = new[] { "mkv" };
|
||||||
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
|
HardwareDecodingCodecs = new string[] { "h264", "vc1" };
|
||||||
|
@ -262,11 +261,6 @@ public class EncodingOptions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AllowAv1Encoding { get; set; }
|
public bool AllowAv1Encoding { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets a value indicating whether MJPEG encoding is enabled.
|
|
||||||
/// </summary>
|
|
||||||
public bool AllowMjpegEncoding { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether subtitle extraction is enabled.
|
/// Gets or sets a value indicating whether subtitle extraction is enabled.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -13,6 +13,11 @@ public class TrickplayOptions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool EnableHwAcceleration { get; set; } = false;
|
public bool EnableHwAcceleration { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets a value indicating whether or not to use HW accelerated MJPEG encoding.
|
||||||
|
/// </summary>
|
||||||
|
public bool EnableHwEncoding { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the behavior used by trickplay provider on library scan/update.
|
/// Gets or sets the behavior used by trickplay provider on library scan/update.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue