Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?
share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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?

share|improve this answer
    
Very Informative, Thank you. –  jsp99 Sep 14 '13 at 5:04
    
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. –  LordNeckbeard 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
    
I figured it out, thanks for your help. –  jsp99 Sep 15 '13 at 8:12
show 3 more comments

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).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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