2

This is a question on Youtube's video buffering.

For example, this video buffers gradually as it plays along:

(1) http://www.youtube.com/watch?v=XGNOc7FYWKA

So if you pause the video, it buffers up to some point and then stops.

But try this video. It buffers the entire length, even if you pause:

(2) http://www.youtube.com/watch?v=fK1eWVrO_fE

I explored this a bit.

For video (1), the browser sends 2 extra parameters while requesting the FLV video:

GET /videoplayback?ipbits=8&algorithm=throttle-factor&cp=U0hRTVJRUV9OUENOMV9KS1VGOlczX1hyNGxsZU5T&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Csource%2Calgorithm%2Cburst%2Cfactor%2Ccp&id=5c634e73b15858a0&factor=1.25&ip=69.0.0.0&source=youtube&key=yt1&burst=40&fexp=903104%2C910103&keepalive=yes&sver=3&itag=34&signature=855EF17A58816C002AD9B13DE556B4A61A9D5418.2A2EF1CC340227895ED945AC8FC7D23EE7B0B569&expire=1328263596&range=13-1781759&redirect_counter=2 HTTP/1.1

It slides the range as the video plays on.

For video (2), the browser skips those 2 parameters, and the server responds with a plain HTTP "Content-Length: (actual video file length)" response. This is why the video downloads fully.

Now for my question:

Anyone know what causes this difference in buffering? Is it a property of the video, or the server, or something else?

Ideally I would like to use buffering of type (1) to prevent wasted bandwidth, if I don't watch the video fully.

FWIW, I tried tweaking the request in the second case by manually adding the range and keepalive parameters. I got "Error playing the video".

Deepak
  • 4,888
  • 1
  • 14
  • 7
  • You'll probably have to fiddle with the `range` numbers to reflect the file you're actually watching -- assuming they allow adding it to videos willy-nilly. – sarnold Feb 10 '12 at 01:37
  • See http://stackoverflow.com/questions/12833725/youtube-url-parameters-issue-youtube-not-using-http-ranges/14369082#14369082 You can get more hints from it. – Won Jan 18 '13 at 15:03

0 Answers0