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

GStreamer Missing Plugin on Jetson #1457

Closed
xinsonglin-bc opened this issue Feb 5, 2025 · 5 comments
Closed

GStreamer Missing Plugin on Jetson #1457

xinsonglin-bc opened this issue Feb 5, 2025 · 5 comments

Comments

@xinsonglin-bc
Copy link

Hi! I am working on a nvidia jetson here. After building from source with the config

cmake -DPORT=WPE -DCMAKE_BUILD_TYPE=Release -DENABLE_MINIBROWSER=ON -DUSE_SOUP2=ON -DUSE_AVIF=OFF -DENABLE_JOURNALD_LOG=OFF -DUSE_GSTREAMER_TRANSCODER=OFF -DUSE_WOFF2=OFF -DENABLE_BUBBLEWRAP_SANDBOX=OFF -GNinja

I am getting a bunch of gstreamer errors launching the MiniBrowser. Using GST_DEBUG=2, I am seeing

0:00:13.587992046  6798 0xaaaadd4c0010 ERROR           webkitcommon GStreamerCommon.cpp:503:operator():<03243f4d-22c6-cf5c-5b7a-2ff9d98bd833-video-0> Got message: error message: 0xfffdfc0042a0, time 99:99:99.999999999, seq-num 228, element 'uridecodebin0', GstMessageError, gerror=(GError)NULL, debug=(string)"gsturidecodebin.c\(987\):\ no_more_pads_full\ \(\):\ /GstPlayBin:03243f4d-22c6-cf5c-5b7a-2ff9d98bd833-video-0/GstURIDecodeBin:uridecodebin0:\012no\ suitable\ plugins\ found:\012gstdecodebin2.c\(4678\):\ gst_decode_bin_expose\ \(\):\ /GstPlayBin:03243f4d-22c6-cf5c-5b7a-2ff9d98bd833-video-0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:\012no\ suitable\ plugins\ found:\012Missing\ decoder:\ H.264\ \(Main\ Profile\)\ \(video/x-h264\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ profile\=\(string\)main\,\ codec_data\=\(buffer\)014d401fffe1001c674d401feca06a1ed80b50601064000003000400000300f03c60c65801000568ebe132c8\,\ width\=\(int\)848\,\ height\=\(int\)480\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ chroma-format\=\(string\)4:2:0\,\ bit-depth-luma\=\(uint\)8\,\ bit-depth-chroma\=\(uint\)8\,\ parsed\=\(boolean\)true\)\012";
0:00:13.588094773  6798 0xaaaadd4c0010 ERROR      webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:1728:handleMessage:<03243f4d-22c6-cf5c-5b7a-2ff9d98bd833-video-0> Your GStreamer installation is missing a plug-in. (url=xxx.mp4) (code=12)
0:00:13.588371370  6798 0xaaaadd4c0010 WARN               structure gststructure.c:1861:priv_gst_structure_append_to_gstring: No value transform to serialize field 'gerror' of type 'GError'
0:00:13.588453680  6798 0xaaaadd4c0010 ERROR           webkitcommon GStreamerCommon.cpp:503:operator():<03243f4d-22c6-cf5c-5b7a-2ff9d98bd833-video-0> Got message: error message: 0xfffdfc0046a0, time 99:99:99.999999999, seq-num 241, element 'qtdemux0', GstMessageError, gerror=(GError)NULL, debug=(string)"qtdemux.c\(6630\):\ gst_qtdemux_loop\ \(\):\ /GstPlayBin:03243f4d-22c6-cf5c-5b7a-2ff9d98bd833-video-0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:\012streaming\ stopped\,\ reason\ not-linked\ \(-1\)", details=(structure)"details\,\ flow-return\=\(int\)-1\;";
0:00:13.588540118  6798 0xaaaadd4c0010 ERROR      webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:1728:handleMessage:<03243f4d-22c6-cf5c-5b7a-2ff9d98bd833-video-0> Internal data stream error. (url=xxx.mp4) (code=1)

What stood out was the message Your GStreamer installation is missing a plug-in. However, I am able to play the video locally with
gst-launch-1.0 filesrc location=<file.mp4> ! qtdemux name=demux ! h264parse ! nvv4l2decoder ! nvegltransform ! nveglglessink winsys=wayland. It seems that somehow GStreamerRegistryScanner.cpp is not picking up the nvidia h264 plugin. Any ideas? Thank you!

I am using
jetson xavier agx with jetpack 5.1.4 running on weston.

@eocanha
Copy link
Member

eocanha commented Feb 6, 2025

It looks more as an issue with caps negotiation while autopluging inside the "playbin ( uridecodebin ( decodebin ) --> playsink )" pipeline (simplified, "(" and ")" mean inner elements, "-->" means connection between elements at the same deepness level).

Are you getting a similar error if you try to play the file like this? That would confirm my theory.

gst-launch-1.0 playbin uri='file:///path/to/file.mp4'

I have never ran WPE on NVidia Jetson, so I'm not sure about what special quirks should apply in that case. We have a Quirks system to fine-tune the pipeline and create the right audio/video sinks (that would demand the right caps for upstream elements, forcing the platform-specific decoders to be selected). Maybe the Jetson platform needs its ows set of quirks to be developed in order to work.

@xinsonglin-bc
Copy link
Author

Thanks for the quick response! Using a stock jetson, this is the error I am getting. It seems gstreamer is trying to use x11 somehow even thought I am in wayland. Appending winsys=wayland does not help.

GST_DEBUG=2 gst-launch-1.0 playbin uri='file:///home/bc/trailer.mp4'
Setting pipeline to PAUSED ...
0:00:00.054152194  8317 0xaaaad2a0aaf0 WARN                 basesrc gstbasesrc.c:3600:gst_base_src_start_complete:<source> pad not activated yet
0:00:00.055327202  8317 0xaaaad2a0aaf0 WARN                 basesrc gstbasesrc.c:3600:gst_base_src_start_complete:<source> pad not activated yet
Pipeline is PREROLLING ...
0:00:00.104401491  8317 0xaaaad2a0f700 WARN                 qtdemux qtdemux_types.c:239:qtdemux_type_get: unknown QuickTime node type iods
0:00:00.104651872  8317 0xaaaad2a0f700 WARN                 qtdemux qtdemux.c:3250:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
0:00:00.104955217  8317 0xaaaad2a0f700 WARN                 qtdemux qtdemux.c:3250:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 2
0:00:00.119991930  8317 0xaaaad2a0f700 WARN                 playbin gstplaybin2.c:4723:autoplug_select_cb:<playbin0> Could not activate sink xvimagesink
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayWayland\)\ gldisplaywayland0";
0:00:00.236749157  8317 0xffff7c014cc0 WARN               glcontext gstglcontext.c:1240:gst_gl_context_create_thread:<glcontextegl0> Failed to create context
0:00:00.236903469  8317 0xaaaad2a0f700 WARN             glimagesink gstglimagesink.c:1010:_ensure_gl_setup:<sink> error: Failed to create window surface: EGL_BAD_ALLOC
0:00:00.237414025  8317 0xaaaad2a0f700 WARN                 playbin gstplaybin2.c:4723:autoplug_select_cb:<playbin0> Could not activate sink glimagesink
0:00:01.786414028  8317 0xaaaad2a0f700 WARN                 kmssink gstkmssink.c:835:gst_kms_sink_start:<kmssink0> error: Could not open DRM module (NULL)
0:00:01.786497008  8317 0xaaaad2a0f700 WARN                 kmssink gstkmssink.c:835:gst_kms_sink_start:<kmssink0> error: reason: Operation not permitted (1)
0:00:01.786593205  8317 0xaaaad2a0f700 WARN                basesink gstbasesink.c:5367:gst_base_sink_change_state:<kmssink0> error: Failed to start
0:00:01.786846563  8317 0xaaaad2a0f700 WARN                 playbin gstplaybin2.c:4723:autoplug_select_cb:<playbin0> Could not activate sink kmssink
0:00:01.795687679  8317 0xaaaad2a0f700 ERROR         nvvideodisplay display_x11.c:77:gst_nv_video_display_x11_new: failed to open X11 display connection
0:00:01.795793540  8317 0xaaaad2a0f700 ERROR         nvvideodisplay display.c:105:gst_nv_video_display_new: couldn't create display. GST_NV_VIDEO_WINSYS = (null)
0:00:01.795837319  8317 0xaaaad2a0f700 ERROR               nv3dsink gstnv3dsink.c:245:gst_nv3dsink_start:<nv3dsink0> failed to create new display
0:00:01.795880713  8317 0xaaaad2a0f700 WARN                basesink gstbasesink.c:5367:gst_base_sink_change_state:<nv3dsink0> error: Failed to start
0:00:01.796044466  8317 0xaaaad2a0f700 WARN                 playbin gstplaybin2.c:4723:autoplug_select_cb:<playbin0> Could not activate sink nv3dsink

