305

I tried to install ffmpeg in trusty/Ubuntu 14.04 and got the following message:

$sudo apt-get install ffmpeg

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ffmpeg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'ffmpeg' has no installation candidate

Why isn't the package available?

Braiam
  • 67,791
  • 32
  • 179
  • 269
user254877
  • 3,061
  • 2
  • 13
  • 6
  • 1
    What is the output of: apt-cache search ffmpeg | grep "ffmpeg" If you don't see ffmpeg in the list of returned results, then something has gone wrong with your repo manager. For now, I'd suggest installing by building from source. Download from here. – wyas Mar 11 '14 at 05:17
  • 2
    Note that as of 2018, avconv is not in ffmpeg, and libav-tools is not in the Ubuntu repository! – Owl Jun 14 '18 at 22:34

10 Answers10

263

Latest news


FFmpeg and libav

libav from the Ubuntu repositories

Ubuntu started shipping the libav fork instead of FFmpeg in recent releases. If you installed the ffmpeg package, then you actually installed the libav-tools package and a program that told you to use avconv instead of ffmpeg in the future, giving the impression that ffmpeg is deprecated, which it is not.

The transitional ffmpeg package seems to have been removed from trusty/Ubuntu 14.04 (compare the package files listing for saucy and trusty of the source package).

So one option is to install the libav-tools package and use avconv instead (NB that this is not "mainline" FFmpeg but a prominent fork instead).

FFmpeg from a PPA on Launchpad

Another option is to use a PPA that provides FFmpeg. Please have a look at the FFmpeg download page for details of available PPAs and packages. You should check individual PPAs every once in a while if they are still up to date.

Related questions:

Install from source

Another option is to install FFmpeg dependency packages, then manually compile+install it from source.

Use static builds

While it may look a bit awkward from the packaging perspective, you could also use any static build from trusted sources. In my case I keep FFmpeg Windows 32-Bit and 64-Bit binaries along with x264-10-Bit binaries in a folder to run them in Wine or Windows whenever I need to.


The following is what I could find, when researching this topic. I haven't been following the development of both projects closely and it is not my intention to blame anyone. You as a reader shouldn't do either.

How did the fork happen?

Wikipedia states that the forked project as well as the initial release were announced on March 13th 2011, however there is a bit more that was going on.

Digging through Git commits

Official announcements on libav.org

The following posts are from the news section (with the oldest in last):

August 09 2011

Updated on 12.09.2011.

For consistency with our new name we have renamed ffplay to avplay, ffserver to avserver and ffprobe to avprobe. Their behavior is the same, just the names were changed.

With ffmpeg (the command line tool) we decided to use this opportunity to fix some longstanding usability problems, which involves breaking compatibility. Therefore we have added a new tool named avconv which is based on ffmpeg, but has a different (hopefully more powerful and easier to use) syntax for some options. ffmpeg will be kept in its current state for some time, so no scripts or frontends using it will break. However it will not be developed further.

Differences between avconv and ffmpeg are:

[...]

Note that the avconv interface is not considered stable yet. More incompatible changes may come in the following weeks. We will announce here when avconv is stable.

And earlier in 2011:

Mar 18, 2011

We have just pushed another point release from our 0.6 release branch: Libav 0.6.2. This is another maintenance-only release addressing two security issues.

From now on, we will be using our new project name libav. But don't worry, compared to the preceding release 0.6.1, the only functional changes are the two security fixes for the VC1 and APE decoders. This means that libav provides a painless drop-in replacement for existing FFmpeg installations.

Moreover, we are proud to accompany this source release with executables and libraries for the win32 platform. These binaries include H.264 encoding using the bundled x264 library. Enjoy!

Distributors and system integrators are encouraged to update and share their patches against our release branches.

Mar 17, 2011

We have just pushed another point release from our 0.5 release branch: FFmpeg 0.5.4. This is another maintenance-only release that addresses a number of security issues.

Distributors and system integrators are encouraged to update and share their patches against our release branches.

March 13, 2011

We, as a group of FFmpeg developers, have decided to continue developing FFmpeg under the name Libav. All existing infrastructure will be transferred to the libav.org domain.

You can update your git repository using the following command:

git remote set-url origin 'git://git.libav.org/libav'

For now we are still reachable over FFmpeg's mailing lists and IRC channels but we will migrate to libav.org counterparts. For a transition period both the website and source might still contain references to FFmpeg. These will disappear over time, except where historically relevant.

February 24, 2011

FFmpeg development has moved to Git, and the SVN repository is no longer updated. The SVN repository may be removed in a near future, so you're recommended to use a Git repository instead.

The last revision committed to SVN was r26402 on 2011-01-19 and replaced the svn:external libswscale with a standalone copy.

Note that FFmpeg development has in fact moved to a Git repository by now and that there are two Git repositories. See the corresponding projects download page.

LiveWireBT
  • 28,763
  • When did this change happen? – Seth Apr 04 '14 at 01:47
  • @Seth Do you mean shipping of libav instead of FFmpeg or dropping of the transitional package? I found a mail that points to a Team Report from the Technical Board and and also added a link to the source package on launchpad where one can compare the saucy and trusty package listings, but I don't know the details. – LiveWireBT Apr 04 '14 at 02:33
  • I was referring to dropping the package, although I'm interested in the time-frames for both if possible. – Seth Apr 04 '14 at 02:35
  • 3
    I might move the how to install ffmpeg from ppa to the end. As a "If you're really in to swimming against the tide, and you already read all these things... then you can do this." Instead of putting it all the way at the front. Like, encourage using things that are in main/uni/multi if you can avoid PPAs. – RobotHumans Apr 04 '14 at 20:58
  • @Seth I just added what I could find by digging through libav's git tree and what they published as news on the project page. Some mails from the FFmpeg mailing list seem to have been removed (e.g. http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2011-January/103440.html). This answer may now be a bit to lengthy, but give some directions for the ones that are curious. – LiveWireBT Apr 04 '14 at 21:01
  • 1
    @hbdgaf I added http://askubuntu.com/q/35629/ as a heads up. The FFmpeg PPA was already last, not considering the newly added history section. Instead of pure politics (and probably hatred), I'd like to discuss different functionality like the new deinterlace filter w3fdif in FFmpeg (but that's off-topic for this question). I don't understand why I'm obviously getting downvoted (I'm not blaming you in particular.), for trying to objectively explain what happened. I don't have any affiliation with one of these projects and intend to be as objective as possible. – LiveWireBT Apr 04 '14 at 21:28
  • Returns in 15.04, but absent in 16.04 (?!?) – matanox Jun 16 '16 at 11:51
  • What do you mean? The package exists in the repositories and contains binaries http://packages.ubuntu.com/xenial/amd64/ffmpeg/filelist – LiveWireBT Jun 16 '16 at 12:02
118

ffmpeg was replaced in previous releases by the avconv program from the libav project.

To install avconv you need to install the libav-tools package:

sudo apt-get install libav-tools

avconv is very similar to ffmpeg, but they also have some differences in syntax.

Edit: It seems Ubuntu 16.04LTS has again ffmpeg in their repositories, so libav-tools is a dummy package and only creates an alias avconv -> ffmpeg (and others)

Rutrus
  • 1,501
  • 1
  • 9
  • 11
  • Easy answer but all the directions online say how to use ffmpeg to do stuff, not avconv, and that's what brought me to this page. With apologies to Rutrus: minus one. - Maybe if you explained the differences, we'd be able to work with it. – Aaron Hall Jun 04 '16 at 20:26
  • 3
    @aaron-hall I think your -1 is unfair. You expect something wrong. The question made in 2014 is very clear: Is it missing in 14.04? And the answer is yes, in some previous versions ffmpeg as much was only an alias for avconv. It doesn't matter what you were looking for. Maybe you don't read the title of the page before click this page. But don't worry, I will edit with a disclaimer for people with reputation 184 who doesn't know how to stackexchange works. – Rutrus Jun 05 '16 at 23:11
  • I still have 14.04, and I want to use ffmpeg - is avconv a drop-in replacement or what? *What are the differences?* – Aaron Hall Jun 05 '16 at 23:48
  • The vast majority of your rep on this site is due to this answer, which I could have written based solely on the material in the top answer. You shoud earn your rep by writing a decent answer that says, at least in short and in general what the differences are. Hand-waving is a waste of time. Unless it truly is just an alias, in which case there shouldn't be any differences in syntax. And if you do, you'll reverse my opinion of the answer, but as it currently stands, it contradicts itself! Let me know when I can delete these comments. – Aaron Hall Jun 05 '16 at 23:57
  • 2
    libav-tools is a fork from ffmpeg. ffmpeg was replaced by avconv from 2012 to 2014 in Ubuntu repos. You can ask this new question for your answer, or find one yourself. You can use ffmpeg again since Ubuntu 15.04. Abstract: libav is compatible with ffmpeg syntax, but not in the reverse. – Rutrus Jun 07 '16 at 13:54
  • @Rutrus If I'm not mistaken you've written that backwards. ffmpeg supports libav syntax (though there may be some incompatibilities), but the reverse is not true. – Wlerin Aug 15 '16 at 19:16
  • This still work in 2017 and is perfect. – SmallChess Apr 12 '17 at 02:33
