views:

124

answers:

2

I mean youtube or any other streaming video site, but I've seen it on Youtube.
There are times that the loaded bar shows that more than enough video stream has been loaded so the player could play it but it suddenly pauses and shows the loading icon?
I'm just curious. But it is a programming related question, as it could help me to better understand streamed flash video.

+1  A: 

AFAIK, streaming video is not loaded sequentially, although the protocol tries it. It is possible that a part is not yet completely downloaded, while on average, most of the video is. Halting the moving download bar would give the feeling that nothing happens.

Another possibility, but I don't know the protocol well enough to be certain, is that a particular package wasn't received completely, but the application thinks it did. Upon trying to execute that part of the stream, the video halts while it loads the missing bits.

Abel
As far as I understand, most flash video players (including youtube) do not use FMS and use no special protocol for fetching the video content. It's just http. On the other hand, BBC (for instance) use FMS to deliver their video content.
spender
If it's indeed transported over HTTP, then the statement holds: HTTP is stateless and when used with range requests, clients typically request many parts at the same time, that come in at different moments.
Abel
A: 

I always assumed it used some kind of algorithm testing the amount of buffered data against your current download speed to check if the video could be played in its entirety. If your download speed suddenly drops below a certain threshold, the player realizes that you will hit the end of buffered data before the end of the video and so it stops and loads more.

Maybe not.

SP
If that were indeed true, then why is my player always going as far as the bar is (about) and then the video pauses until more bits are available? On slow connections, playing catches up on the download.
Abel