GNOME Bugzilla – Bug 790633
vaapi: Show video with artifacts under Wayland on AMD
Last modified: 2017-12-17 08:20:11 UTC
On Fedora 27 with GNOME on Wayland, Totem playing all video files with artifacts. With GNOME on Xorg problem is disappeared. Demonstration: https://youtu.be/Z8RtuoWEJ-g $ gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! matroskademux ! h264parse ! vaapih264dec ! vaapisink libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) Setting pipeline to PAUSED ... libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) Pipeline is PREROLLING ... Got context from element 'vaapisink0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayDRM\)\ vaapidisplaydrm1"; Redistribute latency... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 0:03:53.107783793 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
Any reason to title this bug report "glimagesink" if you are using vaapisink ?
Above output from GNOME on Xorg, below output from GNOME on Wayland: $ gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! matroskademux ! h264parse ! vaapih264dec ! glimagesink Setting pipeline to PAUSED ... mesa: for the -simplifycfg-sink-common option: may only occur zero or one times! Pipeline is PREROLLING ... Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0"; Got context from element 'vaapidecode_h264-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayWayland\)\vaapidisplaywayland1"; Redistribute latency... ERROR: from element /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLUploadEle ment:gluploadelement0: Failed to upload buffer Additional debug info: gstgluploadelement.c(250): gst_gl_upload_element_prepare_output_buffer (): /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLUploadEle ment:gluploadelement0 ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ... I discussed this issue with amdgpu developer, because think that this is specific GPU problem. But without vaapi we have same result.
For Victor to have a look, provide which Intel HW you are running this on, it works for me (run vainfo): Intel i965 driver for Intel(R) Ivybridge Mobile - 1.8.3 So it looks like a AMD VAAPI driver issue somehow. Note that you should not use vaapih264dec directly, but vaapidecodebin if you want to use it with glimagesink, autocluttersink (like totem) etc.
Was previous reply was mid-air. So you say you have non-vaapi pipeline to reproduce the issue ? What do you mean, does the following works ? videotestsrc ! glimagesink filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! matroskademux ! h264parse ! avdec_h264 ! glimagesink filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! matroskademux ! h264parse ! openh264dec ! glimagesink I'm marking this bug report as NEEDINFO because I have no idea how I can assist you with this issue.
Maybe give some output with / without this env too ? export GST_GL_WINDOW=wayland
Please look new demonstration: https://youtu.be/WXBiCF1YnBQ Command which you provide above show video without artifacts, but totem still show video with artifacts gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! matroskademux ! h264parse ! vaapidecodebin ! glimagesink Setting pipeline to PAUSED ... mesa: for the -simplifycfg-sink-common option: may only occur zero or one times! Pipeline is PREROLLING ... Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0"; Got context from element 'vaapipostproc0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayWayland\)\ vaapidisplaywayland1"; Redistribute latency... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Redistribute latency... Got EOS from element "pipeline0". Execution ended after 0:03:53.107730387 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... What it means?
Also I want noted that variant without vaapi also worked without artifacts: $ gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! matroskademux ! h264parse ! avdec_h264 ! glimagesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0"; Redistribute latency... Redistribute latency... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 0:03:53.107727538 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
So it is a vaapi decoder issue in the end. If all you care about is getting Totem to work: dnf remote gstramer1-vaapi
Please watch my last demo. I try both variants without vaapi and with vaapi. Totem show artifacts in both cases. But gst-launch was showed video fine in both cases. Demo: https://youtu.be/Uv0_CJ3gKWE
It means both variants with and without VAAPI works fine when we manually set path in gst-launch-1.0 And this both variants show artifacts in Totem player.
Maybe a duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=784369 or https://bugzilla.gnome.org/show_bug.cgi?id=781972 ?
It's a bit weird, you should also test with ! autocluttersink, as this is what Totem uses. Because gnome app are persistant, have you made sure that Totem was not running anymore ? (See GApplication and their D-Bbus interface for details).
Julien, it's quite visually different from the two other bugs though.
(In reply to Mikhail from comment #10) > It means both variants with and without VAAPI works fine when we manually > set path in gst-launch-1.0 > And this both variants show artifacts in Totem player. May I suggest one tests (already requested by Nicolas): uninstall gstreamer-vaapi and run gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! decodebin ! clutterautovideosink how does it look? As you are testing with Totem, Totem uses clutter video sink. Perhaps there's some issue with cogl/clutter along your video card.
$ gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! decodebin ! autocluttersink - able reproduce Totem bug with this command, for addition info please see demonstration: https://youtu.be/Wiqsq1g8xzw $ gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! decodebin ! clutterautovideosink WARNING: erroneous pipeline: no element "clutterautovideosink" - This is incorrect command
autocluttersink is the correct one in your setup. At least we have found the problematic element here: the clutter sink. Let me assign it.
Just to confirm, this works with an issue : $ gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! matroskademux ! h264parse ! avdec_h264 ! glimagesink This doesn't work : $ gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! matroskademux ! h264parse ! avdec_h264 ! clutterautovideosink
Also, is the video available anywhere? Thanks!
Artifacts are present on all videos. So you're not needed have demonstration video for debugging problem. But if you want download it for fun you can do this from my server: https://download.sy24.ru/PSY%20-%20Gentleman.mkv
Ok, so we just(TM) need the same hardware ;-P
I don't know how it related, but after update mesa to 17.4.0-0.11.git20d37da version seems issue was gone.
Closing as not gnome - not related, according to comment 21
But Intel GPU still having artifacts with gstreamer1-vaapi. Demonstration: https://youtu.be/73amHQeS30Q
And strange why command: $ gst-launch-1.0 -f filesrc location= Videos/2D/PSY\ -\ Gentleman.mkv ! decodebin ! autocluttersink WARNING: erroneous pipeline: no element "autocluttersink" no more working?