<div dir="auto">Hi, my name sasikiran,<div dir="auto"><span style="font-size:1rem;text-align:center;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji"">Synchronize the start times of multiple GStreamer pipelines to ensure that the output videos from each pipeline are exactly the same, even though they are processed at different sizes. Achieving this level of synchronization can be a bit tricky once you've mentioned that the pipelines start at different times and you want precise synchronization, you might need to use more advanced synchronization techniques. One approach could involve using the </span><code style="text-align:center;border:0px solid rgb(217,217,227);font-size:0.875em;font-weight:600">sync</code><span style="font-size:1rem;text-align:center;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji""> property of elements within each pipeline. For example, setting the </span><code style="text-align:center;border:0px solid rgb(217,217,227);font-size:0.875em;font-weight:600">sync</code><span style="font-size:1rem;text-align:center;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji""> property of the video sinks to </span><code style="text-align:center;border:0px solid rgb(217,217,227);font-size:0.875em;font-weight:600">true</code><span style="font-size:1rem;text-align:center;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji""> might help synchronize the playback of videos. You could also experiment with the </span><code style="text-align:center;border:0px solid rgb(217,217,227);font-size:0.875em;font-weight:600">clock-rate</code><span style="font-size:1rem;text-align:center;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji""> property and other synchronization properties to fine-tune the synchronization behavior.</span><span style="font-size:1rem;text-align:center;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji"">Another approach would be to use the </span><code style="text-align:center;border:0px solid rgb(217,217,227);font-size:0.875em;font-weight:600">clockoverlay</code><span style="font-size:1rem;text-align:center;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji""> element to overlay a clock timestamp onto each video frame. This way, you can visually inspect the videos and determine the exact offset between them. Once you identify the offset, you might need to introduce delays in the pipelines that are ahead of others to align their start times.</span><span style="font-size:1rem;text-align:center;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji"">However, please note that achieving frame-level synchronization across multiple pipelines might be challenging due to the inherent nature of how GStreamer's data flow and buffering work. It's possible that slight variations in processing time could cause frames to get out of sync over time.If achieving perfect synchronization is critical, you might need to consider more specialized solutions or tools designed for high-precision video synchronization.</span><div dir="auto"><div style="border-width:0px 0px 1px;border-style:solid;border-color:rgba(255,255,255,0.2);padding-left:0.25rem;padding-top:0.25rem;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji";font-size:medium" dir="auto">Regards,<button type="button" style="border-width:0px;border-style:solid;border-color:rgb(217,217,227);font-family:inherit;font-size:16px;font-weight:inherit;line-height:inherit;margin:0px;padding:0px 0.75rem;background-image:none"></button></div><div style="border-width:0px 0px 1px;border-style:solid;border-color:rgba(255,255,255,0.2);padding-left:0.25rem;padding-top:0.25rem;font-family:söhne,ui-sans-serif,"system-ui",-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue",arial,"apple color emoji","segoe ui emoji","segoe ui symbol","noto color emoji";font-size:medium" dir="auto">Sasikiran G. Transcoding Engineer</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 11 Aug, 2023, 11:13 pm Dwight Kulkarni via gstreamer-devel, <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I have 4 pipelines. </div><div><br></div><div>Pipeline 1 : video src -> app sink1</div><div>Pipeline 2 : app src2 -> video 1</div><div>Pipeline 3 : app src3 -> downsampled video 2<br></div><div>Pipeline 4 : app src4 ->
downsampled video 3</div><div><br></div><div>In app sink 1, I connect a new-sample callback</div><div><br></div><div>I then take the sample, make a copy and push it to each of the app sources.</div><div><br></div><div>The problem I have is that each pipeline (pipeline 2 to 4) will start at different times.</div><div><br></div><div>If I take a video of a stop watch, I notice that pipeline 2 is 8 seconds offset from the other 2 pipelines.</div><div><br></div><div>The behaviour I am going for is that from one video source I want to end up with 3 different videos at different sizes. Eg. 1080p, 720p, etc. However, each video should be exactly the same.</div><div><br></div><div>I tried to avoid using a Tee and making a single pipeline because Tees take away control over how the frames are going into each element and they might get out of synch.</div><div><br></div><div>With the app source I was hoping to push exactly a certain number of frames into each pipeline and then call the "spit now" function with splitmux sink.</div><div><br></div><div>However, this depends on all pipelines starting at the same time and being in synch.</div><div><br></div><div>Can you advise how to achieve this ? Thanks !<br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Sincerely,</span><div><br></div><div>Dwight Kulkarni </div><div><span style="font-size:x-small">B.ASC, M.ASC, PMP</span></div><div><br></div><div><font size="1" face="verdana, sans-serif">Realize Potential</font></div><div><br></div></div></div></div></div></div></div></div></div>
</blockquote></div>