Ubuntu: How to install h.264 decoder?



Question:

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?


Solution:1

If you want only H.264 then

sudo apt-get install h264enc  

will install H.264 in your system.


Solution:2

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.


Solution:3

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  


Solution:4

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

apt install gstreamer1.0-libav  


Solution:5

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).


Solution:6

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.


Solution:7

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.


Solution:8

Following this video (https://www.youtube.com/watch?v=Vk5viMViSXk) worked for me. Now, I am about 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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »