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.
-
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?
-
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.
-
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?
-
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?