Skip to main content
July 13, 2010
Question

Dynamic Buffering Based on Bandwidth and Datarate

  • July 13, 2010
  • 1 reply
  • 511 views

I'm trying to determine an initial value for NetStream.bufferTime based on the client's calculated bandwidth and the video's bitrate.

As far as I can tell you can't do this, because you must have an initial buffer set BEFORE you call NetStream.play() (or use the default 2 seconds) and FMS does not call NetStream.onMetaData, where one would normally find the videodatarate, until after NetStream.play() is called.

Even if you modify NetStream.bufferTime during the onMetaData call back it doesn't effect when the video starts playing or when the NetStatus event registers "NetStatus.Buffer.Full".

Therefore my question is:

How do I find the Video Data Rate BEFORE I call NetStream.play?

-Or-

How do how do I reset the initial bufferTime before acctual play back begins and the NetStatus event fires with "NetStatus.Buffer.Full"

    This topic has been closed for replies.

    1 reply

    Adobe Employee
    July 16, 2010

    I think you are right. Without playing the stream you cant decide it datarate.