GNOME Bugzilla – Bug 728655
Totem can't play H.264 stream
Last modified: 2018-05-24 10:52:24 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.
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 ***
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.
(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.
yes, gstreamer1-libav has been installed the whole time
Try to remove the ~/.cache/gstreamer-1.0/registry.* files and launch totem again. Do not install gstreamer-plugin-crystalhd.
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.
You'll need to give me a step-by-step reproducer for this, I can't reproduce this problem here.
Make sure you also have the h264parse element from gst-plugins-bad installed.
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`
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)
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.
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)?
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.
> 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
(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.
a full GST_DEBUG=*:6 debug log (xz -9 zipped) might help find the cause of that.
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
Created attachment 283586 [details] the gstreamer log when playing video from ctstreamer, no search for H.264 plugin
Created attachment 283587 [details] the gstreamer log when playing video from ctstreamer, with search for H.264 plugin
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.
is there a way to keep Fedora 20 and take just the required gstreamer packages from 21?
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...
(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.
I have installed gst-libav and it now works like a charm ! So, it's not a bug.
Your issue may also be related to your (non-intel) vaapi backend not advertising codec profiles as gst-vaapi expects, also see #764673.
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...
-- 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.