fix(playback): force mp4 muxer; ffmpeg cant infer format from .tmp extension

Transcode wrote to {id}.mp4.tmp for atomic publish, but ffmpeg picks
the muxer from the output filename and rejected .tmp with Unable to
choose an output format. Add -f mp4 so the temp name is just storage
scratch, not a format hint.
This commit is contained in:
Claudio
2026-05-11 22:52:36 +02:00
parent 1b6ff45726
commit 2a5270d399

View File

@@ -976,6 +976,10 @@ async def _transcode_to_h264_mp4(src: str, dst: str) -> bool:
'-c:a', 'aac',
'-b:a', '160k',
'-movflags', '+faststart',
# tmp filename ends in `.tmp`, which ffmpeg can't map to
# an output muxer — force the mp4 muxer explicitly so the
# name is just storage scratch, not a format hint.
'-f', 'mp4',
tmp,
],
capture_output=True, text=True, timeout=600,