Flowplayer and JW Player both have dynamic switching solutions to accomplish this. They use BWCheck in the beginning, but only once, then use NetStream.info object, the “QoS” (quality of service) metrics to decide when to switch streams.
I’ve not worked with the Flowplayer implementation, but I have used the JW player one. The tutorial is here:
Are you doing live streaming? Wirecast does live, Expression encoder doesn’t do live. At present, as far as I know, Wirecast does not do the necessary alignment for this purpose. FMLE works.
If you are still using Wirecast, as I mentioned before I think, it does not properly align the keyframe timecodes to make live switching possible. FMLE can do this. Have you seen this, you can debug keyframe timecodes with this, to see if they are lining up:
My point is the jar does not fire the onBWDone call twice but the code sample does… hence I believe they are not in sync on a code level.
And to your code sample… I am seeing bw numbers on both calls and so both onBWDone calls would be considered valid which isn’t the correct usage. The two calls report very different bandwidth numbers.
“Stream switching for RTMP based upon bandwidth only works if the server implements a checkBandwidth call. This is default in FMS 3.0+, and easy to set up with Wowza. If there’s no checkBandwidth handler, streams will be switched based solely on the available display width.”
You must have had someone else in mind when sending this message, Richard.
Which makes a lot of sense to me, Considering you must be answering such a multitude of questions by so many users.
Please believe me I have no issue with the QoS metrics built-in to Flash, nor the NetStream.info.
Im simply trying to use this BWcheck module as a means of claculating how long will it take the user to recieve a specific big file (the files not being sent with NetStream at all).
Neither did I assume that latency and kBitDown are the same.
I just attempted to determine if the formula for calculating how long a file will take to be transferred (assuming bandwidth is not constant) would be:
Latency + kbitDown*fileSize in kbits
Is my formula correct ?
If not, what would be the right formula, please ?
Also, you said:
“latency” is how long will it take to start playing
The speed at which it will play once it starts is indicated by kbitDown
In what units is measured latency ? seconds ?
and in what units is measured kbitDown? kbits per second ?
Hi Richard, I cant get the LIVE RTMP stream switching… I followed guides from flow player and cant get live rtmp working. VOD RMTP works, but not LIVE…
Our task is to have one page for the viewer to enter and depending on the load of his/her connection it will choose between 3 streams 700 kbps, 400, and 150…
As far as I’ve been able to determine dynamic switching doesn’t work for live streams due to the lack the ability to buffer ahead of play back time.
I am using the bandwidth checker for my video streaming application and it is working well. However, I would like to show a progress bar while this is going on. Suggestions on how to do it? I am specifically looking for how to get the amount of bandwidth measurement data already received by flash client at a periodic interval.
By result set you mean the payload used for bw estimation? I was hoping there is a way I can the amount of data received so far, in actionscript, on the player side. And divide that by the total number of bytes expected. Is that possible? If so, could you point me on how to do this?
It seems the sample code is not up to date with the jar file… when using the jar the bw is reported to the client once… when using the code above compiled into a module… the bw call fires twice.
Also… one small suggestion…
When using the jar out of the box it might be nice to wrap the onConnect check in a try catch so that this error doesn’t occur if the second buy acomplia param isn’t passed:
invoke(onConnect): java.lang.ClassCastException: com.wowza.wms.amf.AMFDataObj cannot be cast to com.wowza.wms.amf.AMFDataItem: com.wowza.wms.amf.AMFDataList.getBoolean(null:-1)
Thanks!
Jake
Thank you jakehilton for your prompt and complete response!