Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No video output with gtk4paintablesink and clappersink #80

Open
jeffshee opened this issue Dec 1, 2023 · 4 comments
Open

No video output with gtk4paintablesink and clappersink #80

jeffshee opened this issue Dec 1, 2023 · 4 comments

Comments

@jeffshee
Copy link

jeffshee commented Dec 1, 2023

Hi! First of all, thanks for the work on this Gstreamer plugin.

Background

I want to use gstcefsrc to render webpages in a Gtk4 app. To integrate GStreamer into Gtk4, currently, there are 2 possible solutions:

  1. By using gtk4paintablesink developed by GStreamer developers.
  2. By using clappersink that is distributed with Clapper.

Issue

gstcefsrc works fine with xvimagesink. However, this isn't the case for gtk4paintablesink and clappersink.
When using gstcefsrc with gtk4paintablesink, the pipeline will go to the PLAYING state. (Tested with gst-launch-1.0. Nothing will be shown but audio will be played.) However, when integrated into Gtk4, it shows nothing.
When using gstcefsrc with clappersink, the pipeline will stuck at the PAUSED state forever. When integrated into Gtk4, it shows nothing as well.

Reproduce

To demonstrate the issue, I wrote a minimal Gtk4 video player app in Gjs. You can check it here:
https://github.com/jeffshee/web-renderer-test

Thanks.

@MathieuDuponchelle
Copy link
Collaborator

That's interesting, I haven't used either sink. Dumb question: do these work with videotestsrc is-live=true as the source ? Do you get warning messages (GST_DEBUG=2)? Have you tried removing the audio branch altogether to simplify your test case?

@sdroege
Copy link
Contributor

sdroege commented Dec 4, 2023

do these work with videotestsrc is-live=true as the source

Generally, yes :) (gtk4paintablesink at least, the other one I never tried)

@jeffshee
Copy link
Author

jeffshee commented Dec 5, 2023

Thanks for reply!

do these work with videotestsrc is-live=true as the source

For gkt4paintablesink, the pipeline is set to PLAYING with no error/warning output. (It's hard to tell though since it doesn't seem to spawn a dummy window like other sinks do.)

For clappersink, it works. A dummy window was spawned, showing the test video.

Do you get warning messages (GST_DEBUG=2)? Have you tried removing the audio branch altogether to simplify your test case?

These are the commands that I tested and their outputs.
For gtk4paintablesink without audio.

❯ (### Full pipeline w/ gtk4paintablesink (w/o audio)
… subsh ❯ export GST_PLUGIN_PATH=build/lib/gstreamer-1.0:"$GST_PLUGIN_PATH"
… subsh ❯ export GST_DEBUG=WARNING
… subsh ❯ gst-launch-1.0 \
… subsh ❯     cefsrc url="https://soundcloud.com/platform/sama" ! \
… subsh ❯     video/x-raw, width=1920, height=1080, framerate=60/1 ! cefdemux name=d d.video ! \
… subsh ❯     queue max-size-bytes=0 max-size-buffers=0 max-size-time=3000000000 ! videoconvert ! \
… subsh ❯     gtk4paintablesink
… subsh ❯ ###
… subsh ❯ )
Setting pipeline to PAUSED ...
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
0:00:02.520966776 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> https://accounts.google.com/gsi/intermediate:92 Unrecognized feature: 'identity-credentials-get'.
0:00:03.600463337 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600491780 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized feature: 'ambient-light-sensor'.
0:00:03.600508792 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600522769 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized feature: 'battery'.
0:00:03.600546744 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600565840 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600580548 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600611566 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600630782 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600645951 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600660949 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600675096 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600697247 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600718658 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600733866 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600746570 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600759615 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.600770926 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized feature: 'wake-lock'.
0:00:03.608935900 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.608962690 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized feature: 'ambient-light-sensor'.
0:00:03.608977619 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.608989922 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized feature: 'battery'.
0:00:03.609002556 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609014218 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609026881 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609039255 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609051899 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609063230 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609076685 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609087876 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609100270 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609111781 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609123994 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609135416 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609148421 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:03.609159612 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized feature: 'wake-lock'.
0:00:04.615833794 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.615886353 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized feature: 'ambient-light-sensor'.
0:00:04.615926909 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.615959250 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized feature: 'battery'.
0:00:04.616011719 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616052035 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616088654 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616117117 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616148547 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616175708 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616206927 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616232775 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616277149 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616303970 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616331401 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616373711 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616399419 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized origin: 'none'.
0:00:04.616422002 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> :0 Error with Feature-Policy header: Unrecognized feature: 'wake-lock'.
0:00:04.990415096 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> https://a-v2.sndcdn.com/assets/50-22bd0e75.js:86 [GSI_LOGGER]: Message ignored due to invalid source.
0:00:04.994303332 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> https://a-v2.sndcdn.com/assets/50-22bd0e75.js:86 [GSI_LOGGER]: Message ignored due to invalid source.
0:00:04.995745229 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> https://a-v2.sndcdn.com/assets/50-22bd0e75.js:86 [GSI_LOGGER]: Message ignored due to invalid source.
0:00:05.115116591 125566 0x55a29e8e9bb0 WARN              cefconsole gstcefsrc.cc:272:OnConsoleMessage:<cefsrc0> https://a-v2.sndcdn.com/assets/50-22bd0e75.js:86 [GSI_LOGGER]: Message ignored due to invalid source.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:09.662937597
Setting pipeline to NULL ...
Freeing pipeline ...

For clappersink without audio. It stuck at PAUSED state.

❯ (### Full pipeline w/ clappersink (w/o audio)
… subsh ❯ export GST_PLUGIN_PATH=build/lib/gstreamer-1.0:"$GST_PLUGIN_PATH"
… subsh ❯ export GST_DEBUG=WARNING
… subsh ❯ gst-launch-1.0 \
… subsh ❯     cefsrc url="https://soundcloud.com/platform/sama" ! \
… subsh ❯     video/x-raw, width=1920, height=1080, framerate=60/1 ! cefdemux name=d d.video ! \
… subsh ❯     queue max-size-bytes=0 max-size-buffers=0 max-size-time=3000000000 ! videoconvert ! \
… subsh ❯     clappersink
… subsh ❯ ###
… subsh ❯ )
Setting pipeline to PAUSED ...
^C

Please tell me if you want me to test more stuff ;-)

@sdroege
Copy link
Contributor

sdroege commented Dec 5, 2023

You can't use gtk4paintablesink from gst-launch, it won't automatically create a window. The whole point is to write a GTK4 app and integrate video output into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants