The question about capturing image formats using v4l2

Presently, I am able to capture camera images on the existing hardware platform in the YUYV format. However, I aspire to acquire images in YUV420SP format. How can I accomplish this feat?

Even I need to implement a program probably using c language to capture video/image using a third party frame grabber card and there v4l2 driver APIs on my jetson AGx xavier

Please let us know how to proceed with this

hello sqalex,

FYI, the YUYV format in gstreamer is referred as YUY2.
as you can see in… $ gst-inspect-1.0 v4l2src.
the output capabilities shows that for video/x-raw it supports YUY2, YVYU, and UYVY, whereas YUYV is defined as YUY2.

you may give it a try with the following pipeline for testing.
for instance,
$ gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-raw,width=1920,height=1080,format=YUY2,framerate=30/1 ! xvimagesink

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.