From 2a5270d399ef45fc5a3fb0efe8f1134c2196b930 Mon Sep 17 00:00:00 2001 From: Claudio Date: Mon, 11 May 2026 22:52:36 +0200 Subject: [PATCH] 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. --- backend/app/routers/photos.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/app/routers/photos.py b/backend/app/routers/photos.py index 3d78d6b..6392693 100644 --- a/backend/app/routers/photos.py +++ b/backend/app/routers/photos.py @@ -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,