Skip to content

Instantly share code, notes, and snippets.

@erikccoder
Last active January 27, 2016 01:28
Show Gist options
  • Save erikccoder/6699142 to your computer and use it in GitHub Desktop.
Save erikccoder/6699142 to your computer and use it in GitHub Desktop.
ffmpeg to html5 video.
http://johndyer.name/ffmpeg-settings-for-html5-codecs-h264mp4-theoraogg-vp8webm/
REM mp4 (H.264 / ACC)
ffmpeg -i %1 -b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30 -s 640x360 %1.mp4
REM webm (VP8 / Vorbis)
ffmpeg -i %1 -b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30 -s 640x360 %1.webm
REM ogv (Theora / Vorbis)
ffmpeg -i %1 -b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30 -s 640x360 %1.ogv
REM jpeg (screenshot at 10 seconds)
ffmpeg -i %1 -ss 00:10 -vframes 1 -r 1 -s 640x360 -f image2 %1.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment