Bandwidth/Buffering question

I am using Wowza to do live streaming of native RTP encoder streams. Users are using flash to playback the streams. I have couple of bandwidth/buffering related questions.

  1. How do I detect when the user’s bandwidth is not enough to sustain the stream at the given bitrate? I measure the bitrate at the start, but want to react to any congestion on the user side. Would “NetStream.Play.InsufficientBW” event be fired with Wowza? I could use the “NetStream.Buffer.Empty” event to adapt the stream, but that is already too late - as in the playback has already stopped. I am trying to be more proactive about reducing bitrate. Are there any events/methods other than these two?

  2. Once I have adapted the stream, how can I detect if the network is not congested anymore? I would like to increase the bitrate if the network is again able to support the initial bitrate.

  3. I have noticed that sometimes the flash player will stutter and video freeze, even when the flash player reports it has plenty of buffer (I am monitoring the bufferlen at the client). This usually happens when the flash player is not getting the full stream bitrate - presumably due to congestion. It almost seems like the player is stopping to rebuild the buffer back to the length specified by NetStream.bufferTime setting in response to a minor n/w glitch. This would defeat the purpose of having a bigger client buffer. Does this behaviour make sense? Or is something wrong with my configuration?

  4. Lastly, I am looking into the possibility of implementing dual-threshold buffering as described at http://www.adobe.com/devnet/flashmediaserver/articles/fms_dual_buffering.html . Does this apply for live streams as well? It is clear how it will work for pre-recorded videoes, but will it work for live streams where the video data is being generated real time?

It sounds like you need to setup multi-bitrate streaming. It is all covered in articles from Adobe. See the links at the bottom of this post:

http://community.wowza.com/t/-/65

The tricky part is to find an encoder that produces properly aligned streams. The only options I know that work at this point in time are: FMLE (read EULA), Digital Rapids, Haivision, Inlet. Many other encoders will not work because the key frames are not aligned.

Any interem solution using a non-aligned encoder is not really supported in Wowza.

Dual-threshold buffering will not work with a live stream. There is no source of video for the second buffer.

Charlie

1 and 2 are what is covered in the mult-bitrate sections of that post, and the Adobe article that it links to, as mentioned.

Richard

Charlie,

What about 1) & 2) ? Would “NetStream.Play.InsufficientBW” event be fired with Wowza? If not, what is the best way to determine the need to reduce the bitrate of the stream? And is it possible to detect that we can increase the bitrate, without having to do a full bw check again?

Vivek

Great. Thanks for the quick reply.