Installing FFmpeg

Installing FFmpeg packages

Most distributions provide packages for FFmpeg. The required packages for MLT compilation are:

  • ffmpeg
  • libavformat, libavformat-dev
  • libavutil, libavutil-dev,
  • libswscale, libswscale-dev,
  • libavcodec, libavcodec-dev,
  • libavdevice, libavdevice-dev

After installation, type ffmpeg to view ffmpeg compilation parameter, which must match our parameters (read below).

Compiling FFmpeg from sources

If your distribution does not provide a recent version of FFmpeg, it is recommended to compile FFmpeg from git. However you must be very careful to remove your distribution packages before installing the compiled ones, or you may be in trouble. Also remove any file from the Kdenlive installation wizard if you used it.

Install the needed libraries and make sure yasm assemby code compiler is installed.

Note on Ubuntu 10.10: ffmpeg requires libx264 of at least version 1.0 which is not in the repositories yet as of Jan 2011. Please follow this guide instead to install ffmpeg with H.264 support.

1. Get the source

Check out the ffmpeg source code from git into a new directory (called ffmpeg):

git clone git://
cd ffmpeg

(If you get an error message that git cannot be found, you need to install the package git.)

Alternatively, you can use the new Libav:

git clone git://
cd libav

2. Configure ffmpeg

To configure ffmpeg with the recommended compilation flags (determine which formats can be encoded etc.):

./configure --prefix=/usr --enable-shared --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-x11grab --enable-libgsm --enable-libx264 --enable-libtheora --enable-libdc1394 --enable-nonfree --disable-stripping --enable-avfilter --enable-libschroedinger --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3

It is possible that you get some error messages here, like ERROR: libopencore_amrwb not found. In this case check whether the according library is really installed. If you cannot install it, delete the flag (in this case it would be --enable-libopencore-amrwb) from the above command and execute it again.

3. Compile and install ffmpeg

To compile and install ffmpeg, execute the following commands (still from the same directory):

make -j3
sudo make install

Compiling will take some time (possibly several minutes). After ffmpeg is installed you are ready to continue with MLT or, if desired, frei0r.

4. Optional: Updating ffmpeg

After some days/weeks you want to update your self-compiled copy of ffmpeg. To do so, first update the source code by running:

cd ffmpeg
git pull

Then run

make clean

to get rid of previously compiled files and continue with steps 2 and 3.