You may first try to access camera before further encoding/streaming.
For YUYV422, you may try video format YUY2:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, framerate=30/1, format=YUY2 ! videoconvert ! xvimagesink
For MJPG, you would try jpeg format MJPG:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! image/jpeg, width=640, height=480, framerate=30/1, format=MJPG ! jpegdec ! xvimagesink
#if it fails try to add jpegparse
gst-launch-1.0 -v v4l2src device=/dev/video0 ! image/jpeg, width=640, height=480, framerate=30/1, format=MJPG ! jpegparse ! jpegdec ! xvimagesink
Does one work ?
If it works, you would try to encode and write into file for checking that encoding works:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, framerate=30/1, format=YUY2 ! nvvidconv ! 'video/x-raw(memory:NVMM), format=NV12' ! omxh265enc ! matroskamux ! filesink location=test_YUY2_H265enc.mkv
gst-launch-1.0 -v v4l2src device=/dev/video0 ! image/jpeg, width=640, height=480, framerate=30/1, format=MJPG ! jpegdec ! nvvidconv ! 'video/x-raw(memory:NVMM), format=NV12' ! omxh265enc ! matroskamux ! filesink location=test_MJPG_H265enc.mkv
If it’s fine, you would try to stream with test-launch:
test-launch "v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, framerate=30/1, format=YUY2 ! nvvidconv ! video/x-raw(memory:NVMM), format=NV12 ! omxh265enc ! rtph265pay name=pay0 pt=96 config-interval=1 "
test-launch "v4l2src device=/dev/video0 ! image/jpeg, width=640, height=480, framerate=30/1, format=MJPG ! jpegdec ! nvvidconv ! video/x-raw(memory:NVMM), format=NV12 ! omxh265enc ! rtph265pay name=pay0 pt=96 config-interval=1 "