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.
Best Answer
Here's how I do it. But I must warn you, this requires a little courage as you must build libav (This will give you the avconv executable among other tools) yourself. But have no fear, I have done it many times and I'll show you how to to build and install everything without messing your system up. If you don't want your custom libav build anymore, all you have to do is delete a directory.
Prerequisites
First I remove the avconv installed buy default with:
Then make sure you have the required tools for building software in general:
To get the fastest avconv possible you'll need an assembly compiler. That's easy:
Now get into a scrap directory to build in, I'll do:
Now clone the libav git repo (you'll need git installed for this):
This will give you the the latest and greatest libav source, I have found the bleeding edge code stable enough for my needs and haven't run into any code related bugs during building.
Let the repo clone and then install libfdk-aac through the package manager:
To make things simple lets just install the libx264 library for avconv to use:
Create a home for the binaries and other files that will be built in a moment (This will make things easy to uninstall as well):
Once installed, the avconv executable will be located in ~/apps/bin/ To run avconv from the command line simply add ~/apps/bin to you $PATH
Installation
Now you, need to configure the libav source to use your newly install fdk-aac library. Simply enter this in the command line:
This command will give you all of libav default encoding and decoding libraries plus libx264 and libfdk_aac Note: should you want more encoding functionality try ./configure --help to see all the external libraries you can enable.
Now all thats left to do is build the thing! This should only take a few minutes on a decent machine.
If you added ~/apps/bin to you $PATH you should be able to run 'avconv' now.
To update your custom libav build, just run:
In ~/src/libav/ up pull the latest code. Then reconifgure with the command above, make and make install.
Should you every want to get rid of you custom build and reinstall ubuntu's default libav-tools packages run:
And remove ~/apps/bin from your $PATH
Sorry if the task you want to achieve seems daunting, but it makes me proud to use a custom built, bleeding edge version of avconv :) I think the extra work pays off. Hope this helps :)
Verification
Verify it is installed correctly with:
You want to see:
Usage
Please note that the infamous experimental flag is now not necessary nor recommended anymore.
You want to see: