27

UPDATE (original text preserved below)

With the real ffmpeg about to return (in 15.04), Jon Severinsson's PPA no longer working (for ffmpeg), and both avconv-ffmpeg (now called "libav") and the real ffmpeg (now back to just "ffmpeg") dropped from interim releases, the question has become: How to most easily install ffmpeg in pre-2015 distros?

/UPDATE

Anyone know how to install the real, current ffmpeg (not the older version by avconv that comes w/ Ubuntu) without having the problems mentioned here?

Reasons:

  • Everything works (or so many have written),
  • Use the new syntax, and
  • After some research -- and without getting into the controversy -- I simply believe the packagers made a mistake going with avconv. This is a fix.

Apparently it's not as easy as it should be due to versioning conflicts, and that avconv and ffmpeg can't coexist on the same machine (noted in the accepted answer of the above-linked post). Though at least one guide mentions installing ffmpeg locally (~) to achieve coexistence.

My release is Precise 12.04.3 LTS, but it appears this would apply to newer ones also.

u2n
  • 923
  • 1
  • 9
  • 22
  • 3
    Have you seen How to Compile FFmpeg on Ubuntu? It does not conflict with any libav junk from the repos. – llogan Nov 09 '13 at 22:28
  • @LordNeckbeard: Yes, thanks, did see that. Easiest is sometimes best (see my result, below). As long as Jon Severinsson is going to the trouble to help others, might as well use his work. (And with great appreciation, I do.) – u2n Nov 11 '13 at 03:36
  • 1
    I suggest you rephrase a bit the "reasons" part. It seems you are implying that the assumed superiority of ffmpeg over avconv is a fact and that Ubuntu users are in trouble because the repository has broken software. This could confuse and scare some novice users. I hope you will understand my point, as you seem to agree it's better not to get «into the controversy». – Andrea Lazzarotto Aug 18 '14 at 21:32
  • @AndreaLazzarotto There's nothing wrong with the reasons above. They're facts about why the u2n is trying to switch back to using FFmpeg. – Brad Oct 19 '14 at 18:53
  • 1
    @Brad I keep believing it's wrong to scare new users by letting them think they have broken software and that they need to "fix" it. – Andrea Lazzarotto Oct 19 '14 at 22:47
  • 1
    @AndreaLazzarotto Nobody is trying to scare anyone. In the question is an opinion, and it is specifically called out as one. That opinion is an important part of the question. – Brad Oct 19 '14 at 22:49
  • 1
    Hey guys, thanks for the comments. Since the bogus avconv version of ffmpeg has been removed from all the latest releases, there's nothing to uninstall anymore (and no more controversy either :^). Jon Severinsson is updating his ppa regularly so the real ffmpeg rocks on -- w/ easy install and updates. This post will serve as the update here for now. (Will do a full cleanup later.) – u2n Oct 20 '14 at 21:24
  • @u2n The reason why the package was still called ffmpeg in 12.04 was because it's LTS, and thus should not be changing stuff drastically. And ffmpeg command was kept for compatibility purposes, i know back in those days i still had some scripts that used ffmpeg and it would suck having to change them all. This is the correct way to deprecate something, by allowing the old name to be used for a while (please see the switch from OpenOffice.org to Libre Office for example). – v010dya Nov 10 '14 at 16:56

3 Answers3

25

Updated Answer for Pre-2015 Releases

