3

I've been maintaining a video system for a client that uses JW Player with Flash Media Server to stream out some video. Until recently this was just pushing out one stream at one bitrate. This obviously isn't ideal for everybody so I've been looking at bandwidth detection.

I've built a demo system that can now dynamically switch between three bitrates using the built in methods in JW Player. Before I can push it, I need to answer a question from my client:

Does it have hysteresis built in so that the stream does not oscillate if the bandwidth is marginal? Ideally, if the bandwidth is anywhere near the bottom of a band (yeh, yeh..) then I would like it to use the next speed down.

So two questions from that:

  • What happens when a user's bandwidth is right on the border between two streams? Will they flip-flop between the two streams?

  • Are there any best practices to minimise the amount of stream jumping for users like this (and in general)?

Oli
  • 235,628
  • 64
  • 220
  • 299

1 Answers1

0

I don't know how JW Player does it, but there is a "native" way to do it. Possibly this player uses it, possibly not - who knows. Flash video players are traditionally made on case by case basis and do-it-all players have proved to be of a low quality overall. So, possibly, it would be a good thing, considering particular demands to build the player on your own - it's quite a bit of testing, but not so much code.

How it works "natively": detailed info. In a nutshell, you are required to implement 2 functions: onBWCheck and onBWDone on the object used as a client of NetConnection instance. The process of detection is more or less like this: the server sends a packet of some size and upon receiving it it will calculate the time it took for the packet to travel. It will try to do so until it "thinks" it finds the proper bandwidth.

Now to try and answer your question: since the bandwidth check is purely empirical and is performed only once per session, multiple factors can bias the result. So the estimation is not very precise and may depend a lot on things like client machine been torrenting some stuff at the same time, or being connected to another streaming server, or, Windows deciding to update some very important components... you get the idea.

Truth being told, Flash streaming is by design preferring low speed with less lag then high speed with possibly more lag. But these values aren't absolute and really depend on each particular situation and the route to server, the ISP of the user etc. So, if I were you, I wouldn't sign the paper which says "no hysteresis", however, offering good quality is not unreasonable :)