How to install ffmpeg + Extras on Ubuntu

Status
Not open for further replies.

showstopper

Active Member
151
2010
1
0
FFmpeg installation


sudo apt-get install gcc libgd2-xpm-dev gettext libfreetype6 libfreetype6-dev libpng12-dev libstdc++6-4.4-dev libtiff5-dev libtool libxml2 libxml2-dev automake autoconf libncurses5-dev patch make git subversion build-essential checkinstall



sudo apt-get install libwmf-dev ruby flvtool2 libmp3lame-dev libogg-dev libvorbis-dev vorbis-tools libtheora-dev libtheora-dev libopencore-amrnb-dev libopencore-amrwb-dev liba52-0.7.4-dev libfaac-dev libfaad-dev yasm nasm libxvidcore-dev libx264-dev re2c mplayer gpac



wget http://www.ffmpeg.org/releases/ffmpeg-0.6.tar.gz
tar -xzf ffmpeg-0.6.tar.gz
cd ffmpeg-0.6/
sudo ldconfig
./configure –prefix=/usr/local/ffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-decoder=liba52 --enable-libopencore-amrwb --enable-libfaac –enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-version3
sudo make
sudo make tools/qt-faststart
sudo make install
sudo cp -vf tools/qt-faststart /usr/local/ffmpeg/bin/
sudo ln -sf /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/ffmpeg
sudo ln -sf /usr/local/ffmpeg/bin/ffmpeg /usr/bin/ffmpeg
sudo ln -sf /usr/local/ffmpeg/bin/qt-faststart /usr/local/bin/qt-faststart
sudo ln -sf /usr/local/ffmpeg/bin/qt-faststart /usr/bin/qt-faststart
sudo export LD_LIBRARY_PATH=/usr/local/ffmpeg/lib/
sudo ldconfig -v
/usr/bin/ffmpeg -formats

This part was then from a guide on how to Create Your Own Video Sharing Site Powered By ClipBucket
 
Last edited:
7 comments
There is actually a slightly faster way to install ffmpeg + the proprietary codecs like x264 that don't come with plain old apt-get install ffmpeg.

This method uses git to clone the installation files from the ffmpeg.org and yasm, make, & build-essentail to seamlessly compile ffmpeg.

It and has worked for me without any issue on 6 of my Ubuntu 12.04LTS Servers. Just for kicks I spun up a fresh Ubuntu 12.04LTS VM and ran these commands to be 100% sure that I wasn't leaving anything out so this should work for any Ubuntu 12.04LTS, 12.10, or 13.04 system:

Code:
apt-get install git yasm make build-essential -y; git clone git://source.ffmpeg.org/ffmpeg.git;cd ffmpeg/; ./configure; make; make install;

After a couple minutes, when it completes if you want to confirm that it compiled correctly with the codecs that you need, then you can run the command:
Code:
ffmpeg -codecs
And if you wanna check on a specific codec from the list, such as 264:
Code:
ffmpeg -codecs | grep 264

... And to think I used to go through all the hassle to reach pretty much the same result as single lines of code above provide by manually compiling each component as instructed in this guide: UbuntuCompilationGuide ? FFmpeg
 
Status
Not open for further replies.
Back
Top