That took some time to figure out… I’ve tried at least 6 different articles from the top Google results, none worked and most were outdated.

Anyways, no commitment here either, it worked for me, but I’m no Debian expert.. so use at your own risk.

First – Add the new multimedia packages –

Selec All Code:
1
 

Add the following lines:

Selec All Code:
1
 

Install all the dependancies and build tools –

Selec All Code:
1
 

Build and Install x264 –

Selec All Code:
1
 

Install libxavs

Selec All Code:
1
 

Build and Install FFMPEG

Selec All Code:
1
 

Install qt-faststart –

Selec All Code:
1
 

Add lavf support to x264 –

Selec All Code:
1
 

Finish by calling ldconfig.

Test by calling ffmpeg -version which should output something like below:

Selec All Code:
1
 
  • but wait, there’s more codecs to install 😉

    libvpx and LAME are two sides of the patent coin.http://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide

  • you can certainly compile many more codecs…
    btw – if you’d really like to go the easy way, don’t compile at all.. after adding the repos above, you can just call apt-get install ffmpeg

  • Blizzz_zzz

    What do you mean by calling idconfig?

  • Blizzz_zzz

    I do 
    /sbin/ldconfig -X -N

    But my ffmpeg still not working as i would

    here is my command:
    ffmpeg -i “source.mkv” -an -b 700k -r 25 -vcodec libx264 “output.mp4”

    i get an “unkow encoder : libx264”
    Any ideas?Thanks

  •  I have the same problem

  • Aspgraver

    Many thanks for the article, I also could not find a normal manual installation.

  • Christian

    Thanks for the tutorial 🙂 I found only outdated tutorials.

  • Lou L

    This guide is bad.
    * Development packages for x264 and ffmpeg are listed as dependencies
    although you are going to be compiling x264 and ffmpeg from source.

    * It installs stuff outside of the package management system.

    * ‘–enable-shared’ is used for almost everything for no apparent
    reason.

    * Several useless packages are installed (libfaad-dev) and some
    external libraries are very questionable as to their usefulness for
    the general public.

    * None of the many external libraries that are installed are actually
    enabled in the ffmpeg configure step! For example, to enable libx264 you need
    ‘–enable-gpl’ and ‘–enable-libx264’.A better option is to adapt:http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideHardy

  • Andry Kindler

     

    This blog post is excellent probably because of how well the
    subject was developped. I like some of the comments too though I would prefer
    we all stay on the suject in order add value to the subject!

    remote
    computer repair

  • @google-d74877a33438159b34453e6513bb8ff0:disqus – Thanks for the review and sharing your thoughts. You can see that from calling ffmpeg -version x264 and gpl are enabled along other things.
    My install guide above is merely my share of what worked for me, this is certainly not the officially recommended option by anyone. When writing this, I have tested with the link you provided (http://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuideHardy) , and have found it wasn’t enough for my case (Debian Squeeze).

    @google-dfe1af0774d1aba8b5a9751b43810d6e:disqus – thanks for the comment!  

  • Tango!

    Thanks! Worked like a charm!

  • aster1sk

    Add a `apt-get build-dep ffmpeg` in there to be sure all ffmpeg deps are satisfied.

  • yearisaday musicblog

    Hi Zohar,

    Thanks for these instructions. I just wanted to report that ffmpeg now (February 2013) requires yasm 1.2.0 and the apt repository still has 1.1.0, so I had to build yasm separately to then get ffmpeg to build.

    http://yasm.tortall.net/releases/Release1.2.0.html

  • Alex Benedek

    תודה כפרה עליך !!!!