Dear GStreamer community,
I’m trying to play a local MP4 video that is added to a pipeline after the pipeline has already started.
The main pipeline starts by playing an SRT stream, which is linked to a compositor element. After about 10 seconds, the compositor “squeezes” the SRT stream to make room for the MP4 video in part of the screen.
At that moment, I dynamically add a new branch to the pipeline to play the MP4 video. The branch looks like this:
filesrc → qtdemux → decodebin → identity → compositor sink pad
The issue is that the MP4 starts according to the pipeline clock. So if the new branch is added 10 seconds after the pipeline starts, the MP4 begins playback 10 seconds ahead of its start time, effectively skipping the first 10 seconds of the video.
I’ve tried the following, but none had the desired effect:
-
Setting the
ts-offsetproperty on theidentityelement -
Sending a segment event to the MP4 branch with a start time of 0
-
Sending a seek event to the MP4 branch
I suspect the solution involves one of the above approaches, but I’m not using them correctly. I’d really appreciate any guidance or examples on how to make the MP4 start from timestamp 0, independent of the main pipeline’s running time.
Thank you in advance,
Gabriele