Dynamic pipeline for Video recording [ smart record . ]

• Hardware Platform (Jetson / GPU) : Jetson Nano
• DeepStream Version : 6.0.0
• JetPack Version (valid for Jetson only) : 4.6
• TensorRT Version : 8.0.1
• NVIDIA GPU Driver Version (valid for GPU only) : 10.3
• Issue Type( questions, new requirements, bugs) : question

In deepstream-app I’d like to dynamically disable/enable the filesink and still wondering what the best way to do this is? what i want to do is making an ip camera, which alert message and send the event file ( mp4, h264 … ] to server when jetson nano cam[ip-cam] detects people fall over. Reading the gstreamer documentation on dynamic pipeline manipulation and smart-record in nvidia, i have no solution to solve this problem.

Smart Record is concurrently only RTSP is supported so, i can’t use smart record because i’m directly using CSI-CAM. so, what i’m thinking is making a dynamic pipeline to record video when the event is occurring .

is there any resource that i can refer to ? and can i use smart record pipeline for my project ?

To sum up the purpose for my project is to be able to write files only when an nvargus → upstream nvinfer element has made a detection.

Thanks

Hi,
We should support the case of saving to a video file. Please check sink group in document:
DeepStream Reference Application - deepstream-app — DeepStream 6.0 Release documentation

1 Like

hi, @DaneLLL
Thanks for replying .

according to your answer, i know the sink group can save the file. but what i want to do is event driven file saving . To do this, i will dynamically attach and deattach pipeline into main pipeline. but it’s complexity also increasing, and i find the easy way to do this, NVIDIA-SMART RECORD . but it only supports RTSP input data stream now. my project is based on CSI-CAM stream then how can i use NVIDIA-SMART RECORD element ?? is there no way to use this??

Hi,
If you use nvarguscamerasrc or v4l2src, we support the two sources. You can modify config file to change the source type. Please check source group:
DeepStream Reference Application - deepstream-app — DeepStream 6.0 Release documentation
Type=1 is v4l2src and type=5 is nvarguscamerasrc.

so , my question is can i use Nvidia-Smart-Record when using CSI-CAM input data streaming. and your answer is available ??
@DaneLLL

@jasonpgf2a
hello, jasonpgf2a, i have a same question like you,
according to this article, How to dynamically add remove filesink - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums you changed the method to Smart-Record right??

and, i think your input data is rtsp - data streaming. so you can use SmartRecord Elements. but my problem is my input data streaming is CSI-CAM streaming file , and i’m trouble in using Smart Record. so is there any advice that you can give to me??

Thanks.

Hi,

Our understanding is CSI-CAM input data streaming means either nvarguscamerasrc or v4l2src. Probably we don’t understand it correctly. If it is another type of source, we don’t support it by default and you would need to check the possibility of adding it into source group. The code is in

/opt/nvidia/deepstream/deepstream-6.0/sources/apps/apps-common/src/deepstream_source_bin.c

If you are able to run a gstreamer command to capture frame data, it should be possible to add it into deepstream-app.

This comment is not correct, please read this:
Dynamic pipeline for Video recording [ smart record . ] - #14 by DaneLLL

ok. i will question clearly.

my input data is nvarguscamerasrc, then what i want is recording recording videos when people falling [like this. JustinhoCHN/fall-detection (github.com) .

first, i want to use Smart Record elements . but i don’t know how to use Smart Record when using nvarguscamerasrc input stream, so i questioned about this. below is the deepstream-test-5 Readme, and it says smart-record is now supported RTSP streaming. Unfortunately i’m using nvarguscamerasrc input stream, so is there any way to use smart-record API when using nvarguscamerasrc input stream ?
cap_deeepstream_test5

  • if i can’t use Smart Record then, i will find other ways to record videos when events occur.

  • thanks for replying but i didn’t get a satisfactory answer, so reasking my question.

I don’t know exactly because I don’t have an nvarguscamera, but if the input data is h264,h265, I think we can just add a smart record bin.
This is because smart record bin works only when input data is video data.
So in the source_bin.c part, before pipeline decodes, add a tee (maybe tee already exists) and attach a smart record bin.

1 Like

thanks @gkfkffl for the reply.
you have already questioned same topic in the past. How to run the smart recorder in uri (file) instead of rtsp? - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums . and did you succeed in using smart record bin with mp4[h264] file stream input ?

No, it’s hard to change the file input to video input(h264) in source_bin,c , so I’m trying it.
First, urgently, we are streaming mp4 in rtsp form using vlc in another way and using smart recorder in type 4.

1 Like

ok. the method that you are using is wasting resources… i want to know the clear way to use Smart Record elements to record mp4 stream or nvargus/v4l2 streaming sources… thanks !!

@DaneLLL hi DaneLLL don’t you have any answers about my question??
always thanks !

Hi @GURUGURU
Have checked with our teams and confirmed smart record component expects encoded stream as input. It does not work with v4l2src and nvargusamerasrc.

Sorry I did not provide correct information. I will remove the wrong content.

thanks for the clear answer

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.