diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index 346e97ae12..90ef937203 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -419,6 +419,8 @@ namespace MediaBrowser.MediaEncoding.Encoder var extractChapters = request.MediaType == DlnaProfileType.Video && request.ExtractChapters; var analyzeDuration = string.Empty; var ffmpegAnalyzeDuration = _config.GetFFmpegAnalyzeDuration() ?? string.Empty; + var ffmpegProbeSize = _config.GetFFmpegProbeSize() ?? string.Empty; + var extraArgs = string.Empty; if (request.MediaSource.AnalyzeDurationMs > 0) { @@ -429,12 +431,22 @@ namespace MediaBrowser.MediaEncoding.Encoder analyzeDuration = "-analyzeduration " + ffmpegAnalyzeDuration; } + if (!string.IsNullOrEmpty(analyzeDuration)) + { + extraArgs = analyzeDuration; + } + + if (!string.IsNullOrEmpty(ffmpegProbeSize)) + { + extraArgs += " -probesize " + ffmpegProbeSize; + } + return GetMediaInfoInternal( GetInputArgument(request.MediaSource.Path, request.MediaSource), request.MediaSource.Path, request.MediaSource.Protocol, extractChapters, - analyzeDuration, + extraArgs, request.MediaType == DlnaProfileType.Audio, request.MediaSource.VideoType, cancellationToken);