How to compile ffmpeg extending the codec support on Ubuntu
Gutsy
The ffmpeg support of many codecs is disabled by default for legal
reasons (geographical variations in legislation regarding copyright,
license, patent, etc).
The Ubuntu package has only a limited part of the available codec
support. To extend it you must compile it yourself enabling specific
options.
It is your legal responsibility to make sure that the software you are
installing can be legally used in your country and for your intended
purpose.
To
compile a program from source code you need to use the command line. Instead of
clicking on icons you are going to talk to your computer writing words,
that are commands.
To run a command, open a terminal (Applications
-> Accessories
-> Terminal),
type the suggested command (copy by mouse highlighting and paste by
middle mouse button clicking) and press ENTER.
The
Source Code of ffmpeg is a multi-developer project. The Community
of developers use Subversion (SVN), a Version Control System for
managing multiple revisions of the code. The Source Code of ffmpeg is
in a svn repository.
To get a copy of the source code, you first need to install Subversion.
Make sure you have enabled the component called 'main' (Check: System -> Administration
-> Software
Sources)
sudo apt-get install subversion
To fetch the source code:
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk
ffmpeg
This
command downloads a copy of the source code of ffmpeg. It will appear
as a folder in your home directory (or
your current working directory) named ffmpeg.
You need some compilation tools installed. Type:
sudo apt-get install build-essential
You need also many codec libraries installed. Type:
sudo apt-get install liblame-dev libfaad2-dev
libfaac-dev libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libx264-dev
libdts-dev
Enter the ffmpeg
directory by typing:
cd ffmpeg
Then run:
./configure
--enable-gpl --enable-libvorbis --enable-libtheora
--enable-liba52 --enable-libmp3lame --enable-libfaad --enable-libfaac
--enable-libxvid --enable-pthreads --enable-libx264 --enable-shared
And:
make
You can now install ffmpeg. Type:
sudo make install
One last command:
sudo ldconfig
Raffaella
Traniello - last edited on 24 Mar 2008