mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
Added handling of FFmpeg:probesize variable
This commit is contained in:
@@ -5678,7 +5678,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
// Apply -analyzeduration as per the environment variable,
|
||||
// otherwise ffmpeg will break on certain files due to default value is 0.
|
||||
// The default value of -probesize is more than enough, so leave it as is.
|
||||
var ffmpegAnalyzeDuration = _config.GetFFmpegAnalyzeDuration() ?? string.Empty;
|
||||
|
||||
if (state.MediaSource.AnalyzeDurationMs > 0)
|
||||
@@ -5697,6 +5696,22 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
inputModifier = inputModifier.Trim();
|
||||
|
||||
// Apply -probesize if configured
|
||||
var probeSizeArgument = string.Empty;
|
||||
var ffmpegProbeSize = _config.GetFFmpegProbeSize();
|
||||
|
||||
if (!string.IsNullOrEmpty(ffmpegProbeSize))
|
||||
{
|
||||
probeSizeArgument = $"-probesize {probeSizeArgument}";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(probeSizeArgument))
|
||||
{
|
||||
inputModifier += $" {probeSizeArgument}";
|
||||
}
|
||||
|
||||
inputModifier = inputModifier.Trim();
|
||||
|
||||
var userAgentParam = GetUserAgentParam(state);
|
||||
|
||||
if (!string.IsNullOrEmpty(userAgentParam))
|
||||
|
||||
Reference in New Issue
Block a user