• Hardware Platform (Jetson / GPU) : NVIDIA Jetson AGX Orin
• DeepStream Version : 7.1
• JetPack Version (valid for Jetson only) : 6.1
• TensorRT Version : 8.6.2.3
• Issue Type( questions, new requirements, bugs) : question
Hello,
I have a pipeline that saves H.265 files every 60 frames:
...
# Create H265 queue element
h265_queue = create_pipeline_element(
"queue", "h265-queue", "H265 Queue"
)
# Create H265 encoder element
h265_encoder = create_pipeline_element(
"nvv4l2h265enc", "h265-encoder", "H265 Encoder"
)
# Create H265 parser element
h265_parser = create_pipeline_element(
"h265parse", "h265-parser", "H265 Parser"
)
# Create H265 splitmuxsink element
h265_splitmuxsink = create_pipeline_element(
"splitmuxsink", "h265-muxer", "H265 SplitMuxSink"
)
h265_splitmuxsink.set_property("location", temp%06d.hevc)
h265_splitmuxsink_sink_pad = h265_splitmuxsink.get_request_pad("video")
h265_splitmuxsink_sink_pad.add_probe(
Gst.PadProbeType.BUFFER,
h265_splitmuxsink_pad_probe_function,
h265_pad_probe_data,
h265_splitmuxsink,
)
def h265_splitmuxsink_pad_probe_function(
pad: Gst.Pad, info: Gst.PadProbeInfo, data: dict, splitmuxsink: Gst.Element
) -> Gst.PadProbeReturn:
"""
Pad probe function to count frames and trigger file save every 60 frames.
"""
data["count"] += 1
if data["count"] >= 60:
# Reset frame counter
data["count"] = 0
# Trigger splitmuxsink to save file
splitmuxsink.emit("split-now")
return Gst.PadProbeReturn.OK
Recently, I discovered that splitmuxsink
uses mp4mux
internally, which encapsulates raw H265 files into an MP4 container. As a result, the files saved every 60 frames are not raw H265, which affects my later processing.
Question
How can I configure splitmuxsink
to save raw H265 files without wrapping them in an MP4 container? I noticed the muxer-factory property defaults to mp4mux, but I’m unsure if it supports a raw H265 output as I could not find it in Splitmuxsink source code
If splitmuxsink
doesn’t provide this option, is there an alternative approach to achieve the same result while ensuring files are saved every 60 frames?