49

ffmpeg had removed repo of Ubuntu, instead of libav. you should add ppa:

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg gstreamer0.10-ffmpeg

watch your output

Duong
  • 499
  • 3
  • 2
44

You can also use this PPA: ppa:jon-severinsson/ffmpeg

Edit: This ppa has been deleted from Launchpad, I don't know why. Instead of it, you can use the samrog131 PPA (for Trusty, Utopic & Vivid)

sudo add-apt-repository ppa:samrog131/ppa
sudo apt-get update
sudo apt-get install ffmpeg-set-alternatives

The PPA also contains other packages that you may not want. Remove the ppa after installation.

sudo add-apt-repository --remove ppa:samrog131/ppa
sudo apt-get update
Guillaume
  • 2,101
  • 1
    Fixed apt-add-repository -> add-apt-repository. If apt-add-repository doesnt work for you anymore, try this: https://stackoverflow.com/questions/13018626/add-apt-repository-not-found – RedPixel May 05 '14 at 18:05
  • 2
    That's basically the same information I posted in my answer, but without the warning that should always be given before advising users to install packages from PPAs. Also there is the possibility that someone else will take over maintenance of an ffmpeg PPA in the future or that the PPA will just be moved or renamed. Therefore linking to official instructions is the right way, as it reduces redundancy and maintenance effort. – LiveWireBT Jun 02 '14 at 19:37
  • 2
    This one doesn't provide GStreamer-ffmpeg integration. @Duong's answer (mc3man's PPA) does. – Victor Sergienko Aug 11 '14 at 12:33
  • This ppa does not support utopic. – Amir Ali Akbari Feb 27 '15 at 12:38
  • Installing this on my ubuntu 14.04 LTS allowed me to display mp4 videos on ipython notebooks. – Pablo Reyes Mar 09 '15 at 17:22
  • +1. From https://launchpad.net/~jon-severinsson/+archive/ubuntu/ffmpeg: "Please note that this is actual FFmpeg, from ffmpeg.org. Recent Debian and Ubuntu packages feature Libav (from libav.org), a prominent FFmpeg fork" – Penghe Geng Mar 20 '15 at 20:32
  • 12
    And now this PPA was deleted. – MFern Apr 10 '15 at 20:54
8

FFMPEG package was removed since some time now from Debian repositories. There's still an ongoing debate about including the package again in the repositories. Ubuntu as Debian derivative, depends of the decitions made upstream. Since long ago, the package was just empty with an dependency to libav. This was changed in 12 May 2012 when the package was dropped and removed from the archives:

libav (6:0.8.99-1537-gacb2c79-1) experimental; urgency=low

  * New upstream snapshot
    - Drop patches applied upstream
    - Longer build libpostproc, dropped upstream
    - follow soname bump of libavcodec and libavformat 53->54
    - New library: libswresample
  * no longer build and use dirac, removed upstream in favor of libschroedinger
  * remove deprecated ffmpeg package
  * bump shlibs version

 -- Reinhard Tartler <siretart@tauware.de>  Sat, 12 May 2012 22:02:03 +0200
Braiam
  • 67,791
  • 32
  • 179
  • 269
  • 1
    Don't say it was empty, the packages in saucy contain a binary dpkg --contents ffmpeg_0.8.7-1ubuntu2_amd64.deb [...] -rwxr-xr-x root/root 106624 2013-10-11 10:41 ./usr/bin/ffmpeg. – LiveWireBT Apr 04 '14 at 18:56
  • 1
    @LiveWireBT could you use the package alone? That single file was just a binary to link avconv binary. Transitional packages are always deemed as empty packages. – Braiam Apr 04 '14 at 21:05
  • 1
    We may just be thinking the same thing and are misunderstanding each other. :) – LiveWireBT Apr 04 '14 at 21:08
4

I had the same error when trying to run

sudo apt-get install ffmpeg

So I combined a few other answers, as well as the content from this site, to obtain the following recipe that worked for me:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:mc3man/trusty-media  # ignore warning if not found
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get dist-upgrade

