aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Harvey <44349936+jmshrv@users.noreply.github.com>2023-02-04 01:56:14 +0000
committerJames Harvey <44349936+jmshrv@users.noreply.github.com>2023-02-04 01:56:14 +0000
commitc70508b08984d62d3b62d233f6ce4078f2a75bb1 (patch)
treefa2e02143a957a2c1ecf78320b8c77023a3d411c
parent5612091df3f496960ef4cad6e94ff821a02173cf (diff)
Add movflags to mp4 audio encoding
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index a844e6443..d08a5116a 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -5786,6 +5786,22 @@ namespace MediaBrowser.Controller.MediaEncoding
}
}
+ // Copy the movflags from GetProgressiveVideoFullCommandLine
+ // See # for explanation on why this is needed
+ var mp4ContainerNames = new HashSet<String> {
+ "mp4",
+ "m4a",
+ "m4p",
+ "m4b",
+ "m4r",
+ "m4v",
+ };
+
+ if (mp4ContainerNames.Contains(state.OutputContainer.ToLower()))
+ {
+ audioTranscodeParams.Add("-movflags frag_keyframe+empty_moov+delay_moov");
+ }
+
var threads = GetNumberOfThreads(state, encodingOptions, null);
var inputModifier = GetInputModifier(state, encodingOptions, null);