<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 23 mars 2019 07 h 11, longkas <<a href="mailto:longkas@gmail.com">longkas@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
The pipeline has one videomixer, at first it only takes a videotestsrc as<br>
sink, now I want to play a video from file to add to the mixer, but the<br>
video does not play from start, instead it starts from the time when added<br>
to the pipeline, how can I make it play from start<br>
<br>
videomixer name=mix ! autovideosink \ <br>
   videotestsrc ! videoconvert ! mix. \ <br>
   filesrc name=fsrc location=v.mp4 ! decodebin ! videoconvert ! mix. \ <br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">You'll need to set a pad offset on your source pad that match the time you want to start mixing. If this time is now, it will start mixing immediately, if it's in the past it will clip (but this is not a seek, so the clipping can take a lot of time) and if it's in the future, it will hold until that moment before mixing.</div><div dir="auto"><br></div><div dir="auto">If you want to clip, best is to place a blocking  pad probe on your src pad, wait for it's callback and operate a seek. The seek must happen outside the callback. The pad offset will then be relative to the seek position.</div><div dir="auto"><br></div><div dir="auto">For live mixing though, we generally set this offset in the future. It gives a little reaction time, but also leaves enough time for the new source to preroll. On more advanced use case, you'll likely have your user preroll and seek in a seperate player pipeline, which ends with tee and an appsink. Then you source for mixing is an appsrc. This way you can completely decorelate the streaming pipeline from the sources. In recent GST there is proxy element that may work And me be less work the appsrc/sink.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote></div></div></div>