Last active
November 28, 2017 19:49
-
-
Save KishCom/509560390eea730925ac to your computer and use it in GitHub Desktop.
FFMPEG settings for HTML5 video
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
#!/bin/bash | |
# get ffmpeg from this ppa: ppa:kirillshkrogalev/ffmpeg-next | |
# resize to 640x360 add flag to each: -s 640x360 | |
# -b:v 1500k == 1500kbps video | |
# -b:a 128k == 128kbps audio | |
# Convert to GIFs: http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
echo "mp4 (H.264 / ACC)" | |
ffmpeg -i $1 -b:v 1000k -vcodec libx264 -pix_fmt yuv420p $1.mp4 | |
echo " webm (VP8 / Vorbis)" | |
ffmpeg -i $1 -b:v 1500k -vcodec libvpx -acodec libvorbis -b:a 160000 -f webm -g 30 $1.webm | |
echo " ogv (Theora / Vorbis)" | |
ffmpeg -i $1 -b:v 1500k -vcodec libtheora -acodec libvorbis -b:a 160000 -g 30 $1.ogv | |
echo " jpeg (screenshot at 10 seconds)" | |
ffmpeg -i $1 -ss 00:10 -vframes 1 -r 1 -f image2 $1.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment