Skip to content
Aug 23 / Mark

Installing ffmpeg (all versions) on debian squeeze and newer

Debian

There are currently 5 active ffmpeg release versions 0.7.x up to 0.11.x. This document describes how to install these versions. I’ll leave you with a system ready for you to pick a version you need/want and tell you how to install them. All versions are as complete as possible AND containing nearly all supported codecs.


Add the following to your /etc/apt/sources.list:

deb http://deb-multimedia.org squeeze main non-free
deb-src http://deb-multimedia.org squeeze main non-free
deb http://backports.debian.org/debian-backports squeeze-backports main

and run the command:

apt-get update

You will get an error about a missing signature, install it and update package list with:

apt-get -y --force-yes install deb-multimedia-keyring; apt-get update

Now install these packages:

apt-get install subversion unzip frei0r-plugins-dev libdc1394-22-dev libfaac-dev \
    libmp3lame-dev libx264-dev libdirac-dev libxvidcore4-dev libfreetype6-dev \
    libvorbis-dev libgsm1-dev libopencore-amrnb-dev libopencore-amrwb-dev \
    libopenjpeg-dev librtmp-dev libschroedinger-dev libspeex-dev libtheora-dev \
    libva-dev libvpx-dev libvo-amrwbenc-dev libvo-aacenc-dev libaacplus-dev libbz2-dev \
    libgnutls-dev libssl-dev libopenal-dev libv4l-dev libpulse-dev libmodplug-dev \
    libass-dev libcdio-dev libcdio-cdda-dev libcdio-paranoia-dev libvdpau-dev \
    libxfixes-dev libxext-dev libbluray-dev

Install libutvideo manually with:

cd /usr/src
wget http://umezawa.dyndns.info/archive/utvideo/utvideo-11.1.1-src.zip
unzip utvideo-11.1.1-src.zip
cd utvideo-11.1.1
make
make install

Install libxavs manually with:

svn co https://svn.code.sf.net/p/xavs/code/trunk xavs
cd xavs
./configure --enable-shared --disable-asm
make
make install

Download the ffmpeg version you prefer here and unpack it with

tar zxf ffmpeg-0.x.x.tar.gz

Now for the default configure and make stuff, start with the configure string below and add the options according to the chosen version:
All versions:

./configure --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads \
    --enable-x11grab --enable-swscale --enable-version3 --enable-shared --disable-yasm \
    --enable-filter=movie --enable-frei0r --enable-libdc1394 --enable-libfaac \
    --enable-libmp3lame --enable-libx264 --enable-libdirac --enable-libxvid \
    --enable-libfreetype --enable-libvorbis --enable-libgsm --enable-libopencore-amrnb \
    --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp \
    --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvpx \
    --enable-libvo-amrwbenc --enable-libvo-aacenc --enable-libaacplus --enable-libxavs \
    --enable-bzlib

If you’re installing version 0.9, 0.10 or 0.11, add:

--enable-openssl --enable-gnutls --enable-openal --enable-libutvideo --enable-libv4l2 \
--enable-libpulse --enable-libmodplug --enable-libass --enable-libcdio --enable-vdpau

If you’re installing version 0.11:

--enable-libbluray

If you’re installing version 0.11, remove:

--enable-libdirac
make
make install
ldconfig

ffmpeg is now installed.

All done!

This watermark example will put the image “logo.png” in the left top corner of the video (with a 10pixel padding at the top and at left side):

ffmpeg -sameq -i movie.flv -vf "movie=logo.png [logo]; [in][logo] overlay=10:10 [out]" movie.avi

14 Comments

leave a comment
  1. Chris / Sep 26 2012

    The bookmark to this post has saved me many a times doing installs. Thanks for keeping it up to date. It’s pretty much the ONLY post out there that actually has the install method for installing ffmpeg w/ squeeze with all the libraries needed.

    • Mark / Sep 27 2012

      You are welcome! I made it because of the fact that there wasn’t indeed a good page on the net that described an ffmpeg install with all “bells and whistles”. I’m glad you like it. I will keep it up to date of course.

  2. hjgode / Sep 29 2012

    Sorry, did not work for me with ffmpeg 0.11.2. Make gave error:

    libavcodec/libavcodec.so: undefined reference to `x264_encoder_open_128′

    As
    nm /usr/local/lib/libx264.a |grep x264_encoder_open
    says correct
    00003450 T x264_encoder_open_128

    Now I tried with:

    export LD_LIBARY_PATH=/usr/local/lib

    according to http://www.linuxquestions.org/questions/linux-newbie-8/problem-with-enable-libx264-option-in-ffmpeg-822156/page2.html

    But it still fails to compile.
    Then I tried againas root:
    >make distclean
    >export LDFLAGS=”-rpath /usr/local/lib “$LDFLAGS
    >./configure ……

    and it was unable to determine gcc.

    Giving up

    ~Josef

    • Mark / Oct 1 2012

      Don’t just give up like that!
      That thread is 2 years old! I’m guessing you have installed (or not cleaned up properly) and older version of libx264. Make sure you have only 1 libx264 installed, as they say in the thread, if it finds multiple, it’ll grab the first one. Sometimes an old / incorrect symlink to the wrong .so can cause these problems. libx264.a might look good, but check the .so.

      So double check your libx264 .so files and try again!

      Good luck,
      Mark

  3. David / Sep 29 2012

    Hi. Im french, so sorry for my bad english.

    This tutorial is awesome and it worked perfectly with ffmpeg 0.11.

    I just see that yesterday, ffmpeg 1.0 was released. How can I update from 0.11 to 1.0 ?

    Another question :
    What is utvideo and libxavs for ? Does ffmpeg need this ? Is there any update for this two packages ? And why does not ffmpeg install it automaticaly ?

    Thank in advance for keeping this post up to date. I am beginner with debian and it helped me a lot.

    • Mark / Oct 1 2012

      Hi David,

      Before you install ffmpeg 1.0 you can go to the source directory of the older ffmpeg you currently have installed and type “make uninstall”. All older ffmpeg binaries etc will be removed from your system and you can install ffmpeg 1.0.

      Mark

  4. Florian / May 23 2013

    Thanks very much! I was searching 2 hours for install ffmpeg on Debian with libx264 and this is the only tutorial that works!

    • Mark / May 23 2013

      You’re welcome! The how-to is a bit old, but it still works fine (Trying to find time to keep it up-to-date). Glad to hear it’s still working! The reason I made this was that I have searched high and low on the net for a plain and simple way to setup ffmpeg without to much hassle.

      Mark

  5. Wally / Jun 7 2013

    Hi,

    I’m trying to get this to work on Debian Wheezy but I get the following error and than nothing of the packages is installed.

    The following packages have unmet dependencies:
    libxvidcore4-dev : Depends: libxvidcore4 (= 2:1.2.2-0.1) but 2:1.3.2-9 is to be installed
    E: Unable to correct problems, you have held broken packages.

    I’ve tried -f, –force didn’t made a difference

    • Mark / Jun 11 2013

      There’s a naming issue within both repositories.
      A: libxvidcore4-dev and libxvidcore4 (2:1.2.2-0.1) are in deb-multimedia.org repo.
      B: libxvidcore-dev and libxvidcore4 (2:1.3.2-9) are in packages.debian.org repo.
      The it wants to install one packages from repo A and the other from repo B. You can force downloading from a certain repo with the -t option for apt-get. Like so: apt-get install -t deb-multimedia libxvidcore4-dev libxvidcore4

  6. Ace / Dec 21 2013

    So I’ve been trying to install ffmpeg and handbrake-cli and I found your guide. When I try to install:

    OMVNas:/$ sudo apt-get install subversion unzip frei0r-plugins-dev libdc1394-22-dev libfaac-dev libmp3lame-dev libx264-dev libdirac-dev libxvidcore4-dev libfreetype6-dev libvorbis-dev libgsm1-dev libopencore-amrnb-dev libopencore-amrwb-dev libopenjpeg-dev librtmp-dev libschroedinger-dev libspeex-dev libtheora-dev libva-dev libvpx-dev libvo-amrwbenc-dev libvo-aacenc-dev libaacplus-dev libbz2-dev libgnutls-dev libssl-dev libopenal-dev libv4l-dev libpulse-dev libmodplug-dev libass-dev libcdio-dev libcdio-cdda-dev libcdio-paranoia-dev libvdpau-dev libxfixes-dev libxext-dev libbluray-dev

    It starts to install:

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    subversion is already the newest version.
    unzip is already the newest version.

    But then I get the same errors that I’ve been getting for hours now…

    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    libaacplus-dev : Depends: libaacplus2 (= 2.0.2-dmo1) but it is not going to be installed
    libfaac-dev : Depends: libfaac0 (= 1:1.28-dmo3) but 1.28-0.3 is to be installed
    libmp3lame-dev : Depends: libmp3lame0 (= 1:3.99.5-dmo2) but 3.98.4-0.0 is to be installed
    libx264-dev : Depends: libx264-135 (= 3:0.135.2345+gitf0c1c53-dmo1) but it is not going to be installed
    libxvidcore4-dev : Depends: libxvidcore4 (= 2:1.2.2-0.1) but it is not going to be installed
    E: Broken packages

    • Mark / Dec 21 2013

      Hey!

      I guess dmo removed the dependencies or something because normally, the dependency would install the (f.e. libaacplus2) package as well.
      Just add the missing packages to the install command. Copy paste mine from the post, then add “libaacplus2 libfaac0 … etc”
      That should do the trick.

  7. Hubert / Feb 18 2014

    XAVS repository has moved.

    svn: Dépôt definitivement déplacé en ‘https://svn.code.sf.net/p/xavs/code/trunk’  ; merci de relocaliser

    Install libxavs manually with:
    svn co https://svn.code.sf.net/p/xavs/code/trunk xavs
    cd xavs
    ./configure –enable-shared –disable-asm
    make
    make install

    Many thanks for your help !

    • Mark / Mar 20 2014

      Thanks Hubert, I’ve changed the svn url

Leave a Comment

*