Configuring v4l2 source parameters in deepstream-app

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
Jetson Orin DevKit

• DeepStream Version
7.1

• JetPack Version (valid for Jetson only)

• TensorRT Version
10.3

• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I am trying to run the deepstream-app with the configuration file for using a usb camera as the source.

When I try to specify the desired resolution in the config file, to use MJPG format for full-hd video and higher fps, it crashes with the error of “incorrect camera parameters”. I read in previous topics that you can modify the source code and adjust those parameter manually.
The referred file does not exist any more, and I couldn’t find a post that provided any insights.

I would appreciate any help.

  1. Please find out your USB camera’s correct pipeline and parameters as DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums
  2. With the correct pipeline, please modify the create_camera_source_bin() function and the corresponding definitions in /opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/deepstream_source_bin.c to implement the correct source bin.

Thank you!

Edit:I followed the steps in FAQ and found the working pipeline which is:

gst-laucnh-1.0 v4l2src device=/dev/video0 ! 'image/jpeg, width=1920, height=1080, framerate=30/1' ! nvv4l2decoder mjpeg=true ! nvvideoconvert ! 'video/x-raw(memory:NVMM), format=NV12' ! mux.sink_0 nvstreammux name=mux width=1920 height=1080 batch-size=1 ! fakesink

In /opt/nvidia/deepstream/deepstream/sources/apps/apps-common/src/deepstream_source_bin.c I can only modify the parameters for the v4l2 camera, according to what works in the pipeline. Do I need to take care of the rest of the pipeline (handling the v4l2decoder, nvvideoconvert) as well or is it done automatically by the application?

Please modify the code to implement this part as the source bin. The nvv4l2decoder and nvvideoconvert should be added to the source bin.