A video still created programmatically; thousands of these can be combined into video using the ffmpeg library – faster and cleaner than a clunky Final Cut project
UPDATE 2: I ran into an error trying to install ffmpeg using these instructions yesterday. However, installing using MacPorts worked like a charm! I suggest following the instructions for installing LAME first, then use MacPorts to install ffmpeg using the following command:
sudo port install ffmpeg
UPDATE: Having switched recently to Lion, the install below didn’t quite work. With a small tweak, it appears to be ok – see below for details.
Well, it might not be Lion (doing live musical performance with my laptop makes me leary of new operating systems) but after finding little recent info on installing ffmpeg on a Mac, I’ve put together this basic outline. For someone who isn’t great at installing libraries using Terminal, it wasn’t completely straightforward, but it works! You will need the Apple Developer Tools to make this work (so far as I can tell).
UPDATE: I did a fresh install of XCode and had to do one small addition to get everything to compile. For details, see this post.
This tutorial is based on the tutorial by Stephen Jungels, with some explanation and consolidation targeted at noobs (like myself). Definite hat tip, Stephen!
The basic steps are as follows, full details after the break:
- Install Git
- Download LAME
- Download ffmpeg
- Find or create folder to install to
- Install LAME
- Install ffmpeg
1. INSTALL GIT
This is suggested by ffmpeg as the easiest way to get the most recent version. Downloads as a compressed installer and runs really easy (like a normal program). This is by far the most simple part of the process :(
2. DOWNLOAD LAME
As suggested in the tutorial I followed, this will be necessary for mp3 support (and possibly mp4) so I added it – quite easy. Don’t install yet, just download it.
3. DOWNLOAD FFMPEG
You will download ffmpeg with Git using the command line. Open the Terminal (Applications > Utilities > Terminal)
- Move to your Desktop using the command:
- This changes directories (cd) so you will download ffmpeg to somewhere convenient
- Type the following command to download ffmpg:
1git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
- The download should begin – it may be a bit slow but should update you as it goes
4. FIND/CREATE THE FOLDER TO INSTALL FFPEG AND LAME TO
In my install, I had to create the appropriate folder to install the libraries.
- Look in:
- If there is a “scr” folder in the “local” folder, move the LAME folder there; if not, you will have to create it. My computer won’t let me make a folder there, so I made a folder titled “scr” on my desktop and copied it to the “local” folder.
- Copy the downloaded ffmpeg and LAME folders to the “src” folder
5. INSTALL LAME
Now that both the LAME and ffmpeg folders have been moved to the right place, it’s time to install them. This can be the most confusing part (I’ve found), so here we go. First we’ll install LAME so that ffmpeg can find it (and you can use it for other projects like exporting mp3s from Audacity).
- Type the following command into the Terminal window but DON’T hit return yet (note: there is a space after the “cd”):
- Then drag the LAME folder into the Terminal window – this is a shortcut that pastes the path. I find this really convenient for complicated paths to places on my computer I don’t use a lot. Hit return.
- Type this command to configure everything for installation:
- A lot of lines should run – wait for them to finish and type:
- When that’s done, type the final step:
1sudo make install
- You’ll likely have to type in your password, then LAME will install.
6. INSTALL FFMPEG
The last step, the slowest and most likely to cause errors, is to install ffmpeg.
- Move to the ffmpeg folder; type the following but DON’T hit return (like above, with a space after “cd”):
- Drage the ffmpeg folder into the Terminal window, hit return.
- For Snow Leopard: type the following command and be prepared to wait!
1./configure --enable-libmp3lame --enable-shared \ --disable-mmx --arch=x86_64
Stephan’s tutorial said that everything above is necessary and I found this to be true.
For Lion: type just the following:1./configure --disable-yasm
- When that’s done, type in (both OS versions):
… and wait some more.
- Finally, type in (both OS versions):
1sudo make install
Enter your password and let everything install.
That’s it! To test that everything worked right, type the following commands one at a time:
If either gives you an error, something went wrong. If you get some info about the library, you’re good to go! I’m using this to compile video files from stills created programmatically. I used the following tutorial by Gary Steele, which I will post about shortly – so far works great and is really fast.
Thoughts, suggestions, or problems? Please send me an email: mail [at] jeffreythompson [dot] org