I have setup a pipeline in Deepstream with python to write output from nvdsosd element.
I have a queue
queue1 = Gst.ElementFactory.make("queue", "queue1")
and then the rest of the elements necessary to record to mp4 file
nvvidconv = Gst.ElementFactory.make("nvvideoconvert", "convertor") capsfilter1 = Gst.ElementFactory.make("capsfilter", "capsfilter1") capsfilter1.set_property("caps", Gst.Caps.from_string("video/x-raw(memory:NVMM), format=RGBA"))
and so on.
Is there a simple way I could cache about 3-4 seconds of my stream inside the queue and start / stop recording depending on an event detected upstream (by nvinfer plugin)?