sudo apt-get install ffmpeg

Now I can see that ffmpeg has been installed:

sudo find / -type f -name "ffmpeg"

returns /opt/ffmpeg/bin/ffmpeg

From the bash prompt, the command ffmpeg should now work from any folder.

larryy
  • 103
Michael Currie
  • 641
  • 6
  • 6
1

If you want to install ffmpeg 2.2.1 (from source) in Ubuntu 14.04, you can give it a try using the following options:

For 64-bit OS:

List of Dependencies:

yasm frei0r-plugins-dev gnutls-bin libgnutls-dev libass-dev libgsm1-dev libmp3lame-dev libopencv-dev libopenjpeg-dev libopus-dev libpulse-dev libschroedinger-dev libsoxr-dev libspeex-dev libtheora-dev libv4l-dev libvorbis-dev libvpx-dev libx264-dev libxvidcore-dev libopenal-dev libcdio-paranoia-dev

Compilation options:

./configure --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib/x86_64-linux-gnu/  --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcdio --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib/x86_64-linux-gnu/ --enable-runtime-cpudetect

For a 32 bit OS:

List of Dependencies:

yasm frei0r-plugins-dev gnutls-bin libgnutls-dev libass-dev libgsm1-dev libmp3lame-dev libopencv-dev libopenjpeg-dev libopus-dev libpulse-dev libschroedinger-dev libsoxr-dev libspeex-dev libtheora-dev libv4l-dev libvorbis-dev libvpx-dev libx264-dev libxvidcore-dev libopenal-dev libcdio-paranoia-dev libopencore-amrwb-dev libopencore-amrnb-dev

Compilation options:

./configure --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-runtime-cpudetect --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-pthreads --enable-x11grab --enable-vdpau --disable-avisynth --enable-frei0r --enable-libdc1394 --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' --disable-stripping  

For more information see my youtube video.

Seth
  • 58,122
0

If you want the latest release fresh off github which satisfies the likes of errors generated from youtube-dl

ERROR: ffprobe or avprobe not found. Please install one.

then issue these cmds :

sudo apt-get build-dep ffmpeg

git clone https://github.com/FFmpeg/FFmpeg.git

cd FFmpeg

./configure   --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --enable-shared --disable-stripping --enable-avresample --enable-avisynth --enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-openal --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libxvid --enable-libzvbi --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-libssh --enable-libsoxr --enable-libx264 --enable-libopencv --enable-libx265

make -j8
sudo make install

enjoy,

-1

First install avconv:

$ sudo apt-get install libav-tools

Then create a soft link to avconv named ffmpeg:

$ sudo ln -s /usr/bin/avconv /usr/bin/ffmpeg

Now you can use ffmpeg normally.

  • 1
    Polluting /usr/bin with symlinks is generally not a good idea. What will happen if you upgrade to a moden Ubuntu version and try to install ffmpeg from the repo? Also, avconv is a poor substitute for ffmpeg: it is missing many features, filters, etc. – llogan Jul 23 '16 at 05:02
-1

I was spent 2 weeks to install newest version ffmpeg 2.8.11. This version is used for Ubuntu 16.04. I advise you should install this version. I tested on Ubuntu 12.04 and Ubuntu 14.04 and it worked well. You can install libav-tools like directions above but you will have a problem about compatibility. Because libav-tools and ffmpeg now was developed by two different group. Following my directions. If you have any problem can sent me via an email: hohaidang.khtn@gmail.com

$ sudo apt-get update
$ sudo apt-get -y install build-essential checkinstall git libfaac-dev libgpac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev librtmp-dev libtheora-dev libvorbis-dev pkg-config texi2html yasm zlib1g-dev  libavcodec-extra-53
$ sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev
$ sudo apt-get install libdc1394-22 libdc1394-22-dev libgsm1 libgsm1-dev libopenjpeg-dev libschroedinger-1.0-0 libschroedinger-dev libschroedinger-doc libspeex-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev libx264-dev
$ wget https://www.ffmpeg.org/releases/ffmpeg-2.8.11.tar.xz
$ tar xf ffmpeg-2.8.11.tar.xz
$ cd ffmpeg-2.8.11/
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-x11grab --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-yasm // disable yasm if you are using Ubuntu 12.04, if not --enable-yasm
$ make
$ sudo make install

Check ffmpeg, ffserver, ffplay, ffprobe in terminal. Good luck

Dang_Ho
  • 127
  • 3