Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus| # 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: | |
| 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 |