Fix MP4 mux for web playback: add faststart and genpts
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions

- 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:
giles
2026-02-04 00:32:45 +00:00
parent 9151d2c2a8
commit 0bd8ee71c7
3 changed files with 39 additions and 26 deletions

View File

@@ -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)}")