Created
January 16, 2025 15:06
-
-
Save catprisbrey/e34489a3499038c775b53ad0ed963926 to your computer and use it in GitHub Desktop.
FFMPEG convert and scale videos or GIFs to MP4
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
## Simple script i use to convert larger files or GIFs to smaller MP4s for using in BlueSky or Discord. | |
## Change the 'SOURCE' to whatever path to your file. And change 'EXPORT.mp4' to whatever you want the final file to be. | |
## The 'trunc(iw/2)' gives you control of scale. '/2' is half size, '/4' is quater size, etc. | |
ffmpeg -i SOURCE -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" EXPORT.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment