These instructions let you generate ogg, webm and mp4 formats playable by all mayor borwsers:
If you are in a mac, I recommend you to install homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
With home brew you can easily install ffmpeg, but its important to install it with the codecs for ogg and webm: