Skip to content

Instantly share code, notes, and snippets.

@EaredSeal
Last active June 1, 2016 12:22
Show Gist options
  • Select an option

  • Save EaredSeal/137679e02dbe6f01855a4a377b98d7df to your computer and use it in GitHub Desktop.

Select an option

Save EaredSeal/137679e02dbe6f01855a4a377b98d7df to your computer and use it in GitHub Desktop.
Convert mp4 to ogv and/or WebM
# Convert mp4 video to ogv and/or WebM
# Browser support:
# http://caniuse.com/#search=mp4
# http://caniuse.com/#search=ogv
# http://caniuse.com/#search=webm
# Installation macos:
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with- --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools
# Installation debian:
sudo apt-get install ffmpeg frei0r-plugins rtmpdump speex
# Usage: mp4 to ogv
ffmpeg -i input.mp4 -q:v 10 -c:v libtheora -c:a libvorbis output.ogv
# Usage: mp4 to WebM
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 10 -b:v 1000k -c:a libvorbis output.webm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment