Camera stream format conversion

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Camera stream format conversion

roland.hsiao
Hi

Currently we'd like to apply camera to evaluation on Nvidia Tx1 platform. We need gstreamer to transform the video format to yuv420.

Camera 1 supports RGB32, YUV411.
I tried these command, but it shows v4l2src0: Internal data flow error. Please help me correct it.
1. gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-raw, format=(string)RGBA, width=1920, height=1080' ! videoconvert ! 'video/x-raw,format=I420' ! filesink location=dump.yuv
2. gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-raw, format=(string)RGBA, width=1920, height=1080' ! videoconvert ! xvimagesink

Camera 2 supports RGB bayer
I tried this command, but it shows v4l2src0: Internal data flow error. Please help me correct it.
gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-bayer, width=1280, height=720' ! bayer2rgb ! videoconvert ! xvimagesink

Any suggestion is highly appreciated.

Roland
Reply | Threaded
Open this post in threaded view
|

Re: Camera stream format conversion

Nicolas Dufresne-5
Le mercredi 03 mai 2017 à 00:59 -0700, roland.hsiao a écrit :
> Hi
>
> Currently we'd like to apply camera to evaluation on Nvidia Tx1
> platform. We
> need gstreamer to transform the video format to yuv420.
>
> Camera 1 supports RGB32, YUV411.
> I tried these command, but it shows v4l2src0: Internal data flow
> error.

If you read further, you'll find "not-negotiated" as being the error.

> Please help me correct it.
> 1. gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-raw,
> format=(string)RGBA, width=1920, height=1080' ! videoconvert !
> 'video/x-raw,format=I420' ! filesink location=dump.yuv
> 2. gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-raw,
> format=(string)RGBA, width=1920, height=1080' ! videoconvert !
> xvimagesink

RGBA is a very unlikely format in the Camera world and in fact does not
exist in V4L2 API. As shown here [0] the deprecated RGB32 format is
mapped to xRGB (alternatively ARGB, not recommented though). Newer
driver should use XRGB32 to avoid this ambiguity. You could have notice
your error, since RGBA is not part of the template caps reported by
gst-launch-1.0.

>
> Camera 2 supports RGB bayer 
> I tried this command, but it shows v4l2src0: Internal data flow
> error.
> Please help me correct it.
> gst-launch-1.0 -v v4l2src device=/dev/video0 ! 'video/x-bayer,
> width=1280,
> height=720' ! bayer2rgb ! videoconvert ! xvimagesink

Not all driver expose bayer to user space, and not all bayer layout are
supported by GStreamer. Share the propose bayer format from V4L2
enumeration (v4l2-ctl tool output) if you need further help.

>
> Any suggestion is highly appreciated.
>
> Roland
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble
> .com/Camera-stream-format-conversion-tp4682899.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment