Fix MP4 mux for web playback: add faststart and genpts
- Add -movflags +faststart to move moov atom to start - Add -fflags +genpts for proper timestamp generation - Fixes jerky playback and video/audio desync Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -411,6 +411,8 @@ def run_stream(
|
||||
"ffmpeg", "-y",
|
||||
"-i", str(hls_playlist),
|
||||
"-c", "copy", # Just copy streams, no re-encoding
|
||||
"-movflags", "+faststart", # Move moov atom to start for web playback
|
||||
"-fflags", "+genpts", # Generate proper timestamps
|
||||
str(final_mp4)
|
||||
]
|
||||
logger.info(f"Muxing HLS to MP4: {' '.join(mux_cmd)}")
|
||||
|
||||
Reference in New Issue
Block a user