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 deepstream_test_4.py -i 

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

Hi,
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 deepstream_test_4.py -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

Hi,
Please check the sample to link with rtspsrc plugin:

/opt/nvidia/deepstream/deepstream-5.1/sources/apps/sample_apps/deepstream-testsr/

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/deepstream_test_4.py at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub

Hi,
You would need replace

filesrc ! h264parse ! ...

with

rtspsrc ! rtph264depay ! h264parse ! ...

And register pad-added signal:

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