Re: Synchronizing Multiple Pipelines
sasikiran G via gstreamer-devel <[email protected]>
| Newsgroups | gmane.comp.video.gstreamer.devel |
|---|---|
| Message-ID | <CALUcVfxcvkBJE7A3TuMxPXiyhi9nhB4OzyFWm3OSvOzuTfgPgg@mail.gmail.com> |
Hi, my name sasikiran, 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 sync property of elements within each pipeline. For example, setting the sync property of the video sinks to true might help synchronize the playback of videos. You could also experiment with the clock-rate property and other synchronization properties to fine-tune the synchronization behavior.Another approach would be to use the clockoverlay 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.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. Regards, Sasikiran G. Transcoding Engineer On Fri, 11 Aug, 2023, 11:13 pm Dwight Kulkarni via gstreamer-devel, < [email protected]> wrote: > Hi all, > > I have 4 pipelines. > > Pipeline 1 : video src -> app sink1 > Pipeline 2 : app src2 -> video 1 > Pipeline 3 : app src3 -> downsampled video 2 > Pipeline 4 : app src4 -> downsampled video 3 > > In app sink 1, I connect a new-sample callback > > I then take the sample, make a copy and push it to each of the app sources. > > The problem I have is that each pipeline (pipeline 2 to 4) will start at > different times. > > If I take a video of a stop watch, I notice that pipeline 2 is 8 seconds > offset from the other 2 pipelines. > > 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. > > 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. > > 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. > > However, this depends on all pipelines starting at the same time and being > in synch. > > Can you advise how to achieve this ? Thanks ! > > -- > Sincerely, > > Dwight Kulkarni > B.ASC, M.ASC, PMP > > Realize Potential > >