Webcam not opening

So assuming you have an X display running and DISPLAY set to this, you may check that you can display. The following uses a software video source so that we rule out a display issue before going into camera:

gst-launch-1.0 videotestsrc ! xvimagesink

If ok, let’s try using the camera. Be sure you plug it into full size USB connector, the micro-USB OTG is not able to acheive high bandwidth.

1. Raw mode YUYV

gst-launch-1.0 -v v4l2src device=/dev/video1 ! video/x-raw, format=YUY2, width=640, height=480, framerate=30/1 ! xvimagesink

2. MJPEG mode

gst-launch-1.0 -v v4l2src device=/dev/video1 ! image/jpeg, format=MJPG,  width=640, height=480, framerate=30/1 ! nvjpegdec ! 'video/x-raw(memory:NVMM), format=I420' ! nvvidconv ! xvimagesink

# Or
gst-launch-1.0 -v v4l2src device=/dev/video1 ! image/jpeg, format=MJPG,  width=640, height=480, framerate=30/1 ! nvv4l2decoder mjpeg=1 ! nvvidconv ! xvimagesink