Using winsys: x11 
0:00:01.798880011  8317 0xaaaad2a0aaf0 WARN               structure gststructure.c:1861:priv_gst_structure_append_to_gstring: No value transform to serialize field 'display' of type 'GstEGLDisplay'
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Redistribute latency...
0:00:02.183345823  8317 0xffff800365e0 ERROR            egladaption gstegladaptation.c:660:gst_egl_adaptation_choose_config:<eglglessink0> Could not find matching framebuffer config
0:00:02.183438596  8317 0xffff800365e0 ERROR            egladaption gstegladaptation.c:674:gst_egl_adaptation_choose_config:<eglglessink0> Couldn't choose an usable config
0:00:02.183485894  8317 0xffff800365e0 ERROR          nveglglessink gsteglglessink.c:2709:gst_eglglessink_configure_caps:<eglglessink0> Couldn't choose EGL config
0:00:02.183510919  8317 0xffff800365e0 ERROR          nveglglessink gsteglglessink.c:2767:gst_eglglessink_configure_caps:<eglglessink0> Configuring caps failed
0:00:02.183799383  8317 0xffff800366a0 ERROR          nveglglessink gsteglglessink.c:2808:gst_eglglessink_setcaps:<eglglessink0> Failed to configure caps
0:00:02.183964448  8317 0xffff800366a0 ERROR          nveglglessink gsteglglessink.c:2808:gst_eglglessink_setcaps:<eglglessink0> Failed to configure caps
0:00:02.184086598  8317 0xffff800366a0 WARN                GST_PADS gstpad.c:4231:gst_pad_peer_query:<vconv:src> could not send sticky events
Redistribute latency...
0:00:02.195848639  8317 0xffff800366a0 ERROR          nveglglessink gsteglglessink.c:2808:gst_eglglessink_setcaps:<eglglessink0> Failed to configure caps
0:00:02.195893506  8317 0xffff800366a0 WARN                GST_PADS gstpad.c:4231:gst_pad_peer_query:<vconv:src> could not send sticky events
0:00:02.198711258  8317 0xffff800366a0 ERROR          nveglglessink gsteglglessink.c:2808:gst_eglglessink_setcaps:<eglglessink0> Failed to configure caps
0:00:02.198788030  8317 0xffff800366a0 ERROR          nveglglessink gsteglglessink.c:2808:gst_eglglessink_setcaps:<eglglessink0> Failed to configure caps
0:00:02.198877378  8317 0xffff800366a0 ERROR          nveglglessink gsteglglessink.c:2808:gst_eglglessink_setcaps:<eglglessink0> Failed to configure caps
0:00:02.198968647  8317 0xffff800366a0 ERROR          nveglglessink gsteglglessink.c:2808:gst_eglglessink_setcaps:<eglglessink0> Failed to configure caps
0:00:02.199035819  8317 0xffff800366a0 ERROR          nveglglessink gsteglglessink.c:2808:gst_eglglessink_setcaps:<eglglessink0> Failed to configure caps
0:00:02.203048067  8317 0xaaaad2a0f700 WARN                 qtdemux qtdemux.c:6630:gst_qtdemux_loop:<qtdemux0> error: Internal data stream error.
0:00:02.203103302  8317 0xaaaad2a0f700 WARN                 qtdemux qtdemux.c:6630:gst_qtdemux_loop:<qtdemux0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: Internal data stream error.
Additional debug info:
qtdemux.c(6630): gst_qtdemux_loop (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
0:00:02.220720218  8317 0xffff80036cc0 WARN                GST_PADS gstpad.c:4231:gst_pad_peer_query:<aconv:src> could not send sticky events
0:00:02.225924274  8317 0xffff7c014e40 WARN                   libav gstavauddec.c:628:gst_ffmpegauddec_drain:<avdec_aac0> send packet failed, could not drain decoder
Freeing pipeline ...

Then, on a different jetson with some extra setup to enable dmabuf, I am able to play the video. However, running the MiniBrowser still shows the same error message in the original post.

GST_DEBUG=2 gst-launch-1.0 playbin uri='file:///home/bc/trailer.mp4'
Setting pipeline to PAUSED ...
0:00:00.055351233 154634 0xaaaaf9925630 WARN                 basesrc gstbasesrc.c:3600:gst_base_src_start_complete:<source> pad not activated yet
0:00:00.056433819 154634 0xaaaaf9925630 WARN                 basesrc gstbasesrc.c:3600:gst_base_src_start_complete:<source> pad not activated yet
Pipeline is PREROLLING ...
0:00:00.101866924 154634 0xaaaaf9924f00 WARN                 qtdemux qtdemux_types.c:239:qtdemux_type_get: unknown QuickTime node type iods
0:00:00.102091864 154634 0xaaaaf9924f00 WARN                 qtdemux qtdemux.c:3250:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
0:00:00.102401865 154634 0xaaaaf9924f00 WARN                 qtdemux qtdemux.c:3250:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 2
0:00:00.118510274 154634 0xaaaaf9924f00 WARN                 playbin gstplaybin2.c:4723:autoplug_select_cb:<playbin0> Could not activate sink xvimagesink
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayWayland\)\ gldisplaywayland0";
0:00:00.228824783 154634 0xffffa80148c0 WARN               glcontext gstglcontext.c:1240:gst_gl_context_create_thread:<glcontextegl0> Failed to create context
0:00:00.228981623 154634 0xaaaaf9924f00 WARN             glimagesink gstglimagesink.c:1010:_ensure_gl_setup:<sink> error: Failed to create window surface: EGL_BAD_ALLOC
0:00:00.229626233 154634 0xaaaaf9924f00 WARN                 playbin gstplaybin2.c:4723:autoplug_select_cb:<playbin0> Could not activate sink glimagesink
0:00:01.748477409 154634 0xaaaaf9924f00 WARN                 kmssink gstkmssink.c:835:gst_kms_sink_start:<kmssink0> error: Could not open DRM module (NULL)
0:00:01.748562597 154634 0xaaaaf9924f00 WARN                 kmssink gstkmssink.c:835:gst_kms_sink_start:<kmssink0> error: reason: Operation not permitted (1)
0:00:01.748697164 154634 0xaaaaf9924f00 WARN                basesink gstbasesink.c:5367:gst_base_sink_change_state:<kmssink0> error: Failed to start
0:00:01.748958202 154634 0xaaaaf9924f00 WARN                 playbin gstplaybin2.c:4723:autoplug_select_cb:<playbin0> Could not activate sink kmssink
0:00:01.750641044 154634 0xaaaaf9924f00 WARN              ximagesink ximagesink.c:859:gst_x_image_sink_xcontext_get:<ximagesink0> error: Could not initialise X output
0:00:01.750703799 154634 0xaaaaf9924f00 WARN              ximagesink ximagesink.c:859:gst_x_image_sink_xcontext_get:<ximagesink0> error: Could not open display
0:00:01.750873056 154634 0xaaaaf9924f00 WARN                 playbin gstplaybin2.c:4723:autoplug_select_cb:<playbin0> Could not activate sink ximagesink

** (gst-launch-1.0:154634): CRITICAL **: 08:39:01.806: gst_video_format_to_string: assertion 'format != GST_VIDEO_FORMAT_UNKNOWN' failed
0:00:02.140523515 154634 0xffffa0035a40 WARN             waylandsink wlvideoformat.c:137:gst_video_format_to_wl_dmabuf_format: wayland dmabuf video format not found
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstPulseSinkClock
0:00:02.249670634 154634 0xffffa0035a40 WARN             waylandsink wlvideoformat.c:137:gst_video_format_to_wl_dmabuf_format: wayland dmabuf video format not found

Thank you!

@philn
Copy link

philn commented Feb 8, 2025

Which WPE version did you build exactly? This downstream fork or the upstream repo from WebKit/WebKit?

@xinsonglin-bc
Copy link
Author

Which WPE version did you build exactly? This downstream fork or the upstream repo from WebKit/WebKit?

I built 2.38.6 from here.

@philn
Copy link

philn commented Feb 10, 2025

OK, so please open an issue in bugs.webkit.org thanks :)

@philn philn closed this as completed Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants