How to install FFmpeg in Linux
In most of the distros, you can directly install ffmpeg from their repositories. But in case you are looking for installing the latest version or want to customize the installation, you might need direct installation from the source code too. I have discussed both of the methods in this howto. This will guide you to properly install ffmpeg on any of the Linux system.
Install FFmpeg in Ubuntu
Either click this link or run this command in the terminal to install FFmpeg.
[shredder12]$ sudo apt-get install ffmpeg
Install FFmpeg in Fedora
FFmpeg can be directly installed from the repos. Just run the following command.
[shredder12]$ su -c 'yum install ffmpeg'
Install FFmpeg in any Linux system from source
This howto will be helpful to all the linuxers who either want to have a fully customized installation of FFmpeg or are having some trouble in installing the default package from the distro repos or want to try the latest release.
First of all you will have to download the latest source from the main website. Now, untar it.
[shredder12]$ tar -xvjf ffmpeg-0.5.tar.bz2
Install FFmpeg with default options
once you are done with this, in order to install FFmpeg with the default config and options run
from within the FFmpeg source directory. When the configuration script finishes compile it by running make
If the compile finishes without any errors run 'make install' as root to install FFmpeg
[shredder12]$ su -c 'make install'
Install FFmpeg with customized settings
If you want to install FFmpeg by customizing some installation options then you can pass some special parameter while running configure script. Run the following command to find out various options available while running configure script.
[shredder12]$ ./configure --help
This will show you various options to customize the default installation. Most of the time the default installation will work for you but there is one option which most of us might need freqeuntly. It is
--enable-libmp3lame: This one is a must if you want to work with mp3. Encoding mp3 won't be possible without it.
Although in order to make this option work you will need lame installed. You will get the warning at the time of configuring it. This can be done by installing the library "libmp3lame". You can either install it directly from the repos.
[shredder12]$ sudo apt-get install libmp3lame0
or, you can install libmp3lame directly from the source from their website.
Once you are done with 'lame's' installation. this run configure again, if successful run 'make' and then 'make install ' as root.