Skip to Content

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 paramter, which must match our paramters (read below).

To the attention of packagers

Most GNU/Linux distributions ship with old versions of FFmpeg.

  • Kdenlive needs a recent version of FFmpeg. h264 and AVCHD are under constant development in 2008.
  • FFmpeg alone can decode mp2, mp3, mpeg2, mpeg4 and h264 streams. But FFmpeg needs additional libraries to encode into h264 video, AVCHD video, aac sound, mp3 sound, etc .. These formats are used daily in any resonable video project. For a complete list of FFmpeg parameters, enter ffmpeg -formats. E means encoding. D means decoding. In the previous page, we profide a list of needed libraries. Install them. Here, we provide the precise FFmpeg encoding options. Stick to our configation line. You will not gain anything trying to remove arguments and may break Kdenlive completely.

The "old school" of GNU/Linux is to provide FFmpeg usable only in decoding. Not encoding. These are deprecated practices. If you don't provide encoding features, users will leave your distribution for Debian-multimedi or other distros, which understand FFmeg better.

Compiling FFmpeg from sources

If your distribution does not provide a recent version of FFmpeg, it is recommended to compile FFmpeg from svn. 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 Kdenlive installation wizard.

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

Checkout ffmpeg from SVN:

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

Recommended compilation flags:

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

[Remark: on 64 bits platforms, yasm assembly code seems to work. So you may not disable mmx]

Then compile & install:

make sudo make install