Getting only 20fps on python deepstream app on 6.3 on a 30 fps camera

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) DGPU NVIDIA GeForce GTX 1050
• DeepStream Version 6.3.3
• TensorRT Version 8.6.1.6-1+cuda12.0
• NVIDIA GPU Driver Version (valid for GPU only) 530.41.03
• Issue Type( questions, new requirements, bugs) Performance
• 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)
Using deepstream-test1-usbcam app on my laptop with deepstream installed, no config changes
• 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 the deepstream-test1-usbcam on my ubuntu laptop running deepstream and getting only 20FPS PERF for my webcam that can do 30FPS.
I tried using the performance tuning tips of live source, specify framerate on the capsfilter element, but nothing seems to take it more than 20FPS. What else can I check?

➜  deepstream-test1-usbcam git:(master) ✗ v4l2-ctl -d /dev/video0 --list-formats-ext                                                                                                   
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'MJPG' (Motion-JPEG, compressed)
		Size: Discrete 1280x720
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 960x540
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 848x480
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 640x480
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 640x360
			Interval: Discrete 0.033s (30.000 fps)
	[1]: 'YUYV' (YUYV 4:2:2)
		Size: Discrete 640x480
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 640x360
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 424x240
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 320x240
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 320x180
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 160x120
			Interval: Discrete 0.033s (30.000 fps)

Please refer to the performance FAQ on whether some items can be applied. Besides, please also check whether GPU usage (nvidia-smi dmon).

Tried the applicable recommendations on the performance FAQ page. Can I try anything more?

  1. I could not find instructions on how to measure latency in python apps. So could not enable measurement for NVDS_ENABLE_LATENCY_MEASUREMENT. The environment variables do nothing on a python app.
  2. This is on a laptop so cannot move GPU slots
  3. Set batched-push-timeout to 30 in streammux
  4. height and width of streammux set to 640 X 480
  5. qos set to 1 for sink.
    I could not find all other recommendations applicable to this set up.

Here is nvidia-smi output when app is running:

# gpu    pwr  gtemp  mtemp     sm    mem    enc    dec   mclk   pclk 
# Idx      W      C      C      %      %      %      %    MHz    MHz 
    0      -    52      -    23     11      0      0   3504   1290 
    0      -    52      -    24     11      0      0   3504   1290 
    0      -    52      -    21     10      0      0   3504   1290 
    0      -    53      -    22     10      0      0   3504   1290 
    0      -    52      -    22     11      0      0   3504   1290 
    0      -    53      -    20      9      0      0   3504   1290 
    0      -    53      -    21     10      0      0   3504   1290 
    0      -    53      -    20      9      0      0   3504   1290 
    0      -    53      -    19      9      0      0   3504   1290 
  1. NVDS_ENABLE_LATENCY_MEASUREMENT is for C code, please refer to DeepStream SDK FAQ - #12 by bcao 4 to measure the latency of the pipeline components.
  2. if testing performance, please replace nv3dsink with fakesink.
  3. please set nvinfer’s interval to improve performance. please find interval in nvinfer.

Thank you for the tips.

  1. The DeepStream SDK FAQ - #12 by bcao 4 link you shared seems to be for C code. Is there similar guideline for python?
  2. Replaced with nveglglessink - same performance
  3. nvinfer interval changed to max of 24, still same performance :(

Is there anything else I can check?

Finally figured it out - it turned out to be a camera issue.
Used this video to fix it https://www.youtube.com/watch?v=iuic3po8kvQ&ab_channel=codergopher

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.