My system has the following specs:
GPU: GTX 1660ti
RAM: 32 GB
OS: Windows 11
Environment: Ubuntu 24.04.1 LTS (Through WSL)
Deepstream Version: 7.1
Nvidia-Driver Version: 566.03 | CUDA Version: 12.7
I have setup deepstream 7.1 with test-app5.
I have started a server using [source-list] along with [source-attr-all].
Here is the relevant part of the config:
num-source-bins=4
use-nvmultiurisrcbin=1
#To display stream name in FPS log, set stream-name-display=1
stream-name-display=1
#sensor-id-list vector is one to one mapped with the uri-list
#identifies each sensor by a unique ID
#sensor-id-list=cam1;cam2;cam3;cam4
#Optional sensor-name-list vector is one to one mapped with the uri-list
#sensor-name-list=cam1;cam2;cam3;cam4
max-batch-size=10
http-ip=localhost
http-port=9500
#Set low latency mode for bitstreams having I and IPPP frames on decoder
#low-latency-mode=0
#sgie batch size is number of sources * fair fraction of number of objects detected per frame per source
#the fair fraction of number of object detected is assumed to be 4
sgie-batch-size=40
#Set the below key to keep the application running at all times
[source-attr-all]
enable=1
type=3
num-sources=1
gpu-id=0
cudadec-memtype=0
latency=100
rtsp-reconnect-interval-sec=10
#Limit the rtsp reconnection attempts
rtsp-reconnect-attempts=4
I add cameras using the following command:
curl -XPOST 'http://172.20.60.31:9500/api/v1/stream/add' -d '{"key":"sensor","value":{"camera_id":"0","camera_name":"front_door","camera_url":"file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4","change":"camera_add","metadata":{"resolution":"1920x1080","codec":"h264","framerate":30}},"headers":{"source":"vst","created_at":"2021-06-01T14:34:13.417Z"}}'
I remove cameras using the following command:
curl -XPOST 'http://172.20.60.31:9500/api/v1/stream/remove' -d '{"key": "sensor","value":{"camera_id": "0","camera_name": "front_door","camera_url": "file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4","change": "camera_remove","metadata":{"resolution": "1920x1080","codec": "h264","framerate": 30}},"headers":{"source": "vst","created_at":"2021-06-01T14:34:13.417Z"}}'
In both cases I specify the camera_id
as 0, If I attempt to add a camera with the same ID while this is still running I get an error which is expected.
The problem I am facing is that when the camera finishes processing and the stream ends I will call the same camera add command again a second time, it will work but increase the camera/stream ID from 0 to 1 and if I call it again the same way it will increase it again.
This happens even if I call the camera remove command before adding it again, it will still increase the camera/stream ID even if I specify the camera ID in the add command.
Is this an issue with deepstream or the way I have set up the server?
Any help will be highly appreciated.