Warning: A non-numeric value encountered in /homepages/10/d677520614/htdocs/ryanragle.com/wp-content/themes/Divi/functions.php on line 5560

So you don’t want to learn how to build 63 different pieces of software so you can finally use ffmpeg 0.6.1 for Mac OS X 10.6 to encode WEBM files for HTML5 compliant video heh? Well, hopefully these instructions will get you on the right path:

1. Install *Xcode 3.2.5 (4GB) and make sure you choose the “Install UNIX dev tools” option in the Xcode installer. To make sure mac ports and porticus work properly, be sure to install to the boot drive. I had a copy of Xcode on a secondary drive and would not work properly. To get access to Xcode you will have to register for a free Apple developer account.

2. Download and install Mac Ports for Snow Leopard (463 KB)

3. Open a terminal session. Make sure you have administrative privileges and type:


sudo port install ffmpeg

4. Wait about 30 minutes for the 63+ libraries to compile

5. Once all is finished in terminal, type ffmpeg to test. You should see something like the following:


FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan  3 2011 13:42:48 with gcc 4.2.1 (Apple Inc. build 5664)
  configuration: --prefix=/opt/local --enable-gpl --enable-postproc 
  --enable-swscale --enable-avfilter --enable-avfilter-lavf 
  --enable-libmp3lame --enable-libvorbis --enable-libtheora 
  --enable-libdirac --enable-libschroedinger --enable-libfaac 
  --enable-libfaad --enable-libxvid --enable-libx264 --enable-libvpx 
  --enable-libspeex --enable-nonfree --mandir=/opt/local/share/man 
  --enable-shared --enable-pthreads --disable-indevs 
  --cc=/usr/bin/gcc-4.2 --arch=x86_64
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     1.11. 0 /  1.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... 
{[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

Here’s an example of a two pass encode with Googles VP8 running on a MacPro 12 Core (watch your thread count lesser core users)


ffmpeg -i /your_directory/input.mov -vcodec libvpx -pass 1 
-passlogfile passfile -threads 24 -keyint_min 0 -skip_threshold 
0 -qmin 1 -qmax 51 -b 921600 -s 640x360 -aspect 16:9 -f rawvideo -y /dev/null

ffmpeg -i /your_directory/input.mov -vcodec libvpx -pass 2 
-passlogfile passfile -threads 24 -keyint_min 0 -skip_threshold 
0 -qmin 1 -qmax 51 -b 921600 -s 640x360 -aspect 16:9 -acodec 
libvorbis -y /your_directory/output.webm

Best of luck!

*Note – To make sure you don’t pull go mad, be sure have Xcode 3.2.5 installed and are not using Xcode 4 preview. As of this writing, it will not build correctly with ver 4 because libvpx relies on paths in /Developer/SDKs/ which now reside in a different directory with Xcode 4.