Add configurable FFmpeg log level
- Add FfmpegLogLevel property to EncodingOptions (default: 'error') - Use configuration value in GetInputModifier instead of hardcoded value - Allows changing log verbosity without rebuild via encoding.xml - Possible values: quiet, panic, fatal, error, warning, info, verbose, debug, trace
This commit is contained in:
@@ -7105,7 +7105,14 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
public string GetInputModifier(EncodingJobInfo state, EncodingOptions encodingOptions, string segmentContainer)
|
||||
{
|
||||
var inputModifier = "-loglevel error";
|
||||
var inputModifier = string.Empty;
|
||||
|
||||
// Apply FFmpeg log level from configuration
|
||||
if (!string.IsNullOrEmpty(encodingOptions.FfmpegLogLevel))
|
||||
{
|
||||
inputModifier = $"-loglevel {encodingOptions.FfmpegLogLevel}";
|
||||
}
|
||||
|
||||
var analyzeDurationArgument = string.Empty;
|
||||
|
||||
// Apply -analyzeduration as per the environment variable,
|
||||
|
||||
@@ -59,6 +59,7 @@ public class EncodingOptions
|
||||
EnableSubtitleExtraction = true;
|
||||
AllowOnDemandMetadataBasedKeyframeExtractionForExtensions = ["mkv"];
|
||||
HardwareDecodingCodecs = ["h264", "vc1"];
|
||||
FfmpegLogLevel = "error";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -295,4 +296,9 @@ public class EncodingOptions
|
||||
/// Gets or sets the file extensions on-demand metadata based keyframe extraction is enabled for.
|
||||
/// </summary>
|
||||
public string[] AllowOnDemandMetadataBasedKeyframeExtractionForExtensions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the FFmpeg log level (quiet, panic, fatal, error, warning, info, verbose, debug, trace).
|
||||
/// </summary>
|
||||
public string FfmpegLogLevel { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user