Last active
April 11, 2022 07:34
-
-
Save supahfunk/29fa07e7b86617954faa02fd76befffd to your computer and use it in GitHub Desktop.
Extract first frame from video and convert mp4 optimized for web with FFMPEG
This file contains hidden or 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
/*------------------------------ | |
Extract first frame from video | |
------------------------------*/ | |
ffmpeg -i input.mov -vf "select=eq(n\,0)" -q:v 3 output.jpg | |
/*------------------------------ | |
Convert video optimized for web | |
------------------------------*/ | |
ffmpeg -i input.mov -c:v libx264 -preset veryslow -pix_fmt yuv420p output.mp4 | |
/*------------------------------ | |
Convert video optimized for web | |
No Audio | |
------------------------------*/ | |
ffmpeg -i input.mov -c:v libx264 -preset veryslow -pix_fmt yuv420p -an output.mp4 | |
/*------------------------------ | |
Resize Video | |
------------------------------*/ | |
-vf scale=480:-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment