After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728655 - Totem can't play H.264 stream
Totem can't play H.264 stream
Status: RESOLVED OBSOLETE
Product: totem
Classification: Core
Component: GStreamer backend
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: Maintainer alias for GStreamer component of Totem
Maintainer alias for GStreamer component of Totem
Depends on:
Blocks:
 
 
Reported: 2014-04-21 14:04 UTC by Ondra Pelech
Modified: 2018-05-24 10:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the gstreamer log when playing video from ctstreamer, no search for H.264 plugin (1.46 MB, application/x-xz)
2014-08-16 10:22 UTC, Ondra Pelech
Details
the gstreamer log when playing video from ctstreamer, with search for H.264 plugin (1.48 MB, application/x-xz)
2014-08-16 10:25 UTC, Ondra Pelech
Details

Description Ondra Pelech 2014-04-21 14:04:08 UTC
Totem fails to play the video stream, asks to search for H.264 decoder, fails to find it and only sound is played.

I'm on Fedora 20.

you may need these 2 scripts to preproduce. The player to be used is set in the variable PLAYER in the script 'televize'. when mplayer is used, everything works OK.

http://xpisar.wz.cz/ctstream/

http://xpisar.wz.cz/televize/



> televize ct24-a2000
DtsGetHWFeatures: Create File Failed
DtsGetHWFeatures: Create File Failed
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation failed,driver_name=i965
** Message: Missing plugin: gstreamer|1.0|totem|H.264 decoder|decoder-video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal, parsed=(boolean)true (H.264 decoder)
** Message: PackageKit: xid = 37748751
** Message: PackageKit: Codec nice name: H.264 decoder
** Message: PackageKit: ignoring field named stream-format
** Message: PackageKit: ignoring field named alignment
** Message: PackageKit: ignoring field named parsed
** Message: PackageKit: structure: gstreamer1(decoder-video/x-h264)()(64bit)
** Message: PackageKit: Did not install codec: GDBus.Error:org.freedesktop.PackageKit.Modify.packageNotFound: failed to find codec
** Message: No installation candidate for missing plugins found.
Comment 1 Bastien Nocera 2014-04-22 06:00:51 UTC
Remove the crystal HD GStreamer plugin, and install gstreamer1-libav from RPMFusion.

Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 727654 ***
Comment 2 Ondra Pelech 2014-04-22 15:30:52 UTC
removed gstreamer-plugin-crystalhd, but the problem is still present
totem fails to play, asks to search for H.264 decoder but now it finds gstreamer-plugin-crystalhd
if I decline to install it, only audio is played

> televize ct24-a2000
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
** Message: Missing plugin: gstreamer|1.0|totem|H.264 decoder|decoder-video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal, parsed=(boolean)true (H.264 decoder)
** Message: PackageKit: xid = 35651599
** Message: PackageKit: Codec nice name: H.264 decoder
** Message: PackageKit: ignoring field named stream-format
** Message: PackageKit: ignoring field named alignment
** Message: PackageKit: ignoring field named parsed
** Message: PackageKit: structure: gstreamer1(decoder-video/x-h264)()(64bit)
** Message: PackageKit: Did not install codec: GDBus.Error:org.freedesktop.PackageKit.Modify.transactionCancelled: did not agree to download
** Message: No installation candidate for missing plugins found.
Comment 3 Bastien Nocera 2014-04-22 15:34:16 UTC
(In reply to comment #2)
> removed gstreamer-plugin-crystalhd, but the problem is still present
> totem fails to play, asks to search for H.264 decoder but now it finds
> gstreamer-plugin-crystalhd
> if I decline to install it, only audio is played

Did you install gstreamer1-libav by hand? If not, then the same problem is obviously going to happen.
Comment 4 Ondra Pelech 2014-04-22 16:08:56 UTC
yes, gstreamer1-libav has been installed the whole time
Comment 5 Bastien Nocera 2014-04-22 18:15:13 UTC
Try to remove the ~/.cache/gstreamer-1.0/registry.* files
and launch totem again.

Do not install gstreamer-plugin-crystalhd.
Comment 6 Ondra Pelech 2014-04-23 14:17:11 UTC
removing the cache files doesn't help. gstreamer1-libav is installed, gstreamer-plugin-crystalhd is not installed.
the same thing happens:

> rm ~/.cache/gstreamer-1.0/registry.*
> televize ct24-a2000
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
** Message: Missing plugin: gstreamer|1.0|totem|H.264 decoder|decoder-video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal, parsed=(boolean)true (H.264 decoder)
** Message: PackageKit: xid = 46137359
** Message: PackageKit: Codec nice name: H.264 decoder
** Message: PackageKit: ignoring field named stream-format
** Message: PackageKit: ignoring field named alignment
** Message: PackageKit: ignoring field named parsed
** Message: PackageKit: structure: gstreamer1(decoder-video/x-h264)()(64bit)
** Message: PackageKit: Did not install codec: GDBus.Error:org.freedesktop.PackageKit.Modify.transactionCancelled: did not agree to download
** Message: No installation candidate for missing plugins found.
Comment 7 Bastien Nocera 2014-04-23 16:02:23 UTC
You'll need to give me a step-by-step reproducer for this, I can't reproduce this problem here.
Comment 8 Tim-Philipp Müller 2014-05-01 11:30:36 UTC
Make sure you also have the h264parse element from gst-plugins-bad installed.
Comment 9 Ondra Pelech 2014-05-01 15:19:32 UTC
the package gstreamer1-plugins-bad-free-1.2.3-1.fc20.x86_64 is installed

the command to run is

$ ctstream -A -s http://www.ceskatelevize.cz/ivysilani/zive/ct24/ 2144000 | totem /dev/stdin

and/or

$ totem `ctstream -A -l http://www.ceskatelevize.cz/ivysilani/zive/ct24/ 2144000`
Comment 10 Ondra Pelech 2014-08-10 23:25:09 UTC
this bug is still present, if you do both:
$ ctstream -A -s http://www.ceskatelevize.cz/ivysilani/zive/ct24/ 545000 | totem /dev/stdin
or
$ totem `ctstream -A -l http://www.ceskatelevize.cz/ivysilani/zive/ct24/ 545000`

(the new version of the ctstream may be required)
Comment 11 Tim-Philipp Müller 2014-08-11 11:56:57 UTC
I have tried the second version:

 $ ctstream -A -l http://www.ceskatelevize.cz/ivysilani/zive/ct24/ 545000
 http://wcdn45.nacevi.cz/CT24/_definst_/smil:CT24-ios-MP4_Mobile.smil/chunklist_w992548418_b545000.m3u8?id=H17rDpYF4sIXcK-02

Not using Totem, but GStreamer directly:

 $ gst-play-1.0 'http://wcdn45.nacevi.cz/CT24/_definst_/smil:CT24-ios-MP4_Mobile.smil/chunklist_w992548418_b545000.m3u8?id=H17rDpYF4sIXcK-02'

This works fine in principle for me with 1.4.0. But in some cases (maybe 30-50%?) I don't get any audio, and then the picture freezes pretty quickly and it's stuck in Buffering.. state.

With the 1.4 git branch it works fine every single time, same for git master. The buffering issue might be related to bug #733837 which will be fixed in 1.4.1.
Comment 12 Ondra Pelech 2014-08-14 22:00:26 UTC
good, that sounds promising

but what about totem. if you use totem to play the streams from ctstreamer, does it still nag you to install a H.264 decoder (even if you already have one)?
Comment 13 Tim-Philipp Müller 2014-08-14 22:06:41 UTC
Not here, and I don't really understand that problem. If in doubt, install gst-libav and make sure you have h264parse. Totem should play H.264 in all shapes and sizes just fine, so if it doesn't do that it usually means you don't have the right plugin(s) installed.
Comment 14 Ondra Pelech 2014-08-14 22:37:55 UTC
> Not here

good

> I don't really understand that problem

generally speaking, totem work nice, plays H.264 encoded movies like a charm

BUT

on the streams from ctstreamer it does not work. I don't know why. obviously a bug. it claims it can't play H.264 video and offers me to install crystalhd via packagekit.

I'm glad to hear that this bug is gone in future versions
Comment 15 Bastien Nocera 2014-08-15 12:58:15 UTC
(In reply to comment #14)
<snip>
> on the streams from ctstreamer it does not work. I don't know why. obviously a
> bug. it claims it can't play H.264 video and offers me to install crystalhd via
> packagekit.

Which would be a GStreamer bug, but we'd need a sure fire way of reproducing the problem to fix it.
Comment 16 Tim-Philipp Müller 2014-08-15 13:05:33 UTC
a full GST_DEBUG=*:6 debug log (xz -9 zipped) might help find the cause of that.
Comment 17 Ondra Pelech 2014-08-16 10:20:27 UTC
so this is what I did

$ GST_DEBUG=*:6 totem `ctstream -A -l http://www.ceskatelevize.cz/ivysilani/zive/ct24/ 545000` 2>&1 | xz -9 > gst.ctstreamer.log.xz

1) I didn't even search for possible H.264 plugin

2) I searched for the plugin, only crystalhd was found, and I canceled
Comment 18 Ondra Pelech 2014-08-16 10:22:42 UTC
Created attachment 283586 [details]
the gstreamer log when playing video from ctstreamer, no search for H.264 plugin
Comment 19 Ondra Pelech 2014-08-16 10:25:31 UTC
Created attachment 283587 [details]
the gstreamer log when playing video from ctstreamer, with search for H.264 plugin
Comment 20 Tim-Philipp Müller 2014-08-16 11:03:38 UTC
It does look like something fishy is going on, but I can't pinpoint it right now. You have h264parse installed and avdec_h264 and vaapidecode. VAAPI only supports MPEG-2 video in your case. It tries vaapidecode, fails (because only mpeg-2 is supported) and then tries avdec_h264, but the caps don't match because avdec_h264 only accepts alignment=au and the caps are alignment=nal. h264parse converts between the two, so it shouldn't be a problem, but somehow it is and avdec_h264 is not considered further, so probably it uses wrong caps somewhere for checking.

