1 Reply Latest reply on Feb 22, 2010 8:01 AM by stoem

    More on synchronisation

    Dominic Farmer



      I'm developing an application which needs to keep two or more parallel videos in sync. I saw the post on the SychronisedParallelElement and have started to use it. It doesn't work quite how I'd expect, which could be because I'm new to streaming video...


      What I'd like to do is load streams into a parallelElement, set a minimum buffer time, wait until the buffer has filled for all streams then start playing. If one or more streams needs to buffer, then I'd stop the whole thing, and put some logic in to try and sync the streams up again.


      What I'm finding is that if I don't set a bufferTime, the streams all start as they are ready, so slightly out of sync. If I set a bufferTime, either on the Synchronised parallelElement or by using the DualThresholdBufferingProxyElement, then it never plays. This appears to be because the buffer will only fill when the stream is playing, but the SynchronisedParallelElement has paused it because the bufferLength < bufferTime.


      So, what it boils down to is that I can't figure out how to hold the playback of a parallelElement, or a single stream, but keep the buffers filling up. If I could do this, I think I could do what I need.


      Thanks in advance...


        • 1. Re: More on synchronisation
          stoem Level 1

          I may be mistaken - and this feature may change with Player 10.1 - but normally a NetStream's buffer will not fill until play() is called. Likewise it instantly empties when pause() is called. Therefore it wouldn't be possible to 'start' a video, wait for the buffer to fill, and then pause it.


          As I said though, there are some changes happening in the latest Player where you can seek, slow-mo, fast forward etc within the buffer. I believe you can also pause without losing the buffer. I'm not sure if this works with progressive video, or streaming or both.