Bug 183336

Summary: [GStreamer] gstreamergl option results in solid black videos
Product: WebKit Reporter: Jeremy Bicha <jbicha>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: bugs-noreply, clopez, magomez, mcatanzaro, pnormand
Priority: P3 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
yelp with gst-debug none

Description Jeremy Bicha 2018-03-05 09:50:44 PST
Ubuntu 18.04 pre-beta
webkit2gtk 2.19.91
gstreamer 1.13.1

Ubuntu had to use -DUSE_GSTREAMER_GL=OFF because gstreamergl was in gstreamer's bad plugins which are excluded from Ubuntu's default install. Since Ubuntu 18.04 recently got gstreamer 1.13.1 which moved gstreamergl into the base set, I built webkit2gtk without that option.

Now, videos show up as solid black

1. with the GNOME help app yelp showing the GNOME Getting Started videos, and

2. with YouTube in Epiphany 3.27.90

My test build was done at
https://launchpad.net/~jbicha/+archive/ubuntu/webkit1/+packages
Comment 1 Michael Catanzaro 2018-03-05 11:24:52 PST
I'm assuming there's no command line warnings?
Comment 2 Jeremy Bicha 2018-03-05 11:28:59 PST
(In reply to Michael Catanzaro from comment #1)
> I'm assuming there's no command line warnings?

Sorry. I don't see any.
Comment 3 Carlos Alberto Lopez Perez 2018-03-05 11:29:07 PST
Is this with X11 or with Wayland? Is OpenGL working fine ? Which driver... Mesa?

Does loading a webpage that triggers the AC mode like https://webkit.org/blog-files/3d-transforms/poster-circle.html work?
Comment 4 Philippe Normand 2018-03-05 11:29:49 PST
Please attach GST_DEBUG="3,webkit*:6" logs.
Is this on Xorg or Wayland.
Is GStreamer-vaapi installed? Do things improve if you uninstall it?
Comment 5 Jeremy Bicha 2018-03-05 11:57:58 PST
Created attachment 335013 [details]
yelp with gst-debug

some debug logs attached.
Comment 6 Jeremy Bicha 2018-03-05 12:08:53 PST
(In reply to Philippe Normand from comment #4)
> Please attach GST_DEBUG="3,webkit*:6" logs.

Done, but that log was with X. Let me know if you want a Wayland version too.

> Is this on Xorg or Wayland.

I originally reported this from Wayland, but video also doesn't work on Xorg. It's not a solid black screen but it doesn't really animate either or load what I'd expect to be the first frame.

> Is GStreamer-vaapi installed? Do things improve if you uninstall it?

It was not installed.


(In reply to Carlos Alberto Lopez Perez from comment #3)
> Is OpenGL working fine ? Which driver...
> Mesa?

Yes, I believe OpenGL works fine.

I believe I'm using Mesa. My graphics card is Intel HD Graphics 620 (Kaby Lake GT2). My X log says "[DRI2] DRI driver: i965   [DRI2] VDPAU driver: i965"

> Does loading a webpage that triggers the AC mode like
> https://webkit.org/blog-files/3d-transforms/poster-circle.html work?

Yes
Comment 7 Philippe Normand 2018-03-05 12:16:46 PST
There you go:

0:00:01.174768608  7036 0x555d92c72e70 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "glupload"!
0:00:01.174780169  7036 0x555d92c72e70 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "glcolorconvert"!
0:00:01.174900383  7036 0x555d92c72e70 WARN       webkitmediaplayer MediaPlayerPrivateGStreamerBase.cpp:1032:createVideoSinkGL: Failed to create GstGL elements
0:00:01.174984942  7036 0x555d92c72e70 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "fpsdisplaysink"!

Did you install gst-plugins-base 1.13.90?
What is the output of gst-inspect-1.0 glupload ?
Comment 8 Jeremy Bicha 2018-03-05 12:22:29 PST
Thank you very much.

I am closing this bug since I fixed this issue by installing

gstreamer1.0-gl
Comment 9 Carlos Alberto Lopez Perez 2018-03-05 12:29:26 PST
(In reply to Philippe Normand from comment #7)
> There you go:
> 
> 0:00:01.174768608  7036 0x555d92c72e70 WARN     GST_ELEMENT_FACTORY
> gstelementfactory.c:456:gst_element_factory_make: no such element factory
> "glupload"!
> 0:00:01.174780169  7036 0x555d92c72e70 WARN     GST_ELEMENT_FACTORY
> gstelementfactory.c:456:gst_element_factory_make: no such element factory
> "glcolorconvert"!
> 0:00:01.174900383  7036 0x555d92c72e70 WARN       webkitmediaplayer
> MediaPlayerPrivateGStreamerBase.cpp:1032:createVideoSinkGL: Failed to create
> GstGL elements
> 0:00:01.174984942  7036 0x555d92c72e70 WARN     GST_ELEMENT_FACTORY
> gstelementfactory.c:456:gst_element_factory_make: no such element factory
> "fpsdisplaysink"!
> 
> Did you install gst-plugins-base 1.13.90?
> What is the output of gst-inspect-1.0 glupload ?

I wonder if we should print a more loud warning in cases like this (aka: a warning that gets printed by default always and not only in the gstreamer debug logs) 

??
Comment 10 Philippe Normand 2018-03-05 12:36:29 PST
We could.
But gstreamer and gst-plugins-base are build-dependencies. I wonder how Jeremy could build WebKit without libgstgl? I don't understand how they split debian packages, but something's wrong from the distro POV if you can build WebKit and link it to libgstgl and at the same time not be able to use the gl* elements without installing an additional package at runtime.
Comment 11 Jeremy Bicha 2018-03-05 12:47:48 PST
I agree that this is just a distro packaging problem.

Debian & Ubuntu's gstreamer1.0-gl only contains
/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopengl.so

My Webkit depends on libgstreamer-gl1.0-0 which only contains
/usr/lib/x86_64-linux-gnu/libgstgl-1.0.so.0

gstreamer1.0-gl depends on libgstreamer-gl1.0-0 but not the other way around.

I see that in the similar situation, libgstreamer-plugins-base1.0-0 Recommends (aka, soft dependency) gstreamer1.0-plugins-base so I'll ask for a Recommends here too.