Results 1 to 9 of 9

Thread: Live stream caching to an hour later like plus one service

  1. #1
    Join Date
    Feb 2014
    Posts
    10

    Default Live stream caching to an hour later like plus one service

    Hi,
    I am not sure if its right place to ask.
    Basically we have live stream running on wowza. We want to add a plus one service, so play the same stream but an hour later.
    What is the best method to achieve this.

    thanks

  2. #2

    Default

    isn't that possible to build into a script?
    just an idea.

    when a live stream starts you have a datetimestamp of when the stream started. build into your script that from that datetimestamp + 1 hour you will send the live stream.

    i dont know what your setup is though.
    - is the livestream public available?
    - can i view the livestream on lets say vlc/winamp (or something else)? so get the stream straight from the wowza server. that would make it harder to script.
    - if you run it on flash player you should be able to build it in. you might need a database and some scripting language for it.

    so it depends a bit on what your setup would look like.

    maybe there is a much easier solution. i dont know

  3. #3
    Join Date
    Feb 2014
    Posts
    10

    Default

    we have live stream publicly available. but playing via jwplayer.
    if i capture a datetimestamp+1, how stream would start from that point. do i need to cache it or record as archive?

  4. #4

    Default

    If you are streaming over RTMP only you can use start and duration as shown in this example:
    How to insert a pre-roll or mid-roll for video on demand playback in Flash RTMP client

    If streaming over HTTP:
    How to specify a play start time and duration for HTTP streaming

    Salvadore

  5. #5
    Join Date
    Feb 2014
    Posts
    10

    Default

    thanks for the reply. i think you misunderstood the question.

    I have one live stream running. i want to add an additional channel to play same stream but an hour late.

    So second channel would be playing same stream but an hour delayed.

    thanks

  6. #6

    Default

    i think that would be a problem, because a live stream is as it says a live event.
    you can't show previous images/stream from a live event.
    i dont know how to program that though or if it is even possible when recording it.

  7. #7

    Default

    Quote Originally Posted by tariqinaam View Post
    thanks for the reply. i think you misunderstood the question.

    I have one live stream running. i want to add an additional channel to play same stream but an hour late.

    So second channel would be playing same stream but an hour delayed.

    thanks
    It is not possible to delay the stream by that much without doing some custom work.

    Basically what you would need to do is store the packets from the incoming stream somewhere and then play them out in a separate stream one hour later.

    The following package does this for short delays by storing the packets in memory however for a one hour delay, this would use too much memory so you would need to write them to disk and retrieve them later. Apart from that, the process is pretty simple for a developer to implement.

    http://www.wowza.com/downloads/forum...hWithDelay.zip

    Other options are to use segmented recordings of the original stream and then use the Streams api to feed the delayed recordings into a new stream later on. This would also need some custom work.

    Roger.

  8. #8
    Join Date
    Feb 2014
    Posts
    10

    Default

    Thanks for the reply Roger,

    I think storing as segmented recording would fit in our case.
    Just to understand the custom work involved, I would be storing 55 min segmented files and then generating a playlist to play in separate stream.
    To understand the work,
    1) can i add item in playlist on the fly.
    2) what custom work would require to play this playlist.

    I would appreciate any help/

    thanks
    Tariq

  9. #9

    Default

    Hi,

    How I have done this in the past is to to use segmented recording where the segment duration divides evenly into the delay time. e.g for 60 minute delay, have 10, 15 or 20 min segments. You need at least 2 extra segments as you cannot be writing to the same one you are reading from and there may be some slight timing issues where the recorder doesn't finish exactly on time or the switch occurs a few seconds early.

    If you use a custom File version Delegate then you should be able to have your recorder automatically overwrite the old file names so would make the playback side simpler.

    See http://www.wowza.com/forums/showthre...lit-recordings for Wowza Media Server <= 3.6.4 or http://www.wowza.com/forums/content....dvancedexample for Wowza Streaming Engine >= 4.0

    Once you have the recordings, You create a stream using the Streams api that has all of the segments in it's playlist. It should initially start offset from the recorder and as long as recording continues properly, it should never catch up.

    If you need assistance, I suggest asking on the consultants forum area or have a go and ask here if you need guidence.

    Roger.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •