v4l2src unable to connect to /dev/video0 USB Camera - reason not negotiated (-4)

Hi I’m fairly new to deepstream and have been working my way through the examples downloaded with the SDK. I’ve created my own Gstreamer pipe and connected together the following using a test h.264 video file

filesrc->h264parse->nvv4l2decoder->nvstreammux->nvinfer->nvtracker->nvvideo-convert->nvosd->nvegltransform->nveglglessing

This runs on my Jetson nano and identifies / tracks the people and cars as it plays. I now want to change my filesrc to be a USB camera so I switched the filesrc element for a v4l2src element. But now I just get an error saying that streaming has stopped, reason not negotiated (-4)

I had the same issue when running the main deepstream-app application but managed to get it working by setting the camera-fps-n parameter in it’s configuration file to the same FPS as my USB camera (which is 25, not 30). However this application seems to use a different source element for the USB camera (called decodeURIBin). I can’t see any parameter on the v4l2src element that allows me to set FPS.

Has anyone else had this issue? How can I get this working?

Thanks

Jon

Hi,
https://devtalk.nvidia.com/default/topic/1066418/deepstream-sdk/use-yuy2-format-as-input/post/5404526/#5404526
Above is an existing sample based on deepstream-test1. FYR.

Thank you that link was really helpful. I had to change the video format from UYVY to YUY2 to get it working with my camera (although I don’t understand why that would be! I just copied the comment from the other user on the link you sent me).

Jon

Hi,
You may run ‘$ v4l2-ctl -d /dev/video1 --list-formats-ext’ to know what formats are supported by the camera. YUYV is defined as YUY2 in gstreamer.