Created
October 21, 2020 21:14
-
-
Save alana314/5e884a3b8d2dc0ea6f27d000e796a8db to your computer and use it in GitHub Desktop.
Convert and Letterbox video to 1920x1080 29.97 fps with 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
#!/bin/bash | |
#convert to 1080 at 29.97fps | |
#useful for screen capture videos with odd aspect ratios and framerates | |
#modified from https://superuser.com/questions/891145/ffmpeg-upscale-and-letterbox-a-video | |
ffmpeg -i input.mov -vf "scale=(iw*sar)*min(1920/(iw*sar)\,1080/ih):ih*min(1920/(iw*sar)\,1080/ih), pad=1920:1080:(1920-iw*min(1920/iw\,1080/ih))/2:(1080-ih*min(1920/iw\,1080/ih))/2, fps=fps=29.97" output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment