I run deepstream-app with config:
... [sink 0] enable=1 type=3 container=1 codec=1 sync=0 bitrate=2000000 output-file=out.mp4 source-id=0 ...
It writes all the time to the file.
If I want to control when I write. Such as when something is detected, it starts writing to the file until it is undetected.
I looked at the Reference Application Configuration. I didn’t find the key related to it.