Hi NV_Team,
I have an V4L2 camera (YUV 4:2:2) → YUYV.
If I use this command to open this camera to preview (display green screen not correct color)
nvidia@xavier:~$ gst-launch-1.0 -ev v4l2src device=/dev/video0 ! 'video/x-raw,format=YUY2,width=1280,height=720' ! videoconvert ! fpsdisplaysink video-sink=xvimagesink sync=false
if change to this command is display color correct.
nvidia@xavier:~$ gst-launch-1.0 -ev v4l2src device=/dev/video0 ! rawvideoparse format=5 width=1280 height=720 ! videoconvert ! fpsdisplaysink video-sink=xvimagesink sync=false
I use nvv4l2camerasrc to replace v4l2src , display still green screen . (I have modified libgstnvv4l2camerasrc.so to support YUYV)
nvidia@xavier:~$ gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)YUY2' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! nv3dsink -e
Thanks so much.
It’s USB camera?
What the v4l2-ctl --list-formats-ext shows.
Also did you mean apply below patch still have problem?
Hi,
It only accepts UYVY in nvv4l2camerasrc. For launching source with YUYV(YUY2) format, you would need to customize the plugin. It it open source in
https://developer.nvidia.com/embedded/linux-tegra
L4T Driver Package (BSP) Sources
Please download it and take a look. The implementation is based on jetson_multiemdia_api. For YUYV, please apply the patch:
diff --git a/gst-nvv4l2camera/gstnvv4l2camerasrc.cpp b/gst-nvv4l2camera/gstnvv4l2camerasrc.cpp
index 26ad70c..ad0a512 100644
--- a/gst-nv…
Hi ShaneCCC,
Not USB Camera, it’s a GMSL Camera (YUYV, V4L2)
nvidia@xavier:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
nvidia@xavier:~$ v4l2-ctl --all
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, ar0147yuv 30-006d
Bus info : platform:15c10000.vi:0
Driver version: 4.9.201
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
Width/Height : 1280/720
Pixel Format : 'YUYV'
Field : None
Bytes per Line : 2560
Size Image : 1843200
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
Luna2020:
Hi ShaneCCC,
I have modified “nvv4l2camerasrc” to YUY2 but the screen is still not correct color space.
Does rawvideoparse help on the issue? Or remove the ‘video/x-raw,format=YUY2,width=1280,height=720’ help on it?
Hi ShaneCCC,
rawvideoparse display color correct.
gst-launch-1.0 -ev v4l2src device=/dev/video0 ! rawvideoparse format=5 width=1280 height=720 ! videoconvert ! fpsdisplaysink video-sink=xvimagesink sync=false
Remove ‘video/x-raw,format=YUY2,width=1280,height=720’ still display color not correct the same as before.
gst-launch-1.0 -ev v4l2src device=/dev/video0 ! videoconvert ! fpsdisplaysink video-sink=xvimagesink sync=false
Could you check get the raw file from v4l2-ctl to check it.
v4l2-ctl --set-fmt-video=width=1280,height=720,pixelformat=YUYV --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=t.raw -d /dev/video0
The raw file looks like UYVY instead YUYV
Hi ShaneCCC,
Okay, I will contact with the Camera vendor to check again.
Can you share your YUV tool ?
Thanks again.
system
Closed
November 17, 2021, 6:32am
15
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.