Last active
February 6, 2019 11:33
-
-
Save steffenz/b353fd7de031d4b64a7f6251b31a08f2 to your computer and use it in GitHub Desktop.
Common commands for converting images, photos and videos for web.
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
# Converts video (2 pass) with 15 fps @ 500kbs without audio (ideal for web) - http://trac.ffmpeg.org/wiki/Encode/VP9 | |
# Run both lines | |
ffmpeg -i input.mp4 -framerate 15 -c:v libvpx-vp9 -b:v 500k -pass 1 -an -f webm /dev/null && \ | |
ffmpeg -i input.mp4 -framerate 15 -c:v libvpx-vp9 -b:v 500k -pass 2 -an output.webm | |
# Converts audio to OGG (96 kb/s) https://superuser.com/questions/1121334/how-to-use-ffmpeg-to-encode-ogg-audio-files | |
ffmpeg -i input.aif -c:a libvorbis -b:a 96k output.ogg | |
#Converts audio to MP3 (96 kb/s) https://trac.ffmpeg.org/wiki/Encode/MP3 | |
ffmpeg -i input.aif -c:a libmp3lame -b:a 96k output.mp3 | |
#Converting images to WEBP with quality set to 80 | |
cwebp -q 80 image.png -o image.webp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment