64

Where do I get the MPEG-4 AAC decoder, and the H.264 decoder.

How to install them and play the multimedia?

  • 5
    Have you tried sudo apt-get install ubuntu-restricted-extras? – Peachy Nov 8 '12 at 3:55
  • 3
    @Peachy why don't you add that as an answer? – devav2 Nov 8 '12 at 4:07
78

ubuntu-restricted-extras package allows users to install ability to play popular non-free media formats, including DVD, MP3, Quicktime, and Windows Media formats.

To install ubuntu-restricted-extras package:

  1. Open a terminal by pressing Ctrl+Alt+T.

  2. Run this command:

    sudo apt-get install ubuntu-restricted-extras
    
  3. Alternatively, you can install the package via Software Center by launching it via Dash and searching the package and clicking on Install.

    enter image description here

Also, try installing libavcodec54 libav-tools and ffmpeg with this command:

sudo apt-get install libavcodec54 libav-tools ffmpeg
| improve this answer | |
  • Is ubuntu-restricted-extras enough for mp4 playback from Twitch.tv? Or do I need the libavcodec54 libav-tools ffmpeg as well? @Peachy – Shayan Aug 27 '19 at 12:38
  • 2
    Also: Package libav-tools 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 However the following packages replace it: ffmpeg:i386 ffmpeg E: Unable to locate package libavcodec54 E: Package 'libav-tools' has no installation candidate – Shayan Aug 27 '19 at 12:43
15

The other answers seems to work on older versions but today when I was installing the same on clean install of Ubuntu 18.04 using Peachy's answer I got lot of errors. Using these commands I installed that in Ubuntu 18.04 LTS successfully.

sudo apt install libdvdnav4 libdvdread4 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libdvd-pkg
sudo apt install ubuntu-restricted-extras
| improve this answer | |
  • 1
    This actually works for 18.04. Thanks bro!! – Saeed Entezari Sep 16 '18 at 7:47
  • I use Ubuntu Studio 18.04.1 LTS, and I have installed all the pieces of software you mentioned here, but... The problem is still the same! VLC player can play those videos but not Parole. So... – Juan Feb 9 '19 at 0:34
  • This should be the accepted answer. – Henok Tesfaye Dec 1 '19 at 17:48
  • 2
    This also worked for Ubuntu 20. I had the same issue with a new install – dannypaz Apr 23 at 23:37
11

Support to decode MPEG-4 AAC is provided by gstreamer1.0-libav and to decode H.264 there is ffmpeg:

$ sudo apt-get install gstreamer1.0-libav ffmpeg

For more information have a look at the Ubuntu Documentation.

| improve this answer | |
5

Unfortunately none of these options seem to work on Ubuntu 16.04. I get a python 3.5 message for searching MPEG-4 AAC in one of the videos I try to play. None of the above fixing the missing codec.

A fine workaround is to install VLC:

sudo apt-get install vlc

(or from software center)

Update: found a fix:

sudo apt-get install gstreamer1.0-plugins-bad

This made sound work for Totem (Video)

Update: Try going to 'Software & Updates' and enabling the checkbox for 'Software restricted by by copyright or legal issues'. Then allow Ubuntu to update after clicking the close button. You should now be able to run:

sudo apt-get install ubuntu-restricted-extras

You'll also have to accept the EULA's terms and conditions before continuing.

| improve this answer | |
3

Beware of the audio-only gstreamer bug

Hearing only audio on H.264 playback with an otherwise black video screen was reported as gstreamer1.0 bug #1562875.

Luckily, this bug can easily be resolved by issuing the following command once:

$ rm -R ~/.cache/gstreamer-1.0

This will take effect after restarting the application.

| improve this answer | |
  • I didn't help to me! I use Ubuntu Studio 18.04.1 LTS and Parole 1.0.1. – Juan Feb 9 '19 at 0:36
1

In the last Ubuntu ver 14.04 , 14.10 the best way for setup them is :

To install ubuntu-restricted-extras package:

Open a terminal by pressing Ctrl+Alt+T.

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

and N-joy

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.