v4l2h264dec Raspberry PI
Nicolas Dufresne
nicolas at ndufresne.ca
Wed May 15 22:03:30 UTC 2019
Le mer. 15 mai 2019 15 h 25, horai <ivo.hora at seznam.cz> a écrit :
> Dear all,
>
> I would kindly ask you for a help with my issue. I have RPI3B+, X11,
> compiled Gstreamer 1.16, KMS driver,no window manager in X11
> I am playing test files this way :
> gst-launch-1.0 -e filesrc location=/home/pi/jellyfish-15-mbps-hd-h264.mkv !
> matroskademux ! h264parse ! v4l2h264dec capture-io-mode=4 ! kmssink
> It works very much ok only in command line, the speed is amazing.
>
> My problem is, since kmssink cannot be used in X11 (as far as I know), I am
> enclosing following pipelines (both with hardware accelerated sinks) ,with
> comments, which I would like to encapsulate into GTK window in order to
> have
> video rendering in GTK window (GstOverlay or Clutter stage):
> 1) gst-launch-1.0 -e filesrc location=/home/pi/jellyfish-3-mbps-hd-h264.mkv
> ! matroskademux ! h264parse ! v4l2h264dec capture-io-mode=4 !
> clutterautovideosink
> ad 1) This pipeline works but is very slow compared to kmssink (I
> understand
> X11 could cause some overhead but could it really be so serious?)
> Anyway, glimagesink is recommended, therefore in X11:
> 2) export GST_GL_API=opengl
> gst-launch-1.0 -e filesrc location=/home/pi/jellyfish-3-mbps-hd-h264.mkv !
> matroskademux ! h264parse ! v4l2h264dec capture-io-mode=4 ! glupload !
> glimagesink
> ad). This pipeline shows one image of the desired video hands printing this
> output:
> Setting pipeline to PAUSED ...
> 0:00:03.869568671 817 0x18a6460 WARN basesrc
> gstbasesrc.c:3600:gst_base_src_start_complete:<filesrc0> pad not activated
> yet
> Pipeline is PREROLLING ...
> Got context from element 'sink': gst.gl.GLDisplay=context,
> gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
> 0:00:04.099781284 817 0x18816f0 WARN v4l2
> gstv4l2object.c:4194:gst_v4l2_object_probe_caps:<v4l2h264dec0:src> Failed
> to
> probe pixel aspect ratio with VIDIOC_CROPCAP: Invalid argument
> 0:00:04.144984350 817 0x18816f0 WARN v4l2videodec
> gstv4l2videodec.c:810:gst_v4l2_video_dec_decide_allocation:<v4l2h264dec0>
> Duration invalid, not setting latency
> 0:00:04.184819802 817 0x6e73cac0 WARN v4l2bufferpool
> gstv4l2bufferpool.c:1263:gst_v4l2_buffer_pool_dqbuf:<v4l2h264dec0:pool:src>
> Driver should never set v4l2_buffer.field to ANY
> 0:00:04.270274157 817 0x6e73cac0 WARN dmabuf
> gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without
> synchronization.
> 0:00:04.270424732 817 0x6e73cac0 WARN dmabuf
> gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without
> synchronization.
> 0:00:04.270458014 817 0x6e73cac0 WARN dmabuf
> gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without
> synchronization.
> 0:00:04.297981763 817 0x6e73cac0 WARN dmabuf
> gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without
> synchronization.
> 0:00:04.298045150 817 0x6e73cac0 WARN dmabuf
> gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without
> synchronization.
> 0:00:04.298073119 817 0x6e73cac0 WARN dmabuf
> gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without
> synchronization.
> 0:00:05.932123123 817 0x6e73cac0 WARN dmabuf
> gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without
> synchronization.
> 0:00:05.932190884 817 0x6e73cac0 WARN dmabuf
> gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without
> synchronization.
> 0:00:05.932218853 817 0x6e73cac0 WARN dmabuf
> gstdmabuf.c:93:gst_dmabuf_mem_unmap:<dmabufallocator2> Using DMABuf without
> synchronization.
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
>
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.
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.
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.
> Actually, my final goal is to run following pipeline which is a rendering
> of
> a RTSP stream:
> sudo gst-launch-1.0 rtspsrc location="rtsp://10.0.0.2:8555/test"
> latency=200
> ! rtph264depay ! h264parse ! v4l2h264dec capture-io-mode=4 ! videoconvert !
> clutterautovideosink
> Despite the fact I have to run it in superuser mode otherwise I face issues
> with size of a buffer, this pipeline (not under cluttersink in X11 nor
> kmssink without X11 )does not show any video image, just this text output:
> Progress: (request) Sent PLAY request
> 0:00:01.178897447 1331 0x73e0e430 FIXME rtpjitterbuffer
>
> gstrtpjitterbuffer.c:1551:gst_jitter_buffer_sink_parse_caps:<rtpjitterbuffer0>
> Unsupported timestamp reference clock
> 0:00:01.179056041 1331 0x73e0e430 FIXME rtpjitterbuffer
>
> gstrtpjitterbuffer.c:1559:gst_jitter_buffer_sink_parse_caps:<rtpjitterbuffer0>
> Unsupported media clock
> 0:00:01.183729166 1331 0x703019b0 FIXME basesink
> gstbasesink.c:3248:gst_base_sink_default_event:<cluttergstvideosink0>
> stream-start event without group-id. Consider implementing group-id
> handling
> in the upstream elements
> 0:00:01.247296510 1331 0x703019b0 WARN v4l2
> gstv4l2object.c:4194:gst_v4l2_object_probe_caps:<v4l2h264dec0:src> Failed
> to
> probe pixel aspect ratio with VIDIOC_CROPCAP: Invalid argument
> Caught SIGSEGV
> #0 0x76b75120 in poll () at ../sysdeps/unix/syscall-template.S:84
> #1 0x76c89358 in ?? () from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
> 0:00:12.853157860 1331 0x73e0e430 WARN rtpjitterbuffer
> rtpjitterbuffer.c:570:calculate_skew: delta - skew: 0:00:11.140496109 too
> big, reset skew
> 0:00:12.868475620 1331 0x73e0e430 WARN rtpjitterbuffer
> rtpjitterbuffer.c:570:calculate_skew: delta - skew: 0:00:10.961291352 too
> big, reset skew
> Spinning. Please run 'gdb gst-launch-1.0 1331' to continue debugging,
> Ctrl-C
> to quit, or Ctrl-\ to dump core.
>
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.
>
>
> Do you have any ideas or recommendation or any reasonable sink to use under
> X11?
>
You could also try xvimagesink. I don't know if it's going to use glamour
(GL implementation) or something specific for the platform.
> Thank you very much
> Best regards,
> Ivo
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190515/de683ff9/attachment.html>
More information about the gstreamer-devel
mailing list