Convert Video Files Into Webm Ogv Mp4 Free Using Ffmpeg

Hi All,

This will be a very quick post more as a reference for use to revert back to when needed, recently we had to convert a video into three format webm, ogv and mp4. There are many options out there but some added annoying watermarks on our videos which is fine and we would pay for the software of course but this is just a one off.

So lets open up terminal and install brew. http://brew.sh/

Really simple just paste the following into terminal.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Now install ffmpeg https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265

You now have a seriously powerful video editing command line interface at your fingertips now all you need to do is run the following command to encode your video to all formats.

ffmpeg -i f-video.mp4 -c:v libvpx -minrate 1M -maxrate 1M -b:v 1M -c:a libvorbis output.webm && ffmpeg -i video.mp4  -codec:v libtheora -qscale:v 7 -codec:a libvorbis -qscale:a 5 output.ogv