Save part of video from frames in DS4.0 pipeline in deepstream-test2-app.

Hi, I wish to save a part of video and also extract frames and save them to files from the stream in the DS4.0 pipeline in deepstream-test2-app. Can you tell me what can be done to accomplish this?

Hi,
We have implementation in deepstream-app.
https://docs.nvidia.com/metropolis/deepstream/4.0/dev-guide/index.html#page/DeepStream_Development_Guide%2Fdeepstream_app_config.3.2.html%23wwpID0ENHA

Please enable the config:

[sink1]
enable=0
type=3
#1=mp4 2=mkv
container=1
#1=h264 2=h265
codec=1
sync=0
#iframeinterval=10
bitrate=2000000
output-file=out.mp4
source-id=0

Thanks DaneLLL, but I have re-framed my question. I want to save a part of the video and also extract frames and save to files in the deepstream-test2-app. Can you help me?

Hi,
In deepstream-test2, it runs:

...! nvdsosd ! nvegltransform ! nveglglessink

For saving to a mp4, you should customize it into

...! nvdsosd ! nvvideoconvert ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc ! h264parse ! qtmux ! filesink

Is there a guideline or manual or reference where I can have a more detailed look at it?

Hi,
Please refer to create_encode_file_bin() in

deepstream_sdk_v4.0_jetson\sources\apps\apps-common\src\deepstream_sink_bin.c