From 8f4d6d12bc8699d807e9e136936d82dc343cfcca Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 3 Feb 2026 00:41:07 +0000 Subject: [PATCH] Use fragmented mp4 for streamable output while rendering --- streaming/output.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/streaming/output.py b/streaming/output.py index c273bd1..1d820d5 100644 --- a/streaming/output.py +++ b/streaming/output.py @@ -181,6 +181,10 @@ class FileOutput(Output): if audio_source: cmd.extend(["-c:a", "aac", "-b:a", "192k", "-shortest"]) + # Use fragmented mp4 for streamable output while writing + if str(self.path).endswith('.mp4'): + cmd.extend(["-movflags", "frag_keyframe+empty_moov+default_base_moof"]) + cmd.append(str(self.path)) import sys