diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2023-10-06 11:38:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-06 11:38:31 +0200 |
| commit | 6593aa125523611a215cf9d102598b8f00ba77b7 (patch) | |
| tree | 5e8c4741ef0001b56cf5af6c7344b07b42628b02 | |
| parent | e9e1fd214b608007735b2a2a3ed722d0e4937da8 (diff) | |
| parent | a18b3fbe70429f55852f0aebeda4e02e2abdef77 (diff) | |
Merge pull request #10135 from 0x25CBFC4F/fix/ffmpeg-probesize
Fixed probesize argument passing to FFmpeg
| -rw-r--r-- | CONTRIBUTORS.md | 1 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index b7e777817..e3af12a49 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -238,3 +238,4 @@ - [Jakob Kukla](https://github.com/jakobkukla) - [Utku Ă–zdemir](https://github.com/utkuozdemir) - [JPUC1143](https://github.com/Jpuc1143/) + - [0x25CBFC4F](https://github.com/0x25CBFC4F) diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index c311d3b8a..bdbc30de4 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -5690,7 +5690,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) @@ -5709,6 +5708,14 @@ namespace MediaBrowser.Controller.MediaEncoding inputModifier = inputModifier.Trim(); + // Apply -probesize if configured + var ffmpegProbeSize = _config.GetFFmpegProbeSize(); + + if (!string.IsNullOrEmpty(ffmpegProbeSize)) + { + inputModifier += $" -probesize {ffmpegProbeSize}"; + } + var userAgentParam = GetUserAgentParam(state); if (!string.IsNullOrEmpty(userAgentParam)) |
