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 724062 - Fails to decode MPEG2 on GM45 (i965)
Fails to decode MPEG2 on GM45 (i965)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-10 18:56 UTC by Giovanni Campagna
Modified: 2016-10-31 14:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Giovanni Campagna 2014-02-10 18:56:04 UTC
I installed gstreamer-vaapi from git master (0.2.6-1159-gb763fda), togheter with gstreamer master (1.2.0-225-g53d8460), but I can't get it to work.

Using a simple playbin fails with:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /opt/gnome/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
Got context from element 'vaapisink0': gst.vaapi.Display=context, display=(GstVaapiDisplay)NULL;
Got context from element 'vaapidecode0': gst.vaapi.Display=context, display=(GstVaapiDisplay)NULL;
0:00:02.058046976 23902 0x7f6044088a80 ERROR            vaapidecode gstvaapidecode.c:370:gst_vaapidecode_push_decoded_frame: video sink rejected the video buffer (error -4)
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstTSDemux:tsdemux0: Internal data stream error.
Additional debug info:
mpegtsbase.c(1320): mpegts_base_loop (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstTSDemux:tsdemux0:
stream stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

A more complex pipeline, such as
uridecodebin name=uridecodebin0 uridecodebin0.src_0 ! vaapisink uridecodebin0.src_1 ! pulsesink

gives me working sound and video, but it's missing vaapidecode in the middle, so I guess it's not using HW acceleration?

Adding vaapidecode in the mix, such as
uridecodebin name=uridecodebin0 uridecodebin0.src_0 ! vaapidecode ! vaapisink uridecodebin0.src_1 ! pulsesink
hangs the pipeline during preroll (with or without the pulsesink)

I should add that the playbin problem only happens with MPEG2 content, which is the only codec this card can handle. With other types, it works fine, even though libva, vaapisink and vaapidecode are still initialized.
If I force the uridecodebin to go through vaapidecode, it hangs in the same way.

Please tell me if anything else is needed to debug this.
Comment 1 Gwenole Beauchesne 2014-07-03 15:02:07 UTC
Hi, with GStreamer >= 1.0, you really should be using gstreamer-vaapi master, not the 0.2-branch which is very outdated. For the record, the repository has been moved to Gitorious for a while: https://gitorious.org/vaapi/gstreamer-vaapi/ :)

Note decodebin will automatically select the decode element. You need to provide the sink only (! vaapisink).
Comment 2 Giovanni Campagna 2014-07-05 15:14:23 UTC
I was already on the gitorious repo, and 0.2.6-1159-gb763fda was really 0.5.9.1, you just forgot to push all tags ever since :)

Trying with today's master (0.2.6-1288-g22dc8c4, which is again a 0.5.9.1) I still have no luck with playbin, it fails in the same way:

0:00:00.464389221 29185 0x7fd3c4003370 ERROR            vaapidecode gstvaapidecode.c:393:gst_vaapidecode_push_decoded_frame: video sink rejected the video buffer (error -4)

I should add that manually running
filesrc ! tsdemux ! mpegvideoparse ! vaapidecode ! vaapisink
gives me working HW accelerated video (but no audio, obviously)

Comparing the caps between the two runs I see no difference, for the record they are video/x-raw,format=NV12,width=640,height=400,pixel-aspect-ratio=1/1,interlace-mode=progressive,colorimetry=bt601, framerate=30/1

Adding the same chain that a playsink would give (videoconvert ! deinterlace ! queue ! identity ! videoconvert ! videoscale ! videobalance ! videoconvert, but not the streamsynchronizer and audio parts) still provides working HW accelerated video, with the same caps.

I didn't manage to connect the vaapidecode to an actual playsink though, or a to a pipeline with a stream-synchronizer, to see if the problem was syncing with audio.

On the other hand running
uridecodebin ! vaapisink
gives me working video, but GST_DEBUG_DUMP_DOT_DIR tells me it's using mpeg2dec instead of vaapidecode (despite using a typefind just like playbin...)
Comment 3 sreerenj 2015-06-19 12:06:55 UTC
Is it still reproducible,
Could you please check with current git master?..
Comment 4 sreerenj 2016-03-24 16:55:31 UTC
Moving to Product:GStreamer, Component:gstreamer-vaapi
Comment 5 sreerenj 2016-06-17 12:13:31 UTC
Closing as Fixed. Please feel free to reopen if issue persists.