Frank van Wensveen Frank van Wensveen - 2 months ago 28
Linux Question

Updating ffmpeg on Ubuntu 12.04; conflicts with old version from standard repository

I have never used ffmpeg on my Ubuntu Linux 12.04 (Precise Pangolin) box until now. Typing 'ffmpeg' at the command prompt revealed that ffmpeg 0.8.17 (listed as ffmpeg 0.8.17-4:0.8.17-0ubuntu0.12.04.2) was installed. Seeing as I need to convert h.265 to h.264, an update was obviously required.

Following posted instructions, I installed a ream of packages:

$ sudo apt-get install faad libmp4v2-dev libfaac0 libfaac-dev
libxvidcore4 libxvidcore4-dev liba52-0.7.4 liba52-0.7.4-dev libx264-dev
libgsm-tools libogg-dev libtheora-bin libfaad-dev libvorbis-dev
libtheora-dev libdts-dev git-core yasm texi2html checkinstall

followed by

$ sudo apt-get purge ffmpeg

in order to get rid of the old stuff from the original repo.

Downloaded the latest ffmpeg, and a ."/configure; make; sudo make install" later, I should be in business.

Except that typing 'ffmpeg' at the prompt still fired up the old version. A quick look revealed that the old ffmpeg binary was still sitting in /usr/bin with the new one being installed in /usr/local/bin. But ffmpeg is no longer listed as an installed package, and sudo apt-get remove ffmpeg tells me that "Package ffmpeg is not installed, so not removed".

Running /usr/local/bin/ffmpeg directly works, however then fails in an Unknown encoder 'libx264' error. Which is puzzling because the package libx264-120 is installed and /usr/lib/i386-linux-gnu/ (with the appropriate symlink to /usr/lib/i386-linux-gnu/ does exist.

Maybe I've been looking at this for too long, because I'm sure this is a simple issue but I just can't see it.

Can someone please hand me the stupid had and point out why I deserve to wear it?



You should find out which package provides this old binary in /usr/bin by running

dpkg -S /usr/bin/ffmpeg

Then remove that package in turn.

Note that if that file is a symlink, esp. to /etc/alternatives, you should follow the trail of symlinks and then run the above command on the actual binary.