Skip to content

Instantly share code, notes, and snippets.

@cfr
Last active August 6, 2019 15:08
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save cfr/c08899b11ee6105ca24d to your computer and use it in GitHub Desktop.
Save cfr/c08899b11ee6105ca24d to your computer and use it in GitHub Desktop.
Fix vertical video
#!/usr/bin/env sh
# http://stackoverflow.com/a/30819570/187663
ffmpeg -i $1 -i $1 -filter_complex "[0:v]scale=-1:720[scaled_video];[1:v]scale=1280:720,boxblur=16[blur_image];[blur_image][scaled_video]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2[outv]" -c:v libx264 -aspect 1280/720 -map [outv] -map 0:a -c:a copy $1.fixed.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment