|
| 1 | +################################################################################ |
| 2 | +# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. |
| 3 | +# |
| 4 | +# Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | +# copy of this software and associated documentation files (the "Software"), |
| 6 | +# to deal in the Software without restriction, including without limitation |
| 7 | +# the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | +# and/or sell copies of the Software, and to permit persons to whom the |
| 9 | +# Software is furnished to do so, subject to the following conditions: |
| 10 | +# |
| 11 | +# The above copyright notice and this permission notice shall be included in |
| 12 | +# all copies or substantial portions of the Software. |
| 13 | +# |
| 14 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 | +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 19 | +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 20 | +# DEALINGS IN THE SOFTWARE. |
| 21 | +################################################################################ |
| 22 | + |
| 23 | +Prequisites: |
| 24 | +- DeepStreamSDK 5.1 |
| 25 | +- Python 3.6 |
| 26 | +- Gst-python |
| 27 | + |
| 28 | +To run the test app: |
| 29 | + $ python3 deepstream-test-rt-src-add-del.py <uri> |
| 30 | +e.g. |
| 31 | + $ python3 deepstream_rt_src_add_del.py \ |
| 32 | + file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.mp4 |
| 33 | + |
| 34 | +This application demonstrates how to: |
| 35 | +* Add and delete sources at runtime. |
| 36 | +* Use a uridecodebin so that any type of input (e.g. RTSP/File), any GStreamer |
| 37 | + supported container format, and any codec can be used as input. |
| 38 | +* Configure the stream-muxer to generate a batch of frames and infer on the |
| 39 | + batch for better resource utilization. |
| 40 | +* Configure the tracker (referred to as nvtracker in this sample) using |
| 41 | + config file dstest_tracker_config.txt |
| 42 | + |
| 43 | +Refer to the deepstream-nvdsanalytics sample documentation for a description |
| 44 | +of stream-muxer configuration, tracker configuration, and multi-stream tiling. |
| 45 | + |
| 46 | +The sample generates the following pipeline for single source <uri> |
| 47 | + |
| 48 | +uridecodebin -> nvstreammux -> nvinfer -> nvtracker -> nvtiler -> nvvideoconvert |
| 49 | + -> nvdsosd -> displaysink |
| 50 | + |
| 51 | +For reference, here are the config files used for this sample: |
| 52 | +1. Primary inference engine: dstest_pgie_config.txt |
| 53 | +2. First secondary inference engine: dstest_sgie1_config.txt |
| 54 | +3. Second secondary inference engine: dstest_sgie2_config.txt |
| 55 | +4. Third secondary inference engine: dstest_sgie3_config.txt |
| 56 | + |
| 57 | +At runtime, after a timeout, a source will be added periodically. All the components |
| 58 | +are reconfigured during addition/deletion. After reaching of `MAX_NUM_SOURCES`, |
| 59 | +a random source is deleted periodically until a single source is present in the |
| 60 | +pipeline. The app exits when End of Stream is reached for the final source or if |
| 61 | +the last source is deleted. |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
0 commit comments