Skip to main content
Participant
February 24, 2010
Question

Switching from live streaming to pre-recorded instantly

  • February 24, 2010
  • 1 reply
  • 666 views

Greetings,

Getting right down to it,  I am having troubles finding a way to switch videos during a live stream.  For example,  broadcasting a show and switching to a commercial and then back to the live feed.

If anyone could lead me to an answer would be much appreciated.

Thank you

    This topic has been closed for replies.

    1 reply

    Janaki Lakshmikanthan
    Adobe Employee
    Adobe Employee
    February 25, 2010

    Hi,
    You can switch between live and vod very well. But the concern is say you have

    been broadcasting your live stream for 60 seconds, now you switch to a vod which

    is your commercial and that plays for 5 seconds. When you again switch back to

    live, you might have missed that 5 seconds of live video while you were playing

    the commercial. To avoid this, create a DVR stream for the live stream which you

    were publishing and subscribe to this DVR stream. You can do this by...

    1. Start playing your DVR stream (which is the recording of the live) somewhere close to live. How to achieve this
    - If you are using flvplay back component, then you can set the IsSNapToLive property true.
    - If you are using video component, the get the duration of the stream > start playing the stream from the beginning, > and immediately seek to the close to the length of the stream. Ideally to get the stream faster you can seek to (stream.length minus your buffer length)
    2. play the stream for 't' seconds. Remember when you are stopping the stream
    3. Switch to you commercial
    4. Again play the DVR stream starting from the point where you have left it in step 2.
    5. ....

    When you switch between streams always make sure you set the right OldStream name property to avoid any confusions.

    Regards,
    Janaki L