How to set camera input rather than file input in python app test 4?

opt/nvidia/deepstream/deepstream-5.0/sources/deepstream_python_apps/apps/deepstream-test4$ python3 -i 

is it possible to use camera stream input? how? the sample illustrates how to use file input

For camera stream input, do you use nvarguscamerasrc or v4l2src?

@DaneLLL Thank you for following up
I would use rtsp as the concern is the use of ip camera in this case.

To run:
  $ python3 -i <H264 filename> -p <Proto adaptor library> --conn-str=<Connection string> -s <0/1>

source deepstream_python_apps/apps/deepstream-test4 at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub

Please check the sample to link with rtspsrc plugin:


Looks like we don’t have python sample with rtspsrc. Should be OK to refer to the C sample for customizing deepstream-test4. Please give it a try.

Or may refer to deepstream-test3 for using uridecodebin.

1 Like

for customizing of this file - test 4 python will it work out if just to put instead of filesrc ->rtspsrc, or if to put entire rtsp path into the line below? deepstream_python_apps/ at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub

You would need replace

filesrc ! h264parse ! ...


rtspsrc ! rtph264depay ! h264parse ! ...

And register pad-added signal:

  g_signal_connect (G_OBJECT (source), "pad-added",
      G_CALLBACK (cb_newpad), depay_pre_decode);