forked from NVIDIA-AI-IOT/deepstream_python_apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
61 lines (48 loc) · 2.49 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
################################################################################
# SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
Prerequisites:
- DeepStreamSDK 6.2
- Python 3.8
- Gst-python
To run the test app:
$ python3 deepstream-test-rt-src-add-del.py <uri>
e.g.
$ python3 deepstream_rt_src_add_del.py \
file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4
This application demonstrates how to:
* Add and delete sources at runtime.
* Use a uridecodebin so that any type of input (e.g. RTSP/File), any GStreamer
supported container format, and any codec can be used as input.
* Configure the stream-muxer to generate a batch of frames and infer on the
batch for better resource utilization.
* Configure the tracker (referred to as nvtracker in this sample) using
config file dstest_tracker_config.txt
Refer to the deepstream-nvdsanalytics sample documentation for a description
of stream-muxer configuration, tracker configuration, and multi-stream tiling.
The sample generates the following pipeline for single source <uri>
uridecodebin -> nvstreammux -> nvinfer -> nvtracker -> nvtiler -> nvvideoconvert
-> nvdsosd -> displaysink
For reference, here are the config files used for this sample:
1. Primary inference engine: dstest_pgie_config.txt
2. First secondary inference engine: dstest_sgie1_config.txt
3. Second secondary inference engine: dstest_sgie2_config.txt
4. Third secondary inference engine: dstest_sgie3_config.txt
At runtime, after a timeout, a source will be added periodically. All the components
are reconfigured during addition/deletion. After reaching of `MAX_NUM_SOURCES`,
a random source is deleted periodically until a single source is present in the
pipeline. The app exits when End of Stream is reached for the final source or if
the last source is deleted.