• Hardware Platform (Jetson / GPU) : NVIDIA Jetson AGX Orin
• DeepStream Version : 7.0
• JetPack Version (valid for Jetson only) : 6.0
• TensorRT Version : 8.6.2.3
• Issue Type( questions, new requirements, bugs) : questions
I have such a GStreamer pipeline writen in Python using DeepStream:
gst-launch-1.0 -v filesrc location=/opt/nvidia/deepstream/deepstream-7.0/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m width=1920 height=1080 batch-size=1 batched-push-timeout=4000000 ! tee name=t t. ! queue max-size-time=1000000000 ! nvv4l2h265enc iframeinterval=60 ! h265parse ! splitmuxsink location=/tmp/data/video_R%02d.h265 max-size-time=1000000000 \ t. ! queue max-size-time=1000000000 ! videorate ! capsfilter caps="video/x-raw(memory:NVMM), framerate=1/1, format=NV12" ! nvvideoconvert ! nvv4l2h264enc iframeinterval=1 ! h264parse ! splitmuxsink location=/tmp/data/video_R%02d.h264 max-size-time=1000000000
- H264 and H265 files are saved correctly; however, H265 files are saved faster. This means that when I stop the video at a random time, there are consistently more H265 files saved than H264 files. I want to achieve simultaneous saving of H264 and H265 files at a consistent interval of every 1 second.
For example, after 35 seconds of video, there should be 35 H265 files and 35 H264 files, but currently, there are 35 H265 files and only 30 H264 files with the Gstreamer pipeline above.
- Additionally, I want to save .txt files simultaneously, each containing some text. However, when I connected the probe function to the src pad of the h265parse element in the H265 branch, the .txt files were saved too quickly and in excessive quantities, and they were not synchronized with the H265 files. Should I create another branch from the tee to save these .txt files, or is there a better way to connect the probe function?
The probe function is simple it just writes current time to txt file:
def extract_time(pad, info, user_data):
current_time = time.time()
with open(f'/tmp/data/{current_time}.txt', 'w') as f:
f.write(f'{current_time}')
return Gst.PadProbeReturn.OK