I tried playing videos in movie player but only the audio could be heard. I tried playing the video with dragon player but here also only the audio could be heard.

A message box appeared showing the following message:

Python (v2.7) requires to install plugins to play media files of the following type: H.264 decoder

I tried installing the plugin but it couldn't be installed. It isn't available in the software center too. How can I get this plugin?

  • which video format you are trying to play?? and by the way have you installed Ubuntu-restricted-extras??
    – Sukupa91
    Dec 1, 2013 at 17:34
  • m trying to play MPEG-4 video (video/mp4)
    – sonakshi
    Dec 2, 2013 at 5:48
  • yes the restrictd packages are installd
    – sonakshi
    Dec 2, 2013 at 5:48
  • install h264enc causing the error as mentioned by rajagenupula..
    – Sukupa91
    Dec 2, 2013 at 5:50
  • The reader of this question might also want to have a look at the question askubuntu.com/q/214421/217269 (about multimedia decoders)
    – strpeter
    May 21, 2014 at 11:26

9 Answers 9


In order to play H.264 encoded videos the corresponding decoder comes with the following library:

sudo apt install gstreamer1.0-libav

If you want the H.264 encoder, then

sudo apt-get install h264enc

will install H.264 in your system.

  • 1
    i tried aftr d whole procedure,postfix configuration popped up..but nothing hapened
    – sonakshi
    Dec 2, 2013 at 7:57
  • 10
    Isn't this the encoder, not the decoder? Dec 11, 2013 at 20:30
  • h264enc is "A shell script which makes it easy to encode DVDs or video files to the H.264/AVC/MPEG-4 Part 10 video format using MEncoder from the MPlayer project". That doesn't sound like the codec that's wanted, but converting the videos might be a fallback option.
    – mc0e
    Feb 21, 2016 at 15:21
  • 2
    @CraigS.Anderson make sure you have "multiverse" repository enabled. packages.ubuntu.com/search?keywords=h264enc
    – Raja G
    Jan 31, 2018 at 4:26
  • 1
    *DEcoder not ENcoder
    – Sephethus
    May 25, 2021 at 16:55

The package that fixed it for me on 16.04 is the gstreamer plugins bad. I got a message about Python-3.5 minimal wanting to install some MPEG-4 AAC plugin, which did not do anything. To fix: In a terminal type:

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

If you still can't get it to work somehow, you can try VLC as a workaround, installable by:

sudo apt-get install vlc

I did not unclick the restricted software, that may work but may disable other codecs. By the way, movie player or Video is the Totem video player.

  • 1
    Worked on 20.04 Jan 1, 2022 at 13:39
  • 1
    VLC worked for me, mp4 videos were playing randomly, now everything looks correct with VLC. Thanks! May 15, 2022 at 4:07

I think this is part of the package gstreamer-plugins-bad. If you search for this in Software Center it should show up. It might be that you have to activate the multiverse repository (start Software & Sources and tick the appropriate box for this).

After you have installed the package, Movie Player should be able to play the file.

  • the gstreamer-plugin that u mentiond is n being able to b instald..it shows some eror like this isnt availble in ur software
    – sonakshi
    Dec 2, 2013 at 5:49
  • i tried something and now finally i can c d video...thnx alot everyone for ur help..:)
    – sonakshi
    Dec 2, 2013 at 8:08
  • The package was probably not available because you hadn't activated the multiverse repository, as I wrote you might have to do :)
    – fohswe
    Dec 3, 2013 at 0:04

The audio-only gstreamer bug can easily be resolved

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.

  • 2
    I installed all kinds of packages to no effect, and this is the only thing that worked.
    – Alex
    Nov 30, 2020 at 8:10
  • 1
    finally , only thing that worked.
    – user1196270
    Apr 10, 2021 at 8:40

Installing gstreamer0.10-ffmpeg from a PPA as described below solved this for me.

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg
  • It says: Package 'gstreamer0.10-ffmpeg' has no installation candidate
    – egvo
    Jul 4, 2021 at 13:49

I had the same problem with playing videos. Video player wanted to download mpeg - 4 acc decoder and h.264 decoder, but this hadn`t happened due to legal reasons (-if I understand correctly what was written in the window what appears after pc was trying to download mentioned programs).

After I unclicked Software & updates -> Ubuntu software -> "unclick" Software restricted by copyright or legal issues (multiverse) all start working again. (I mean that after this operation pc downloads what he needed and that it started working).


Following this video (https://www.youtube.com/watch?v=Vk5viMViSXk) worked for me. Now, I am able to play and seek forward/backward h264 files created by my Chinese IP Camera.

To sum up:

  • Open VLC.

  • Go to: Tools/Preferences. Select Show settings: `All'

  • In Input / Codecs / Demuxers, select Demux module as h264 video demuxer. Save and restart VLC.

Now you should be able to play h264 file.

  • 1
    This doesn't actually work. Every website says to do this, but in Ubuntu 20.0.4, this will not work.
    – Sephethus
    May 25, 2021 at 16:57

Easiest thing you can do is Download & Install VLC layer from Ubuntu Software and enjoy your vedioenter image description here Install VLC player [1]: https://i.stack.imgur.com/hrKWg.png Open With VLC Player [2]: https://i.stack.imgur.com/k6vpE.png Enjoy [3]: https://i.stack.imgur.com/Kzg5d.png

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .