How to replace avconv with (the real) ffmpeg and have it work right?
Solution 1
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.
- 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.)
- Click the appropriate (32- or 64-bit) and desired (snapshot or numbered) release to download. (Snapshot is recommended.)
-
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.*
-
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.
Solution 2
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).
Related videos on Youtube
u2n
Updated on September 18, 2022Comments
-
u2n over 1 year
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.
-
Admin over 10 yearsHave you seen How to Compile FFmpeg on Ubuntu? It does not conflict with any libav junk from the repos.
-
Admin over 10 years@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.)
-
Admin over 9 years@AndreaLazzarotto There's nothing wrong with the reasons above. They're facts about why the u2n is trying to switch back to using FFmpeg.
-
Admin over 9 years@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.
-
Admin over 9 years@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.
-
Admin over 9 yearsHey 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.)
-
Admin over 9 years@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. Andffmpeg
command was kept for compatibility purposes, i know back in those days i still had some scripts that usedffmpeg
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).
-
u2n over 10 yearsThanks, 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...
-
Rmano over 10 yearsWell, 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.
-
user2058205 over 10 yearsPhew. 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!
-
deadghost about 10 yearsThe 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.
-
Bill McCracken almost 10 yearsThe
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. -
u2n almost 10 years@cxrodgers, absolutely right. Fixing now, thanks.
-
Bill McCracken about 9 yearsYou may want to update this answer now that jon-severinsson PPA is gone: stackoverflow.com/questions/29585700/…
-
llogan about 9 yearsSymlinking should point to
/usr/local/bin
to prevent potential conflicts from any repo packages that provide the named files; notably from libav-tools packageqt-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. -
u2n about 9 yearsThanks, @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.