Skip to content

Instantly share code, notes, and snippets.

@redraw
Created August 25, 2018 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save redraw/000b7023a7397d80592520292379e045 to your computer and use it in GitHub Desktop.
Save redraw/000b7023a7397d80592520292379e045 to your computer and use it in GitHub Desktop.
ffmpeg command to overlay a video (centered) over a background image
ffmpeg -i bg.jpg -i video.mp4 -filter_complex "[1]scale=-1:300[vid]; [0]scale=1200:720[img]; [img][vid] overlay=(W-w)/2:(H-h)/2" -acodec copy -preset ultrafast test.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment