Koldflux add-audio-to-video test log, run 2026-10-21. ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers All inputs are generated here by ffmpeg lavfi; no third-party media. Picture check = md5 of the decoded video stream (ffmpeg -f md5). Shipped file names: silent.mp4 is silent-video.mp4, music8.mp3 is music-8s.mp3, D.mp4 is result-looped.mp4. ## inputs silent.mp4 codec_name=h264 codec_type=video duration=12.000000 size=20922 music8.mp3 codec_name=mp3 codec_type=audio duration=8.045714 size=129193 music20.mp3 codec_name=mp3 codec_type=audio duration=20.035918 size=321036 withsound.mp4 codec_name=h264 codec_type=video codec_name=aac codec_type=audio duration=12.000000 size=218945 ## A: music20 (longer than the 12 s video) onto silent video, picture copied, -shortest $ ffmpeg -i silent.mp4 -i music20.mp3 -map 0:v -map 1:a -c:v copy -c:a aac -b:a 192k -shortest A.mp4 exit=0 ## B: music8 (shorter than the video), no -shortest $ ffmpeg -i silent.mp4 -i music8.mp3 -map 0:v -map 1:a -c:v copy -c:a aac -b:a 192k B.mp4 exit=0 ## C: music8 with -shortest (the trap) $ ffmpeg -i silent.mp4 -i music8.mp3 -map 0:v -map 1:a -c:v copy -c:a aac -b:a 192k -shortest C.mp4 exit=0 ## D: loop music8 to fill the video $ ffmpeg -i silent.mp4 -stream_loop -1 -i music8.mp3 -map 0:v -map 1:a -c:v copy -c:a aac -b:a 192k -shortest D.mp4 exit=0 ## E: mix music20 at 30% with the original sound $ ffmpeg -i withsound.mp4 -i music20.mp3 -filter_complex [0:a]volume=1.0[a0];[1:a]volume=0.3[a1];[a0][a1]amix=inputs=2:duration=first:normalize=0[a] -map 0:v -map [a] -c:v copy -c:a aac -b:a 192k E.mp4 exit=0 ## F: start music8 3 s into the video, 2 s fade out ending at 12 s $ ffmpeg -i silent.mp4 -i music8.mp3 -filter_complex [1:a]adelay=3000:all=1,apad=whole_dur=12,afade=t=out:st=10:d=2[a] -map 0:v -map [a] -c:v copy -c:a aac -b:a 192k -shortest F.mp4 exit=0 ## G: copy AAC audio without re-encoding $ ffmpeg -i silent.mp4 -i music8.m4a -map 0:v -map 1:a -c:v copy -c:a copy G.mp4 exit=0 ## H: copy WAV straight into MP4 $ ffmpeg -i silent.mp4 -i music8.wav -map 0:v -map 1:a -c:v copy -c:a copy H.mp4 exit=0 ## I: video that already has sound, no -map (default stream choice) vs explicit -map $ ffmpeg -i withsound.mp4 -i music8.mp3 -c:v copy -c:a aac I_default.mp4 exit=0 $ ffmpeg -i withsound.mp4 -i music8.mp3 -map 0:v -map 1:a -c:v copy -c:a aac I_explicit.mp4 exit=0 ## results picture md5 of silent.mp4: MD5=3fb21bc9fda2c61fa80b0fb8991799ee A: format(duration,size)=12.000000,237632 video_dur=12.000000 audio(codec,dur)=aac,11.980998 audio_streams=1 picture_vs_silent=identical mean_first2s=-11.4 dB mean_from_10s=-11.4 dB B: format(duration,size)=12.000000,165395 video_dur=12.000000 audio(codec,dur)=aac,8.000000 audio_streams=1 picture_vs_silent=identical mean_first2s=-11.4 dB mean_from_10s= C: format(duration,size)=8.000000,158887 video_dur=7.920000 audio(codec,dur)=aac,8.000000 audio_streams=1 picture_vs_silent=different mean_first2s=-11.4 dB mean_from_10s= D: format(duration,size)=12.000000,236853 video_dur=12.000000 audio(codec,dur)=aac,11.982993 audio_streams=1 picture_vs_silent=identical mean_first2s=-11.4 dB mean_from_10s=-11.4 dB E: format(duration,size)=12.000000,239750 video_dur=12.000000 audio(codec,dur)=aac,11.911995 audio_streams=1 picture_vs_silent=identical mean_first2s=-18.4 dB mean_from_10s=-18.5 dB F: format(duration,size)=12.000000,163290 video_dur=12.000000 audio(codec,dur)=aac,12.000000 audio_streams=1 picture_vs_silent=identical mean_first2s=-91.0 dB mean_from_10s=-16.8 dB G: format(duration,size)=12.000000,156779 video_dur=12.000000 audio(codec,dur)=aac,8.000000 audio_streams=1 picture_vs_silent=identical mean_first2s=-11.0 dB mean_from_10s= H: format(duration,size)=12.000000,729053 video_dur=12.000000 audio(codec,dur)=pcm_s16le,8.000000 audio_streams=1 picture_vs_silent=identical mean_first2s=-11.0 dB mean_from_10s= I_default: format(duration,size)=12.003991,132009 video_dur=12.000000 audio(codec,dur)=aac,12.003991 audio_streams=1 picture_vs_silent=identical mean_first2s=-21.0 dB mean_from_10s=-21.1 dB I_explicit: format(duration,size)=12.000000,95822 video_dur=12.000000 audio(codec,dur)=aac,8.000000 audio_streams=1 picture_vs_silent=identical mean_first2s=-11.4 dB mean_from_10s= -rw-rw-r-- 1 ubuntu ubuntu 237632 Oct 21 12:40 A.mp4 -rw-rw-r-- 1 ubuntu ubuntu 165395 Oct 21 12:40 B.mp4 -rw-rw-r-- 1 ubuntu ubuntu 158887 Oct 21 12:40 C.mp4 -rw-rw-r-- 1 ubuntu ubuntu 236853 Oct 21 12:40 D.mp4 -rw-rw-r-- 1 ubuntu ubuntu 239750 Oct 21 12:40 E.mp4 -rw-rw-r-- 1 ubuntu ubuntu 163290 Oct 21 12:40 F.mp4 -rw-rw-r-- 1 ubuntu ubuntu 156779 Oct 21 12:40 G.mp4 -rw-rw-r-- 1 ubuntu ubuntu 729053 Oct 21 12:40 H.mp4 -rw-rw-r-- 1 ubuntu ubuntu 132009 Oct 21 12:40 I_default.mp4 -rw-rw-r-- 1 ubuntu ubuntu 95822 Oct 21 12:40 I_explicit.mp4 -rw-rw-r-- 1 ubuntu ubuntu 321036 Oct 21 12:40 music20.mp3 -rw-rw-r-- 1 ubuntu ubuntu 1764078 Oct 21 12:40 music20.wav -rw-rw-r-- 1 ubuntu ubuntu 133135 Oct 21 12:40 music8.m4a -rw-rw-r-- 1 ubuntu ubuntu 129193 Oct 21 12:40 music8.mp3 -rw-rw-r-- 1 ubuntu ubuntu 705678 Oct 21 12:40 music8.wav -rw-rw-r-- 1 ubuntu ubuntu 20922 Oct 21 12:40 silent.mp4 -rw-rw-r-- 1 ubuntu ubuntu 218945 Oct 21 12:40 withsound.mp4 ## Koldflux browser tool, run on a local development build (headless Chromium via Playwright, page security policy bypassed for the dev build only) at /tools/video/add-audio on 2026-10-21 Inputs: silent.mp4 (12 s), withsound.mp4 (12 s, 180 Hz tone), music8.mp3 (8 s), music20.mp3 (20 s). The time shown includes page load and the first engine download, not only the conversion. ## T1 replace, music 8 s, repeat ON, video silent 12 s: clicked Add the audio to Download link visible in 14.9 s (includes page load and first engine download) codec_name=h264|codec_type=video|duration=12.000000 codec_name=aac|codec_type=audio|duration=12.006009 duration=12.006009|size=237285 mean level first 2 s: -11.4 dB; from 10 s on: -11.4 dB picture md5: MD5=3fb21bc9fda2c61fa80b0fb8991799ee (source MD5=3fb21bc9fda2c61fa80b0fb8991799ee) ## T2 replace, music 8 s, repeat OFF, video silent 12 s: clicked Add the audio to Download link visible in 13.0 s (includes page load and first engine download) codec_name=h264|codec_type=video|duration=12.000000 codec_name=aac|codec_type=audio|duration=12.003991 duration=12.003991|size=167974 mean level first 2 s: -11.4 dB; from 10 s on: -91.0 dB picture md5: MD5=3fb21bc9fda2c61fa80b0fb8991799ee (source MD5=3fb21bc9fda2c61fa80b0fb8991799ee) ## T3 mix, music 20 s at 100% with original 12 s sound (original 100%): clicked Add the audio to Download link visible in 12.5 s (includes page load and first engine download) codec_name=h264|codec_type=video|duration=12.000000 codec_name=aac|codec_type=audio|duration=11.958005 duration=12.000000|size=239217 mean level first 2 s: -11.0 dB; from 10 s on: -11.0 dB picture md5: MD5=3fb21bc9fda2c61fa80b0fb8991799ee (source MD5=3fb21bc9fda2c61fa80b0fb8991799ee) ## Codec and container check with -c:v copy, run 2026-10-21, ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers Sources are made from silent.mp4's generated gradients. Each command is followed by its exit code, first error line and ffprobe of the result. src_prores.mov codec: prores src_hevc.mp4 codec: hevc src silent.mp4 codec: h264 $ ffmpeg -i src_prores.mov -i music8.mp3 -map 0:v -map 1:a -c:v copy -c:a aac -shortest exit=234; first error: [mp4 @ 0x63fc6958cc80] Could not find tag for codec prores in stream #0, codec not currently supported in container result: no usable file $ ffmpeg -i src_hevc.mp4 -i music8.mp3 -map 0:v -map 1:a -c:v copy -c:a libopus -shortest exit=234; first error: [webm @ 0x5b7a6e7f33c0] Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM. result: $ ffmpeg -i silent.mp4 -i music8.mp3 -map 0:v -map 1:a -c:v copy -c:a libopus -shortest exit=234; first error: [webm @ 0x5b37bbc31e80] Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM. result: $ ffmpeg -i src_hevc.mp4 -i music8.mp3 -map 0:v -map 1:a -c:v copy -c:a aac -shortest exit=0; first error: result: codec_name=hevc codec_name=aac duration=8.000000|size=92196 ## fallbacks (re-encode the picture) $ ffmpeg -i src_prores.mov -i music8.mp3 -map 0:v -map 1:a -c:v libx264 -crf 23 -pix_fmt yuv420p -c:a aac -shortest exit=0; first error: result: codec_name=h264 codec_name=aac duration=8.000000|size=103061 $ ffmpeg -i silent.mp4 -i music8.mp3 -map 0:v -map 1:a -c:v libvpx-vp9 -crf 35 -b:v 0 -c:a libopus -shortest exit=0; first error: result: codec_name=vp9 codec_name=opus duration=8.008000|size=98627 (VPS clock date in the header above is UTC; run done the same day as the other tests.)