Video was streamed with gstreamer pipeline:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! ‘video/x-raw,format=GRAY16_LE,width=1024,height=768,framerate=50/1’ ! videoconvert ! nvvidconv ! nvv4l2h264enc insert-sps-pps=1 idrinterval=30 insert-vui=1 ! rtph264pay name=pay0 ! udpsink host=10.0.21.125 port=5004
It was viewed on pc with vlc. But image was darker (lower brigthness/contrast) than it come from /dev/video0. It probably incorrect video conversion from grayscale to color.
For the first pipeline - YUV420 data is good.
But running second one gives “redscale” image. Brightness is ok. But in places where it should be white it is red.
$ cat /etc/nv_tegra_release R35 (release), REVISION: 1.0, GCID: 31346300, BOARD: t186ref, EABI: aarch64, DATE: Thu Aug 25 18:41:45 UTC 2022
$ v4l2-ctl --device /dev/video0 --all
Driver Info:
Driver name : test
Card type : V4L2 PCI test
Bus info : PCI: testTV
Driver version : 5.10.104
Capabilities : 0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x05200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (testTV: ok)
Format Video Capture:
Width/Height : 1024/768
Pixel Format : 'Y16 ' (16-bit Greyscale)
Field : None
Bytes per Line : 2048
Size Image : 1572864
Colorspace : Raw
Transfer Function : Default (maps to None)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Streaming Parameters Video Capture:
Frames per second: invalid (0/0)
Read buffers : 0
For experiment we change most significant byte with less significant. As result of this video image was ruined. It prove that with source endianness it’s ok.
Hi,
Yo may consider use OpenCV since it works fine. If you would like to link v4l2src ! videoconvert, please try to check why videoconvert plugin cannot convert the source to I420 correctly. May dump the frame generated by videotestsrc for comparison.