Archive for January, 2008

Installing FFMPEG

Friday, January 25th, 2008

I’ve cobbled together a rough guide to installing FFMPEG on Ubuntu – hope this is of some help.

1. Download the source code tarball for the LAME mp3 codec from SourceForge
2. Extract the source using

tar -xzvf lame-3.97.tar.gz
cd lame-3.97

3. Compile and install LAME

./configure && make && sudo make install
cd ..

4. If you don’t have subversion installed, install it now:

sudo apt-get install subversion

5. Export the latest FFMPEG souce from the subversion repository at mplayerhq.

svn export svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

6. Install the libfaac, libfaac-dev, libfaad2 and libfaad2-dev packages for your distro.

sudo apt-get install faac faad libfaac-dev libfaad2-0 libfaad2-dev

7. Create a temporary folder and set the TMPDIR environment variable to point to it

mkdir ~/tmp
export TMPDIR=~/tmp

8. Compile and install FFMPEG

cd ffmpeg
./configure --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-gpl
make && sudo make install

9. Run FFMPEG to check for any errors

ffmpeg --help

10. If FFMPEG complains about not being able to load shared libraries, you’ll need to add the path “/usr/local/lib” to the file “/etc/ld.so.conf”, and run ldconfig:

sudo /sbin/ldconfig

That’s it. Hopefully you’ll have FFMPEG up and running in less than 5 minutes. Note that there are plenty of options you can add to the “./configure” command in step 8. Use whatever suits your needs.

I have installed FFMPEG on Ubuntu 6.10, 7.04 and RHEL4 using the instructions above. Please remember I am not an FFMPEG expert, or in anyway affiliated with the FFMPEG project.