Dynamic gstreamer pipeline

Good day colleagues!!! I want to stream video using some basic pipelines, but also want to save a small sequence of video in some cases. How to do this? Please give me some tips on how to realise such an idea while maximising the features of gstreamer

In your application: Does the event come from the outside or is it based on the video itself, e.g., a detection pipeline or a timestamp or a duration has passed?

I think that would be outside the pipeline. But … this pipeline is an element of a video analytics system. So if I implement this analytics as a gstreamer plugin, it will be inside the pipeline.

Would a valve work here? Meaning, the additional pipeline is always there, but you can programmatically set the drop property of the valve to false (initial value true), and back to true again when 10 seconds have passed.

Thank you! Your advice is helpful.