Any chance you could upgrade to GStreamer 1.4 (or try the Fedora 21 alpha/beta which has it I think?)

A debug log from 1.4 or git master would be very useful, because there were quite a few changes in this code, so it might already have been fixed.
Comment 21 Ondra Pelech 2014-08-16 11:37:55 UTC
is there a way to keep Fedora 20 and take just the required gstreamer packages from 21?
Comment 22 g.trentalancia 2016-04-08 15:23:23 UTC
I get a similar problem: totem (all versions up to latest 3.20.0) cannot play h.264 video:

libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/nouveau_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/nouveau_drv_video.so
libva info: va_openDriver() returns -1
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/gallium_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0

** Message: Missing plugin: gstreamer|1.0|totem|Decoder H.264 (Main Profile)|decoder-video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)main, parsed=(boolean)true (Decoder H.264 (Main Profile))
** Message: Missing plugin: gstreamer|1.0|totem|Decoder MPEG-4 AAC|decoder-audio/mpeg, mpegversion=(int)4, framed=(boolean)true, stream-format=(string)raw, level=(string)2, base-profile=(string)lc, profile=(string)lc (Decoder MPEG-4 AAC)
** Message: PackageKit: xid = 39845905
** Message: PackageKit: desktop_id = org.gnome.Totem.desktop
** Message: PackageKit: Codec nice name: Decoder H.264 (Main Profile)
** Message: PackageKit: ignoring field named stream-format
** Message: PackageKit: ignoring field named alignment
** Message: PackageKit: ignoring field named level
** Message: PackageKit: ignoring field named profile
** Message: PackageKit: ignoring field named parsed
** Message: PackageKit: structure: gstreamer1(decoder-video/x-h264)()(64bit)
** Message: PackageKit: Codec nice name: Decoder MPEG-4 AAC
** Message: PackageKit: ignoring field named framed
** Message: PackageKit: ignoring field named stream-format
** Message: PackageKit: ignoring field named level
** Message: PackageKit: ignoring field named base-profile
** Message: PackageKit: ignoring field named profile
** Message: PackageKit: field is: mpegversion, type: gint
** Message: PackageKit: structure: gstreamer1(decoder-audio/mpeg)(mpegversion=4)()(64bit)
** Message: PackageKit: falling back to compat dbus interface
** Message: PackageKit: Did not install codec: GDBus.Error:org.freedesktop.PackageKit.Modify.transactionCancelled: did not agree to search

gstreamer and bad/ugly plugins are installed (libgstx264.so and libgstuvch264.so from latest 1.8.0 version).

I have tried to play the Rai.tv content that is proposed by totem...
Comment 23 Bastien Nocera 2016-04-08 15:26:29 UTC
(In reply to g.trentalancia from comment #22)
> I get a similar problem: totem (all versions up to latest 3.20.0) cannot
> play h.264 video:
<snip>
> ** Message: Missing plugin: gstreamer|1.0|totem|Decoder H.264 (Main
> Profile)|decoder-video/x-h264, stream-format=(string)avc,
> alignment=(string)au, level=(string)3, profile=(string)main,
> parsed=(boolean)true (Decoder H.264 (Main Profile))
> ** Message: Missing plugin: gstreamer|1.0|totem|Decoder MPEG-4
> AAC|decoder-audio/mpeg, mpegversion=(int)4, framed=(boolean)true,
> stream-format=(string)raw, level=(string)2, base-profile=(string)lc,
> profile=(string)lc (Decoder MPEG-4 AAC)

Here, 2 missing plugins.

<snip>
> ** Message: PackageKit: Did not install codec:
> GDBus.Error:org.freedesktop.PackageKit.Modify.transactionCancelled: did not
> agree to search

And you refused to search for the necessary packages to install.

> gstreamer and bad/ugly plugins are installed (libgstx264.so and
> libgstuvch264.so from latest 1.8.0 version).
> 
> I have tried to play the Rai.tv content that is proposed by totem...

You need to install the packages that PackageKit will offer you, like gstreamer1-libav. This has nothing to do with the original bug though, which is about ctstreamer.
Comment 24 g.trentalancia 2016-04-08 16:23:47 UTC
I have installed gst-libav and it now works like a charm ! So, it's not a bug.
Comment 25 Tim-Philipp Müller 2016-04-08 16:32:22 UTC
Your issue may also be related to your (non-intel) vaapi backend not advertising codec profiles as gst-vaapi expects, also see #764673.
Comment 26 g.trentalancia 2016-04-08 16:48:32 UTC
Everything works perfectly after installing gst-libav.

It's just that the totem error message was not very meaningful, as it was pointing to an "x264 decoder" without clearly specifying which package provides it...
Comment 27 GNOME Infrastructure Team 2018-05-24 10:52:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/totem/issues/101.