Because no one is maintaining an all-inclusive ppa like Jon Severinsson's, Rmano's method of using a static build is now easiest. Note updates have to be checked and done manually.

  1. After heading to the official ffmpeg download page, click the link under Linux Static Builds. (The target may change so it's not linked directly here.)
  2. Click the appropriate (32- or 64-bit) and desired (snapshot or numbered) release to download. (Snapshot is recommended.)
  3. If the libav version of ffmpeg was installed, remove it. The two can not reside on the same machine. If libav was not previously installed, skip to 4.

    sudo apt-get remove ffmpeg  
    sudo apt-get purge libav-tools  
    # *Ignore any autoremove message that may appear.*
    
  4. Extract the files (and two directories) as follows:

    • For single-user systems: to $HOME/bin
    • For multi-user setups: to /usr/local/bin

Static build install is done and ffmpeg is ready to use.

To update: Upon checking and finding a newer release, the install folder can be sorted by date and the existing version files quickly identified and deleted. (The timestamps will all be the same as the ffmpeg binary.) The update can then be downloaded and extracted the same as the earlier release.

Should a comprehensive ffmpeg repo re-emerge, it would install as before:

# Replace avconv with the real ffmpeg
#   www.askubuntu.com/a/373509/165265
#
sudo add-apt-repository ppa:<name of ppa here>
sudo apt-get update
sudo apt-get install ffmpeg

With the real ffmpeg returning to 2015 releases and beyond, the need for this work-around will eventually fade away.

Much gratitude to the community for the help.

u2n
  • 923
  • 1
  • 9
  • 22
  • 4
    Phew. Thanks. avconv seems soo close to ffmpeg, but it seems to have some different flags. No thanks. FFMPEG works great. Only reason I can think for Ubuntu to switch is some political reason. Forget that noise. ffmpeg ftw! – James T Snell Jan 02 '14 at 03:10
  • 1
    The sudo apt-get dist-upgrade line seems unnecessary to me for the purpose of this post. Most people who are trying to install ffmpeg probably wouldn't want to trigger a distribution upgrade as a side effect. – cxrodgers Jul 21 '14 at 18:35
  • @cxrodgers, absolutely right. Fixing now, thanks. – u2n Aug 18 '14 at 21:15
  • I wonder why you recommend frei0r-plugins? I don't fully get what they bring even after reading the documentation. – Hartator Oct 30 '14 at 03:01
  • 1
    You may want to update this answer now that jon-severinsson PPA is gone: http://stackoverflow.com/questions/29585700/why-are-v0-v1-and-v2-of-ffmpeg-still-under-active-development-what-happened-t – cxrodgers Apr 12 '15 at 17:21
  • 1
    Symlinking should point to /usr/local/bin to prevent potential conflicts from any repo packages that provide the named files; notably from libav-tools package qt-faststart and the faux "ffmpeg" for 12.04 and older. Also, other users may not have the proper permissions to execute anything in another user's ~/bin (but I didn't investigate this). Lastly, I think the whole "/UPDATE" section from this answer can be removed: it is outdated (that PPA is gone) and does not contribute much anymore. – llogan Apr 28 '15 at 17:50
  • Thanks, @LordNeckbeard, a lesson to not write when tired. Got thinking about this and, really, symlinking IS only good on family machines (with permission fixes) as you noted. For simplicity, I've eliminated that in the updated answer and suggested placing the files directly in /usr/local/bin. Since there is a direct conflict with libav, I kept the step to remove those files first, if they exist. Also made it clear that the two don't coexist. Have taken your advice to remove the original text and reference. – u2n Apr 29 '15 at 21:20
7

I have had no problem using the static build provided by the FFmpeg project. There are links in http://ffmpeg.org/download.html

Download the version/build you need (either 32 or 64 bit), then put the executable in your $PATH (for example, ~/bin). If it is placed in ~/bin you can log out then log back in, or just run . ~/.profile, for your shell to recognize that it is in the $PATH. Now you can just enter ffmpeg and the new static build will be used.

For example:

% wget http://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz
% tar xJvf ffmpeg-git-64bit-static.tar.xz
% cd ffmpeg-git-20150427-32bit-static
% ./ffmpeg
ffmpeg version N-45164-g46778ab- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
[...]

Being completely static should have no problem with various Linux versions (to a limit, the kernel should be not too old).

llogan
  • 11,868
Rmano
  • 31,947
  • 1
    Thanks, Rmano. Will upvote your answer as an alternative soon as I reach the magic number. "Alternative" because, from what I've read, the very thing that makes static builds reliable -- having all the dependencies built-in -- also makes them 'heavy' (large and memory-hungry). For that reason, I was shying away from going that route in favor of the normal-weight, auto-updated version of the program. ... Think I may've got it, post upcoming... – u2n Nov 09 '13 at 13:25
  • Well, although that is generally true for static executable, in this case ffmpeg do not use graphical or heavy general libraries. Obviously you are right if you end up running various copies of ffmpeg in parallel. – Rmano Nov 09 '13 at 15:15
  • 2
    The accepted answer PPA route contains version 0.1 which is wayyyyyy old. You'll want to use this answer's method to get a lot of commands working. – deadghost Apr 01 '14 at 08:38
0

Running 18.04, using Video Download Helper extension to FireFox. Used to work fine but started getting "library configuration mismatch" warning a few months or so ago. In Synaptic Package manager, I did a search for ffmpeg and came up with something marked as needing upgrade (I don't remember which it was, sorry. Might have been chromium-codecs-ffmpeg-ext ).

I upgraded it and now VDH works again.