hi,
I trying to capture video in yuv format. AS I’m not sure what the order of the bytes I’ve tried all of them within the DT:
mode_type = "yuv";
pixel_phase = "uyvy"; / "yuyv", "vyuy", "yvyu"
csi_pixel_bit_depth = "16";
and I sampled the input frame:
v4l2-ctl --device /dev/video4 --set-fmt-video=width=1920,height=1080,pixelformat=YUYV --stream-mmap --stream-count=1 --stream-to=frame.raw
xxd frame.raw>frame.txt
The values of the pixels are swapped upon the DT mdifications.
but gstreamer refuses to display the video with the correct color:
gst-launch-1.0 v4l2src device="/dev/video0" ! videoconvert ! glupload ! glimagesink
it identifies the video (debug caps prints out: YUY2, UYUV, etc. per the DT modification)
What ami I doing wrong?
Looks like v4l2src didn’t support YUYV try if can configure sensor output as UYVY or reference to below topic using MMAPI sample code to check it.
Hello
I attached our custom camera to jetson tx2 board.
It’s output is YUYV.
When I used default OOB camera(ov5693) of jetson tx2 board, every sample was working fine.(tegra_multimedia_api/samples)
But with our custom camera, every sample apps are not working.
We could check our camera is work using below command.
capture : v4l2-ctl --set-fmt-video=width=1824,height=940,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100 -d /dev/video0 --stream-to=ov491.raw
play: mp…
My camera module is ov5640, and it outputs yuv422 (UYVY) format, the command bellowed works in my case:
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap --stream-count=5 bypass_mode=0 --stream-to=stream.yuv
I had to change the streaming pipeline and use nvv4l2camerasrc instead of v4l2src. What is weired is that the caps in this new option supposed to be with the UYVY format whilwe the DT pixel_phase is set to yuyv .
any reason why this supposed to be so?
BTW, I am working with L4T 32.5.1.
I think the setting of pixel_phase in DT doesnt work…
It works, nvidia just concatenated the values of mode_type , pixel_phase and csi_pixel_bit_depth into a single value which previously was pixel_t ,
and then deprecated the pixel_t in the DT.
Do you mean device tree set as yuyv but the v4l2-ctl --list-formats-ext show UYVY?
No,
both DT and v4l2-ctl show yuyv , while the caps in the gstreamer pipeline has to be ":…'video/x-raw(memory:NVMM), format=string(UYVY )…
I don’t think that tell the things is incorrect. Could you try with the MMAPI to confirm it.
@ShaneCCC , hi,
could you please elaborate what do you mean by try MMAPI, so you mean to run one of the sample codes? wasn’t nvv4l2camerasrc developed utilizing MMAPI?
Yes, like v4l2cuda or 12_camera_v4l2_cuda