Wowza Community

On demand playback vs. 'live' streaming of a static file

Our usage scenario requires to have many users (from a few to hundreds) watching together, in sync, the same recorded media file (usually 100s MB in size). Right now we use an on-demand app and, by remotely controlling the user’s player, we start/pause/seek the video file playback for everybody at the same time.

The question: is this the most efficient way (server load, disk usage, performance etc) of doing it or maybe I should try to create a ‘live’ stream from the static file and have the users pulling this stream? Would be this approach significantly better, any drawbacks/concerns? I’ve seen some posts about building a stream from a static file but if this solution makes sense I would appreciate a hint from where to start. Thanks.

Creating a live stream using the VOD file is the simplest. It will automatically ensure everyone is watching at the same point in time. See this SMIL schedule method.

You can control this type of stream dynamically, and you should be able to emulate the effect of seek by starting a new clip on a stream with a start value of what you would seek to. Take a look at this example as a very simple starting place

https://www.wowza.com/docs/how-to-control-stream-class-streams-dynamically-modulestreamcontrol

Also take a look at this example:

https://www.wowza.com/docs/how-to-switch-streams-using-stream-class-streams

Richard

If everyone is watching at the same time, it can be used in your case I think.

Richard

Also, we think the essential problem is old CPU. Upgrading to more recent hardware should fix the problem

Richard

Unless you need to allow users to pause and seek as they wish, independent of each other, I would do the b option because it will do what you describe, except not actually pausing and seeking but you could make something that looked like that to the user. If you have a specific sequence of streams you should be able to do it all by configuration using the scheduler, otherwise it will take some work to implement a controller, which you can start with the controller example but probably will need to customized for your purpose. Note how you can load streams with the scheduler and use the controller to make real-time changes.

Richard

It seems you’ve solved the problem yourself, unless you need to make absolutely sure that the stream only plays when you want it to, because that seems to be the only upside to having it as a live stream.

Ok, thanks. 2 questions please:

  • I need to be able to programatically control (no SMIL, schedule,play list) start/pause/seek the stream for all, in sync; would this be possible using the Steam class/controller & related API?

  • would this method be better (performance,resources) that using on-demand playback? is it worth the effort?

Thanks. But again, would this solution be easier on server than the current on-demand playback for a large audience?? Please see above our usage scenario.

The reason I start thinking about this is to find a workaround for the issue we were having when playing back MP4s (described here http://www.wowza.com/forums/showthread.php?18858-Random-CPU-usage-pattern , we have a ticket opened for it).

Unless we use MP4s, the current implementation (using synced on-demand playback) worked fine for the last 2-3 years so i need a very good reason to start working on a new solution. Would this help to avoid the above mentioned issue, would be more efficient on server?

I’m sorry Richard but none of us seems to be convinced. Let me ask the question in a different way.

The app must let 100 persons watch at the same time, in sync, a long prerecorded video file (the play will start for all at the same time, from the same point; the video can be paused or seeked for all at the same time) via RTMP.

Question 1: What solution Wowza would recommend:

a) use an on-demand playback app and have each player issue play, seek etc

or

b) create a live stream from the file and have all the clients playing the published stream; in this case the control would be implemented via the Stream on the server side

Question 2: Why?

Again we have a) implemented right now and I’m not looking for more work and do b) only to get the same thing (in terms of performance, server load, etc) or worse. Thanks.

I would appreciate if someone from Wowza would answer my question from the last post. Thank you.