How to play h264 encoded videos with Totem?

7,031

You just have to install the gstreamer ugly plugins that includes the h264 codecs:

➜  ~  apt-cache show gstreamer1.0-plugins-ugly | grep Gstreamer-Encoders
Gstreamer-Encoders: audio/AMR; audio/mpeg, mpegversion=(int)1, layer=(int){ 3, 2 };
video/x-h264, stream-format=(string){ avc, byte-stream },
alignment=(string)au, profile=(string){ high-4:4:4, high-4:2:2, high-10,
high, main, baseline, constrained-baseline, high-4:4:4-intra, high-4:2:2-intra, high-10-intra }

So, just run:

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

or

sudo apt-get install gstreamer0.10-plugins-ugly

and it's done. You don't need to install anything else, nor use the ubuntu-restricted-extras package.

Share:
7,031

Related videos on Youtube

obysr
Author by

obysr

please delete me

Updated on September 18, 2022

Comments

  • obysr
    obysr over 1 year

    I can play some mkv videos but some others can't play. Why? I don't want to install ubuntu-restricted-extras cause it brings Adobe Flash that has not been supported again and it is the old version. And it is not easy to uninstall.

    enter image description here

    • Jason Southwell
      Jason Southwell almost 11 years
      What do you mean it's not easy to uninstall? It is...
    • obysr
      obysr almost 11 years
      sorry my english is not good. I am an Indonesian. once I install adobe flash plugin, it can't be uninstalled properly. maybe it deny to be removed.
  • doug
    doug about 10 years
    h.264 decoding is done for gstreamer apps via the libav or ffmpeg plugins. Some older versions were unable to decode High 4:4:4 Predictive which has been the default for the real FFmpeg for some time. (though no longer the case for recent gst libav plugins. This may have been the orig. posters issue, may of not, hard to tell at this point..
  • Braiam
    Braiam about 10 years
    @doug weird, for 1.0 Gstreamer the gstreamer plugin page states support for the h264 high-4:4:4 and high-4:4:4-intra. Nothing about predictive :/.
  • doug
    doug about 10 years
    Braiam - your right - I went back & checked my old bug report on this. It was in 13.04 but only during the dev, at some point High 4:4:4 Predictive started working again, sorry about that.