Skip to content

Instantly share code, notes, and snippets.

@veeramarni
Forked from cfr/devert
Created December 22, 2015 10:39
Show Gist options
  • Save veeramarni/e036049bda3edc857910 to your computer and use it in GitHub Desktop.
Save veeramarni/e036049bda3edc857910 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