Live stream caching to an hour later like plus one service
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.
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
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.
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.
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.
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.
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.
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.