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

[shredder12]$ ./configure

from within the FFmpeg source directory. When the configuration script finishes compile it by running make

[shredder12]$ 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.

2 Comments

Anon Linuxer (not verified)
June 24th, 2010 09:19 pm
If you build from source make sure you have yasm installed. It is required for much of the fast hand written assembly.
Pankajdangi (not verified)
October 27th, 2010 08:40 pm

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <img> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <p> <br>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.