How to install / compile ffmpeg properly

We are mostly install the softwares via “Terminal” by “sudo spt-get install package_name” or by synaptic package manager.

The same way i will always used to install the packages which i need.

Recently i am using the ffmpeg lot. But its not giving me the output properly or not supporting some libraries.

I asked so many peoples why this happens. Then they said you have to compile the “ffmpeg” properly.

So, I asked them how to compile that. They replied, “Sorry i don’t know”.

Later I found the steps to compile and install the “ffmpeg” properly.

 

The steps are follows :

1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following

<code> sudo apt-get remove ffmpeg x264 libx264-dev </code>

2. Get all of the packages you will need to install FFmpeg and x264

<code> sudo apt-get update <code>

<code> 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 texi2html yasm zlib1g-dev </code>

3. Get the current source files, compile, and install x264.

<code> cd </code>

<code> git clone git://git.videolan.org/x264 </code>

<code>  cd x 264 </code>

<code> ./configure –enable-static </code>

<code> make </code>

<code> sudo checkinstall –pkgname=x264 –pkgversion=”3:$(./version.sh | \ awk -F'[” ]’ ‘/POINT/{print $4″+git”$5}’)” –backup=no –deldoc=yes \ –fstrans=no –default </code>

5. Get the most current source files, compile, and install FFmpeg.

<code> cd </code>

<code> git clone –depth 1 git://git.videolan.org/ffmpeg </code>

<code> cd ffmpeg </code>

./configure –enable-gpl –enable-libfaac –enable-libmp3lame –enable-libopencore-amrnb \ –enable-libopencore-amrwb –enable-libtheora –enable-libvorbis –enable-libx264 \ –enable-nonfree –enable-postproc –enable-version3 –enable-x11grab </code>

<code> make </code>

<code> sudo checkinstall –pkgname=ffmpeg –pkgversion=”5:$(date +%Y%m%d%H%M)-git” –backup=no \ –deldoc=yes –fstrans=no –default hash x264 ffmpeg ffplay ffprobe </code>

This will take some time to finish.

And finally your ffmpeg is compiled and installed properly.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: