I am about to install FFmpeg 2.0.1 (the latest version) in my Ubuntu. I already have the older dev libraries installed in my system. In the previous installation, I didn't build them from source. I used "Synaptic Package Manager".
Can anyone help me with the following problems:

  1. Why does the Synaptic Package Manager not show the latest versions, so that I can easily update to them? Can I do something to fix it?
  2. How can I find the version of the libraries that are already installed on my system? (I know for sure that it is an older version, but I want to know the version number).
  3. I am trying to delete the older version ENTIRELY and again install the new libraries from source. Can anyone help me with this?

Why does the Synaptic Package Manager not show the latest versions?

From Ubuntu Wiki – Stable Release Updates:

Once an Ubuntu release has been completed and published, updates for it are only released under certain circumstances, and must follow a special procedure called a "stable release update" or SRU.

This means that packages are often not kept up-to-date with active upstream sources.

Can I do something to fix it?

You can compile and install your own recent version of ffmpeg and its libraries by following a step-by-step guide: Compile FFmpeg on Ubuntu, Debian, or Mint. This guide performs a local installation, so it will not interfere with repository packages or system files, but if you are compiling something that depends on the new libraries you may have to tell it where your new ffmpeg libraries are located.

If you are compiling many programs, or need several more recent packages than what is provided, then Ubuntu may not be the most efficient distro for you in the long run.

How can I find the version of the libraries that are already installed on my system?

The major version is present in the package name, such as libavcodec53.

I am trying to delete the older version ENTIRELY and again install the new libraries from source.

If you want to perform a system installation that replaces the ffmpeg or libav-tools package and/or libraries then you can simply remove the existing packages, then compile ffmpeg, then install to system with checkinstall or some other method. See this old version of the previously mentioned guide that does all of that, but be aware that it is outdated and at the very least you may have to add --extra-libs=-ldl to your ffmpeg configure line.

If you want to perform a local installation then follow the current version of the compile guide.

Misleading package names

You should be aware that the so-called "ffmpeg" from the repository is not actually from FFmpeg, but from a fork called libav. See Who can tell me the difference and relation between ffmpeg, libav, and avconv?

  • The installation process is making a local installation of a static ffmpeg library. Can u mention a way to make it dynamic and also to add the .so file's path to LD_LIBRARY_PATH ? I am not familiar with the terminal commands. – jsp99 Sep 14 '13 at 18:07
  • @jsp99 Sorry, but I never build as shared. Refer to ./configure --help for each program. – llogan Sep 14 '13 at 23:04
  • I just installed Geany and am trying to figure out how to set the "Build commands" so that it recognises the FFmpeg library and gives me "a.out". Can you help in any way? Thanks :) – jsp99 Sep 15 '13 at 6:21
  • But how do I know where my new ffmpeg libraries are located and tell it the other software I'm compiling? I would even go as far as downloading the latest source and compile it as shown in the guide, but my very problem is that even if it makes and installs the Debian package, 'ffmpeg' command is not accessible from the command line and the other software I'm compiling doesn't see the new libraries. – Nickolai Leschov Nov 27 '13 at 20:46
  • @NickolaiLeschov The guide does not install a debian package and it does not install anything to the system. If the new, compiled ffmpeg is not accessible from the command line then you probably need to run . ~/.profile. – llogan Nov 27 '13 at 21:41

This answer is to help newbies install the latest development libraries of FFmpeg and to WORK with them. I came to know it the hard way, that installing a development library is just the beginning. The real difficult part is to compile (with appropriate flags) and make an executable (successfully!) out of the source file.

The procedure in the above link is pretty straightforward (though it is lengthy and a little time consuming). You have to copy the commands and paste them in your terminal.

  • The above procedure creates a local installation of the FFmpeg library. It is a static library. By local installation I mean that the system doesn't know anything about the library.

The information about types of libraries and how to use them can be found with the help of Google. This is enough to get you started : Types of Libraries. You can skip reading it if you are just concerned about getting the compilation of the source code using the libraries done.

  • Now, this is the tough part. I had to try for hours, to get this part right. You need to let the compiler know about your FFmpeg library. You actually do that in the next step while giving it appropriate flags. But you need to do some preparations before the next step.

Copy all the .pc files from /home/jsp99/ffmpeg_build/lib/pkgconfig and paste them into /usr/local/lib/pkgconfig

Since copying and pasting in Ubuntu is not so easy, follow this link for instructions.

  • To actually compile the source code and form an executable, type this command in the terminal :

gcc -Wall -o module1.out -I/home/jsp99/ffmpeg_build/include -L/home/jsp99/ffmpeg_build/lib module1.c $(pkg-config --cflags --libs libavformat libavcodec libswscale)

/home/jsp99 is current user's home folder.
module1.c is the name of my source file.
module1.out is the name of the exectable file (output).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.