<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 15 mai 2019 15 h 25, horai <<a href="mailto:ivo.hora@seznam.cz">ivo.hora@seznam.cz</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
I would kindly ask you for a help with my issue. I have RPI3B+, X11,<br>
compiled Gstreamer 1.16, KMS driver,no window manager in X11<br>
I am playing test files this way :<br>
gst-launch-1.0 -e filesrc location=/home/pi/jellyfish-15-mbps-hd-h264.mkv !<br>
matroskademux ! h264parse ! v4l2h264dec capture-io-mode=4 ! kmssink<br>
It works very much ok only in command line, the speed is amazing.<br>
<br>
My problem is, since kmssink cannot be used in X11 (as far as I know), I am<br>
enclosing following pipelines (both with hardware accelerated sinks) ,with<br>
comments, which I would like to encapsulate into GTK window in order to have<br>
video rendering in GTK window (GstOverlay or Clutter stage):<br>
1) gst-launch-1.0 -e filesrc location=/home/pi/jellyfish-3-mbps-hd-h264.mkv<br>
! matroskademux ! h264parse ! v4l2h264dec capture-io-mode=4 !<br>
clutterautovideosink<br>
ad 1) This pipeline works but is very slow compared to kmssink (I understand<br>
X11 could cause some overhead but could it really be so serious?)<br>
Anyway, glimagesink is recommended, therefore in X11:<br>
2) export GST_GL_API=opengl<br>
gst-launch-1.0 -e filesrc location=/home/pi/jellyfish-3-mbps-hd-h264.mkv !<br>
matroskademux ! h264parse ! v4l2h264dec capture-io-mode=4 ! glupload !<br>
glimagesink<br>
ad). This pipeline shows one image of the desired video hands printing this<br>
output:<br>
Setting pipeline to PAUSED ...<br>
0:00:03.869568671 817 0x18a6460 WARN basesrc<br>
gstbasesrc.c:3600:gst_base_src_start_complete:<filesrc0> pad not activated<br>
yet<br>
Pipeline is PREROLLING ...<br>
Got context from element 'sink': gst.gl.GLDisplay=context,<br>
gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";<br>
0:00:04.099781284 817 0x18816f0 WARN v4l2<br>
gstv4l2object.c:4194:gst_v4l2_object_probe_caps:<v4l2h264dec0:src> Failed to<br>
probe pixel aspect ratio with VIDIOC_CROPCAP: Invalid argument<br>
0:00:04.144984350 817 0x18816f0 WARN v4l2videodec<br>
gstv4l2videodec.c:810:gst_v4l2_video_dec_decide_allocation:<v4l2h264dec0><br>
Duration invalid, not setting latency<br>
0:00:04.184819802 817 0x6e73cac0 WARN v4l2bufferpool<br>
gstv4l2bufferpool.c:1263:gst_v4l2_buffer_pool_dqbuf:<v4l2h264dec0:pool:src><br>
Driver should never set v4l2_buffer.field to ANY<br>
0:00:04.270274157 817 0x6e73cac0 WARN dmabuf<br>
gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without<br>
synchronization.<br>
0:00:04.270424732 817 0x6e73cac0 WARN dmabuf<br>
gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without<br>
synchronization.<br>
0:00:04.270458014 817 0x6e73cac0 WARN dmabuf<br>
gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without<br>
synchronization.<br>
0:00:04.297981763 817 0x6e73cac0 WARN dmabuf<br>
gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without<br>
synchronization.<br>
0:00:04.298045150 817 0x6e73cac0 WARN dmabuf<br>
gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without<br>
synchronization.<br>
0:00:04.298073119 817 0x6e73cac0 WARN dmabuf<br>
gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without<br>
synchronization.<br>
0:00:05.932123123 817 0x6e73cac0 WARN dmabuf<br>
gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without<br>
synchronization.<br>
0:00:05.932190884 817 0x6e73cac0 WARN dmabuf<br>
gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without<br>
synchronization.<br>
0:00:05.932218853 817 0x6e73cac0 WARN dmabuf<br>
gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without<br>
synchronization.<br>
Pipeline is PREROLLED ...<br>
Setting pipeline to PLAYING ...<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">That is really spammy. It's first time someone report hitting this bug. I'll try and make this warning happened once, sorry for that.</div><div dir="auto"><br></div><div dir="auto">That being said, there must be a missing system header, since dmabuf sync API should be available on this fairly recent Linux kernel. Would be good to report the missing system header to your packager. This is libgsallocators library from -base.</div><div dir="auto"><br></div><div dir="auto">Now, since you see this warning, it means that the dmabuf was mapped to CPU, which also means dmabuf importation to GL failed (no zero copy). As you are running on X11, you need to force EGL to ensure dmabuf importation is even tried. You can try GST_GL_PLATFORM=egl env. You should also try gles2 API instead of opengl, since the GPU is designed for GLES.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Actually, my final goal is to run following pipeline which is a rendering of<br>
a RTSP stream:<br>
sudo gst-launch-1.0 rtspsrc location="rtsp://<a href="http://10.0.0.2:8555/test" rel="noreferrer noreferrer" target="_blank">10.0.0.2:8555/test</a>" latency=200<br>
! rtph264depay ! h264parse ! v4l2h264dec capture-io-mode=4 ! videoconvert !<br>
clutterautovideosink<br>
Despite the fact I have to run it in superuser mode otherwise I face issues<br>
with size of a buffer, this pipeline (not under cluttersink in X11 nor<br>
kmssink without X11 )does not show any video image, just this text output:<br>
Progress: (request) Sent PLAY request<br>
0:00:01.178897447 1331 0x73e0e430 FIXME rtpjitterbuffer<br>
gstrtpjitterbuffer.c:1551:gst_jitter_buffer_sink_parse_caps:<rtpjitterbuffer0><br>
Unsupported timestamp reference clock<br>
0:00:01.179056041 1331 0x73e0e430 FIXME rtpjitterbuffer<br>
gstrtpjitterbuffer.c:1559:gst_jitter_buffer_sink_parse_caps:<rtpjitterbuffer0><br>
Unsupported media clock<br>
0:00:01.183729166 1331 0x703019b0 FIXME basesink<br>
gstbasesink.c:3248:gst_base_sink_default_event:<cluttergstvideosink0><br>
stream-start event without group-id. Consider implementing group-id handling<br>
in the upstream elements<br>
0:00:01.247296510 1331 0x703019b0 WARN v4l2<br>
gstv4l2object.c:4194:gst_v4l2_object_probe_caps:<v4l2h264dec0:src> Failed to<br>
probe pixel aspect ratio with VIDIOC_CROPCAP: Invalid argument<br>
Caught SIGSEGV<br>
#0 0x76b75120 in poll () at ../sysdeps/unix/syscall-template.S:84<br>
#1 0x76c89358 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0<br>
0:00:12.853157860 1331 0x73e0e430 WARN rtpjitterbuffer<br>
rtpjitterbuffer.c:570:calculate_skew: delta - skew: 0:00:11.140496109 too<br>
big, reset skew<br>
0:00:12.868475620 1331 0x73e0e430 WARN rtpjitterbuffer<br>
rtpjitterbuffer.c:570:calculate_skew: delta - skew: 0:00:10.961291352 too<br>
big, reset skew<br>
Spinning. Please run 'gdb gst-launch-1.0 1331' to continue debugging, Ctrl-C<br>
to quit, or Ctrl-\ to dump core.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Can you catch this in gdb and share the backtrace ? Not that for live playback over v4l, there is a required fix in decoder base class, which is only released in 1.16.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Do you have any ideas or recommendation or any reasonable sink to use under<br>
X11?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">You could also try xvimagesink. I don't know if it's going to use glamour (GL implementation) or something specific for the platform. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you very much<br>
Best regards,<br>
Ivo<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div></div></div>