A common question is “why doesn’t the repository FFmpeg convert to mp3, aac, mpeg4, etc?”. Ubuntu doesn’t make it very clear to the general user as to why to repo FFmpeg is so limited or how to fix this issue. This is reflected in the number of forum questions relating to this topic.
Why is FFmpeg from the repository so limited?
Legal reasons. Some software is limited due to geographical differences in software patents, legal restrictions on free speech, and restrictions on certain technologies. Ubuntu sidesteps these legal restrictions by not including some restricted packages by default. Users must install these packages on their own. See Restricted Formats Ubuntu Community Documentation and FFmpeg License and Legal Considerations for more details.
How do I fix FFmpeg?
There are several options:
A. Compile FFmpeg yourself
B. Install the unstripped or extra libraries
C. Medibuntu
A. Compiling FFmpeg yourself (for all Ubuntu versions)
The official FFmpeg answer is to compile it yourself, giving you the power to get what you want with the bug-fixes, enhancements, and benefits of the most recent FFmpeg revision. This is an excellent solution and is explained here:
HOWTO: Install and use the latest FFmpeg and x264
This is the option that I personally use, and although it is not too hard, compiling may not be for everyone for a variety of reasons. Off to the other options…
B. Installing the unstripped or extra libraries
This is the quickest option for most users. FFmpeg from the repository does not include many restricted encoders, formats, and codecs which may include: H.263, aac (libfaac), mp3 (libmp3lame), H.264 (libx264), xvid (libxvid), and mpeg4. You can fix this by installing the unstripped or extra (Ubuntu Karmic renamed unstripped to extra) FFmpeg libraries that will enable these restricted encoders. Open up Terminal and enter:
Ubuntu Lucid Lynx 10.04 & Ubuntu Karmic Koala 9.10
sudo apt-get install ffmpeg libavcodec-extra-52
Note: The libavcodec-extra-52 package for Lucid and Karmic do not support AAC or AMR formats. I recommend using libavcodec-extra-52 from the Medibuntu repository. See option C. Medibuntu.
Ubuntu Jaunty Jackalope 9.04
sudo apt-get install ffmpeg libavcodec-unstripped-52
Ubuntu Intrepid Ibex 8.10
sudo apt-get install ffmpeg libavcodec-unstripped-51
Alternatively, you can search for these packages in the Synaptic Package Manager.
C. Medibuntu
This option is available for Ubuntu Lucid Lynx 10.04, Ubuntu Karmic Koala 9.10 and Ubuntu Hardy Heron 8.04. Medibuntu is a third-party repository that contains packages that are unable to be included in the official Ubuntu repositories. To install FFmpeg from Medibuntu open Terminal (Applications -> Accessories -> Terminal) and run the following:
sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get -q update && sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring && sudo apt-get -q update
This huge command (adapted from Medibuntu – Community Ubuntu Documentation) will install the repository information to your computer then update and authenticate the new repository. Now install FFmpeg:
Ubuntu Lucid Lynx 10.04 & Ubuntu Karmic Koala 9.10
sudo apt-get install ffmpeg libavcodec-extra-52
Ubuntu Hardy Heron 8.04
sudo apt-get install ffmpeg
That’s it. Now you have a non-crippled version of FFmpeg. See some usage examples at the FFmpeg x264 encoding guide.
Undoing Changes Made By This Guide
B. Uninstalling the unstripped or extra libraries
sudo apt-get remove ffmpeg libavcodec-*-5*
C. Uninstalling FFmpeg and the Medibuntu Repository
sudo apt-get autoremove ffmpeg medibuntu-keyring && sudo rm /etc/apt/sources.list.d/medibuntu.list
Sign up for our daily email newsletter:
You must log in to post a comment.
{ 1 trackback }