Home > ffmpeg, ubuntu > Installing libx264 and ffmpeg on Ubuntu 11.10 – 64 bits

Installing libx264 and ffmpeg on Ubuntu 11.10 – 64 bits

The main goal to compile and install libx264 and ffmpeg is try to make work vlc and ffmpeg at the same time.

First remove old installation

sudo apt-get remove ffmpeg x264 libx264-dev

Install all the packages you will need

sudo apt-get update
sudo apt-get install build-essential checkinstall git libfaac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev texi2html yasm zlib1g-dev

Install X264

Install x264 packages getting the source code using git
Install git with:

sudo apt-get install git
git clone git://git.videolan.org/x264
cd x264/
./configure --enable-shared
sudo make install

Install ffmpeg

Install ffmpeg packages getting the source code using git

git clone git://git.videolan.org/ffmpeg
cd ffmpeg/
./configure --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-ffplay --enable-shared --enable-gpl --enable-postproc --enable-version3 --enable-nonfree --enable-avfilter --enable-pthreads
sudo make install

Configure global variables:

export LD_LIBRARY_PATH=/usr/local/lib
sudo gedit /etc/ld.so.conf

//add this –> /usr/local/lib at the end of the file

sudo ldconfig
hash x264 ffmpeg ffplay ffprobe or
hash x264 ffmpeg ffprobe</p>
Categories: ffmpeg, ubuntu Tags: , , ,
  1. January 8th, 2012 at 14:49 | #1

    Works fine. Thank you. The only thing is that when I copied and pasted the commands from the article to terminal (lazy me) I had to change all [–] into [–]. Not a big problem really, unless for a complete newbie :)

  2. Guine
    January 18th, 2012 at 04:47 | #2

    Excellent sauf à l’étape de configuration de ffmpeg il faut mettre les options avec — et non –

    ./configure –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libfaac –enable-libmp3lame –enable-libtheora –enable-libvorbis –enable-libx264 –enable-libxvid –disable-ffplay –enable-shared –enable-gpl –enable-postproc –enable-version3 –enable-nonfree –enable-avfilter –enable-pthreads

  3. Fahad Khalil
  4. May 15th, 2013 at 23:14 | #4

    I am sorry I will check it out this weekend but one reason could be that ffmpeg is looking for libx264 with another name, perhaps you can create a lnk to your library installed with the name ffmpeg is looking for.

  5. June 7th, 2013 at 13:49 | #5

    I already installed ffmpeg and libx264 on Ubuntu 13.04 following the instructions from this post and everything worked fine for me. Did you remove both libraries first before installing ?

  6. January 21st, 2014 at 15:22 | #6

    Or, you can just add all those commands together and add && behind each command. Saves the waiting B)

  7. August 21st, 2014 at 15:21 | #7

    Hi, I have followed your tutorial, and it does intall a nice version of ffmpeg. But I had one issue. I have my nginx server executing commands. But now it can’t execute ffmpeg. The other version I had of ffmpeg, nginx could execute with no problem
    How can I solve this? Do u know?

  1. May 15th, 2013 at 06:54 | #1
  2. June 7th, 2013 at 13:32 | #2