Posted January 17, 2013
Minor gripe over how video streaming is handled over http by most popular video clients.
It goes something like this...
There is a big ass 4 GB video on the server side that is to be streamed.
The client doesn't know that.
How the client should handle problem:
1) Do a head request
2) Look at the content's length
3) If the length is small, request the entire movie
4) If the length is large, do a range request on the first x bytes.
How clients tend to actually handle the problem:
Request the entire 4 GB movie in one shot.
*Facepalm*
Yeah, once you seek to a particular spot in the video, clients tend to do range requests appropriately, but that initial request is a killer.
It goes something like this...
There is a big ass 4 GB video on the server side that is to be streamed.
The client doesn't know that.
How the client should handle problem:
1) Do a head request
2) Look at the content's length
3) If the length is small, request the entire movie
4) If the length is large, do a range request on the first x bytes.
How clients tend to actually handle the problem:
Request the entire 4 GB movie in one shot.
*Facepalm*
Yeah, once you seek to a particular spot in the video, clients tend to do range requests appropriately, but that initial request is a killer.