# Does deepstream Smart Video Record support multi streams?

**URL:** <https://forums.developer.nvidia.com/t/does-deepstream-smart-video-record-support-multi-streams/177455>\
**Category:** DeepStream SDK\
**Created:** [May 10, 2021, 7:18am UTC](https://forums.developer.nvidia.com/t/does-deepstream-smart-video-record-support-multi-streams/177455 "2021-05-10T07:18:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![3260605625](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@3260605625](https://forums.developer.nvidia.com/u/3260605625)\
**Post date:** [May 10, 2021, 7:18am UTC](https://forums.developer.nvidia.com/t/does-deepstream-smart-video-record-support-multi-streams/177455/1 "2021-05-10T07:18:45Z")

</div>

**• Hardware Platform (Jetson / CPU)**  
**• DeepStream 5.1**  
**• Issue Type( questions)**

I can run /opt/nvidia/deepstream/deepstream-5.1/sources/apps/sample\_apps/deepstream-testsr to implement Smart Video Record, but now I would like to ask if Smart Video Record supports multi streams?

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [May 10, 2021, 8:11am UTC](https://forums.developer.nvidia.com/t/does-deepstream-smart-video-record-support-multi-streams/177455/3 "2021-05-10T08:11:28Z")

</div>

Surely it can. There are deepstream-app sample codes to show how to implement smart recording with multiple streams. [Smart Video Record — DeepStream 6.1.1 Release documentation](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Smart_video.html#)  
[DeepStream Reference Application - deepstream-app — DeepStream 6.1.1 Release documentation](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_ref_app_deepstream.html#source-group)

deepstream-testsr is to show the usage of smart recording interfaces. If you are familiar with gstreamer programming, it is very easy to add multiple streams.

---

<div class="post-metadata">

**Author:** ![3260605625](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@3260605625](https://forums.developer.nvidia.com/u/3260605625)\
**Post date:** [May 11, 2021, 8:08am UTC](https://forums.developer.nvidia.com/t/does-deepstream-smart-video-record-support-multi-streams/177455/4 "2021-05-11T08:08:20Z")

</div>

Thanks for ur reply! I’ve already run the program with multi streams input while there’s another question I’d like to ask. I’ve configured “smart-record=2” as the document said, using local event to start or end video-recording. What should I do if I want to set a self event to control the record? For example, the record starts when there’s an object being detected in the visual field. Do I need to add a callback function or something else? Thanks again.

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [May 11, 2021, 9:30am UTC](https://forums.developer.nvidia.com/t/does-deepstream-smart-video-record-support-multi-streams/177455/5 "2021-05-11T09:30:59Z")

</div>

> [@3260605625](#):
>
> What should I do if I want to set a self event to control the record? For example, the record starts when there’s an object being detected in the visual field. Do I need to add a callback function or something else?

Adding a callback is a possible way. You can design your own application functions. DeepStream is only a SDK which provide HW accelerated APIs for video inferencing, video decoding, video processing, etc. It will not conflict to any other functions in your application. When to start smart recording and when to stop smart recording depend on your design.

---

<div class="post-metadata">

**Author:** ![a7med.hish](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@a7med.hish](https://forums.developer.nvidia.com/u/a7med.hish)\
**Post date:** [October 4, 2021, 12:18pm UTC](https://forums.developer.nvidia.com/t/does-deepstream-smart-video-record-support-multi-streams/177455/7 "2021-10-04T12:18:29Z")

</div>

do you need to pass different session ids when recording from different sources? because recording might be started while the same session is actively recording for another source…

What is the correct way to do this? because when I try deepstream-app with smart-recording configured for 1 source, the behaviour is perfect. However, when configuring smart-record for multiple sources the duration of the videos are no longer consistent (different duration for each video).  
How to extend this to work with multiple sources?

---

<div class="post-metadata">

**Author:** ![kayccc](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kayccc/32/14043_2.png) [@kayccc](https://forums.developer.nvidia.com/u/kayccc)\
**Post date:** [October 12, 2021, 2:21am UTC](https://forums.developer.nvidia.com/t/does-deepstream-smart-video-record-support-multi-streams/177455/8 "2021-10-12T02:21:51Z")

</div>

Hi [a7med.hish](https://forums.developer.nvidia.com/u/a7med.hish),

Please help to open a new topic if still an issue to support.

Thanks

---

<div class="post-metadata">

**Author:** ![kayccc](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kayccc/32/14043_2.png) [@kayccc](https://forums.developer.nvidia.com/u/kayccc)\
**Post date:** [October 12, 2021, 2:21am UTC](https://forums.developer.nvidia.com/t/does-deepstream-smart-video-record-support-multi-streams/177455/9 "2021-10-12T02:21:54Z")

</div>

Closed on October 12, 2021, 2:21am UTC


