Building FFMBC/FFMPEG on Mac OS X Lion
This is my site Written by rower on January 26, 2012 – 7:43 pm

FFMBC is the broadcast version of FFMPEG that transcodes HDV to Apple ProRes for Final Cut

By Robin Rowe

First step toward FFMBC is getting Xcode

First step toward FFMBC is getting Xcode

HOLLYWOOD, CA ( 2012/1/26 – If you have MTS or M2T files, that is, raw HDV, you can’t use them in Final Cut without converting them first to something Final Cut understands like Apple ProRes or XDCAM 50. Many editors are familiar with FFMPEG, a popular command-line transcoder. FFMBC is a version of FFMPEG that came out of the lab at the BBC. It’s designed for Linux, so it takes some extra effort to build it on Mac OS X.

About Mac OS X Lion… Before we jump into it, a couple user tips for those who are new to this OS. The Expose system is totally different from prior OS X versions. Use [Ctr][UpArrow] or [Ctrl][DownArrow] to access that.The [Fx] keys are gone. Another surprise, the mouse wheel scrolls the opposite direction from prior versions. These annoying changes are considered improvements by Apple, increases compatibility with iPhone devices.

  1. Download and install Xcode from the Apple App Store. While this is free, it requires registering with a valid credit card at the App Store, something I found very difficult. It said my credit card had an invalid code. My PayPal account worked no problem. In the past, logging in as an Apple Developer (free) was sufficient. Took me a lot longer the new way using the App Store app. When it finally did start downloading, App Store gave no indication at all what’s happening. You have to poke around to bring up the downloads window to see the progress bar. Be ready to take a break while you wait. The download is 2GB.
  2. Install Xcode. Once the download completes you’ll find this under Applications in Finder. Xcode launched on installation, but I can’t find it anywhere in Applications. Where is it? I don’t care. We only need Xcode to get the command-line tools like gcc.
  3. Download FFMBC.
  4. Open a Terminal and configure FFMBC with this magic from the Debian Linux build instructions: ./configure –enable-gpl –enable-nonfree –enable-shared –enable-postproc –enable-runtime-cpudetect –enable-frei0r –enable-libfaac –enable-libmp3lame –enable-libvpx –enable-libx264 –enable-pthreads –enable-libxvid –enable-zlib
  5. Configue will fail with error messages for missing libraries. Download and install: yasm, frei0r, faac, lame, libvpx, x264, xvidcore. When you get an error message you don’t understand, use ‘tail config.log’ to get more info.
  6. Installing x264 takes an extra whack… sudo make install-lib-dev sudo make install-lib-shared sudo make install-lib-static
  7. Building xvidcore is from a non-standard location…
  8. When you have the libraries built and installed, build and install FFMBC. You can use ‘ffmbc -format’ and ‘ffmbc -codecs’ to see what’s enabled. Depending on your needs, you may have other libraries to fetch and build to get the formats you use.
-rw-r--r--@ 1 rower  staff   4.3M Jan 13 12:00 FFmbc-0.7-rc5.tar.bz2
-rw-r--r--@ 1 rower  staff   519K Feb 10  2009 faac-1.28.tar.bz2
-rw-r--r--@ 1 rower  staff   5.8M Jan 26 09:05 lame-3.99.4.tar
-rw-r--r--@ 1 rower  staff   535K Jan 26 09:38 last_x264.tar.bz2
-rw-r--r--@ 1 rower  staff   1.2M Aug 15 14:13 libvpx-v0.9.7-p1.tar.bz2
-rw-r--r--@ 1 rower  staff   681K May 25  2011 xvidcore-1.3.2.tar.bz2
-rw-r--r--@ 1 rower  staff   9.4M Jan 26 08:47 yasm-1.2.0.tar


You need a magic recipe…

  1. Converting to MJPEG
    ffmbc -i $1 -vcodec mjpeg -b 100M -s 640×360 -acodec pcm_s16be
    cat *.m2t |ffmbc -i – -vcodec mjpeg -b 100M -s 640×360 -acodec pcm_s16be
  2. The How-To
  3. XDCAM Encoding (didn’t work for me)
  4. Video Conversion with FFMPEG
  5. HowTo FFMPEG

Shell Script

#ffmbc -i $1 -vcodec dnxhd -b 185M -acodec pcm_s16be *.m2t |ffmbc -i – -vcodec mjpeg -b 100M -s 640×360 -acodec pcm_s16be

cat *.m2t |ffmbc -i – -vcodec mjpeg -b 100M -s 640×360 -an ${NAME}.mov
cat *.m2t |ffmbc -i – -acodec copy ${NAME}.wav


  1. “error, audio timestamps difference is too big, cannot compensate a/v sync”
    Message when trying to convert gifts ep202-1 m2t to mjpeg . Workaround is to use -acodec copy file.wav to copy as mp2 stream in separate file with -ar on video file.
Posted in  

Leave a Reply

You must be logged in to post a comment.