Skip to main content

FFMPEG Cheat sheet

With 3 given input (overlay.mp4, background.mp4, audio.mp3) create new video with name output.mp4 by adding overlay.mp4 with size 160:160 at position x: 25 and y: main_h-160-25 (25 from bottom) and use audio from audio.mp3

ffmpeg -i overlay.mp4 \
-i background.mp4 \
-i audio.mp3 \
-filter_complex "[0]scale=160:160 [overlay]; [1][overlay] overlay=25:(main_h-160-25)" \
-map 2:a \
-c:a \
copy output.mp4