matroskamux reset start timestamp

Peter Biro pettair at
Fri Apr 30 20:09:40 UTC 2021

Hi all,

Im developing a recorder app which would produce H264 MKV files.

I receive VP8 RTP UDP stream from the network and besides the transcoding I need to record X seconds of video before the recording event is triggered. So to achieve this I have a constantly running pipeline, where I'm blocking a queue before the matroskamux which I set the "max-size-time" property to have the data from before the event.

My only problem is that the created video files start timestamp is set when I start the pipeline, so for example if the record event is arriving 1 hour after that the pipeline is started and the recording lasts for 1 minute the output video would have a length of 1 hour and 1 minute however only last minute would be playable (the video itself is starting right away, but the duration would be messed up and the seek bar is pretty much unusable)

So do you know if is there is any option to reset/set start timestamp on the video file?

Thank you!


My pipeline:

udpsrc multicast-group=<ip> auto-multicast=true port=<port>
 ! application/x-rtp,media=video,encoding-name=VP8,payload=96 ! rtpjitterbuffer ! rtpvp8depay ! tee name=video_stream_spilt
 video_stream_spilt. ! queue name=file_sink_video_queue ! omxvp8dec ! videoconvert ! omxh264enc control-rate=1 insert-sps-pps=true ! matroskamux name=video_mux
 ! filesink name=file_sink location=<file_name>
 video_stream_spilt. ! fakesink

More information about the gstreamer-devel mailing list