diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2023-02-05 22:13:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-05 22:13:08 +0100 |
| commit | 64263920cb93b97ea5c47c2263157e055d700c8b (patch) | |
| tree | 126daf18ed104aa978d758200bbefe6cfc83ed4d /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | 16a0537a01fded6dd24de9d11deda6d207496734 (diff) | |
| parent | 4a2245fe1e97c7d450557fd1269be8584a58c478 (diff) | |
Merge pull request #9249 from jmshrv/fix-m4a-moov
Specify required movflags when encoding M4A audio
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index a844e6443..9b5edabc0 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -61,6 +61,16 @@ namespace MediaBrowser.Controller.MediaEncoding "Main10" }; + private static readonly HashSet<string> _mp4ContainerNames = new(StringComparer.OrdinalIgnoreCase) + { + "mp4", + "m4a", + "m4p", + "m4b", + "m4r", + "m4v", + }; + public EncodingHelper( IApplicationPaths appPaths, IMediaEncoder mediaEncoder, @@ -5786,6 +5796,13 @@ namespace MediaBrowser.Controller.MediaEncoding } } + // Copy the movflags from GetProgressiveVideoFullCommandLine + // See #9248 and the associated PR for why this is needed + if (_mp4ContainerNames.Contains(state.OutputContainer)) + { + audioTranscodeParams.Add("-movflags empty_moov+delay_moov"); + } + var threads = GetNumberOfThreads(state, encodingOptions, null); var inputModifier = GetInputModifier(state, encodingOptions, null); |
