• Hardware Platform (Jetson / GPU) : NVIDIA Jetson AGX Orin • DeepStream Version : 7.1 • JetPack Version (valid for Jetson only) : 6.1 • TensorRT Version : 10.3 • Issue Type( questions, new requirements, bugs) : question
Hello,
In my pipeline I am using as a sink splitmuxsink element. Currently I save files in splitmuxsink every 1 Gst.SECOND, however I would like to change the logic to save files every 60 frames instead of 1 second. Here is my code:
def create_pipeline_element(
factory_name: str, element_name: str, print_name: str, logger: logging.Logger
) -> Gst.Element:
"""
Create GStreamer pipeline element
"""
# Create GStreamer element
element = Gst.ElementFactory.make(factory_name, element_name)
if not element:
raise ValueError(f"Unable to create {print_name}")
logger.info(f"Successfully created {print_name}.")
return element
...
# Create H265 parser element
h265_parser = create_pipeline_element(
"h265parse", "h265-parser", "H265 Parser", logger
)
# Create H265 splitmuxsink element
h265_splitmuxsink = create_pipeline_element(
"splitmuxsink", "h265-mux", "H265 SplitMuxSink", logger
)
h265_splitmuxsink.set_property(
"location", "/media/ramdisk/temp/v_temp%06d.hevc"
)
h265_splitmuxsink.set_property("max-size-time", Gst.SECOND)
Question
I would like to replace Gst.SECOND with some other functionality, exactly saying - Save file every 60 frames instead of 1 second. How can i achieve that?
Thoughts
I thought about creating a pad probe function that is connected to this element, counts frames and when there are 60 frames it saves the file to the specified location. However, I find it very tedious and unnecessary. Is there any other way to do it? Some other parameter in splitmuxsink that will allow me to save files every 60 frames?
In addition, saving every 60 frames as a separate file requires the encoder to output an IDR frame (including SPS/PPS and other decoded data) every 60 frames.
Here, my encoder has set iframeinterval and idrinterval to 60. Does this ensure that my hevc file will be saved every 60 frames, or I still have to write a custom probe function?
Thank You for clarification. However, I also have a question with splitmuxsink. When trying to access its sink pad I tried to get static pad, like this: