v4l2src -> qmlglsink not possible / transform problem

Nicolas Dufresne nicolas at ndufresne.ca
Wed Jun 19 12:44:51 UTC 2019


Le mer. 19 juin 2019 03 h 25, Bodo Pfeifer <realsfg at gmx.de> a écrit :

> Hi all,
>
> I'm trying to pipeline a webcam to a qmlglsink.
>
> When testing:
> gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! autovideosink
> This is working.
>
> FYI: my webcam seems to provide YUY2 (only).
>
> But when testing (in Code):
> v4l2src device=/dev/video0 ! videoconvert ! glupload ! qmlglsink
> I get this problem:
> gluploadelement0> transform could not transform video/x-raw,
> format=(string)YUY2, width=(int)640, height=(int)480,
> framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1,
> colorimetry=(string)2:4:5:1, interlace-mode=(string)progressive in anything
> we support
>

Not sure why yuy2 is accepted downstream of videoconvert, but it's likely a
good idea to add a glcolorconvert element in your pipeline. Normally we
wrap qmlglsink into glsinkbin to ensure there is a proper GL accelerated
display pipeline setup.


> I can reproduce this behaviour in commandline with:
> gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! glupload !
> gldownload ! autovideosink --gst-debug-level=4
>
> Same problem:
> WARN           basetransform
> gstbasetransform.c:1364:gst_base_transform_setcaps:<gluploadelement0>
> transform could not transform video/x-raw, format=(string)YUY2,
> width=(int)640, height=(int)480, framerate=(fraction)30/1,
> pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:5:1,
> interlace-mode=(string)progressive in anything we support
> INFO                 basesrc
> gstbasesrc.c:2962:gst_base_src_loop:<v4l2src0> marking pending DISCONT
> WARN           basetransform
> gstbasetransform.c:1364:gst_base_transform_setcaps:<gluploadelement0>
> transform could not transform video/x-raw, format=(string)YUY2,
> width=(int)640, height=(int)480, framerate=(fraction)30/1,
> pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:5:1,
> interlace-mode=(string)progressive in anything we support
> WARN                 basesrc
> gstbasesrc.c:3072:gst_base_src_loop:<v4l2src0> error: Internal data stream
> error.
> WARN                 basesrc
> gstbasesrc.c:3072:gst_base_src_loop:<v4l2src0> error: streaming stopped,
> reason not-negotiated (-4)
> INFO        GST_ERROR_SYSTEM
> gstelement.c:2141:gst_element_message_full_with_details:<v4l2src0> posting
> message: Internal data stream error.
> INFO        GST_ERROR_SYSTEM
> gstelement.c:2168:gst_element_message_full_with_details:<v4l2src0> posted
> error message: Internal data stream error.
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal
> data stream error.
>
> I also tried something like:
> gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, width=320,
> height=240, format=YUY2 ! videoconvert ! "video/x-raw, width=320,
> height=240, format=RGBA" ! glupload ! gldownload ! autovideosink
> --gst-debug-level=4
>
> For my understanding the videoconvert should be able to handle YUY2 as
> well as the RGBA that is expected by glupload. But something is missing..
>
> Any enlightment into this is highly appreciated,
>
> Thanks + Best,
> Bodo
> _______________________________________________
> 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/20190619/c3b14527/attachment.html>


More information about the gstreamer-devel mailing list