Last active
September 10, 2016 18:55
-
-
Save charliecm/af37b4ce38053fb5f6c5 to your computer and use it in GitHub Desktop.
Some video cropping snippets using ffmpeg.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Crop to 1240x768 (tablet) on retina screen | |
ffmpeg -i input.mp4 -filter:v "crop=2048:1536:256:32" output.mp4 | |
# Center video onto 1920x1080 canvas with white background | |
ffmpeg -i input.mov -vf "scale=min(iw*1080/ih\,1920):min(1080\,ih*1920/iw),pad=1920:1080:(1920-iw)/2:(1080-ih)/2:color=white" output.mov |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment