Last active
December 26, 2015 05:49
-
-
Save am11/7103164 to your computer and use it in GitHub Desktop.
Convert video files for HTML5 with FFMPEG :: Windows and Linux
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
/* Starting with avi file "moh.avi" .. could be any video format */ | |
ffmpeg -i moh.avi -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 moh.mp4 // IE, Opera, Chrome, Safari | |
(OR) | |
ffmpeg -i moh.avi -b 1500k -ab 128k -ac 2 -vcodec libx264 -preset slow -crf 22 -threads 0 -profile:v main moh.avi | |
ffmpeg -i moh.avi -b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30 moh.ogv // Firefox | |
ffmpeg -i moh.avi -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 moh.webm // Chrome | |
/* Poster image */ | |
ffmpeg -i moh.avi -r 1 -f image2 image-%3d.jpeg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment