I want this question deleted. I have reposted the modified question at StackOverFlow.
migrated from stackoverflow.com Aug 15 '11 at 22:38
This question came from our site for professional and enthusiast programmers.
closed as not a real question by sblair, studiohack♦ Aug 15 '11 at 23:37
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.
Let's get started. Buckle down.
What happens when I watch a video on a video streaming site?
It's really quite simple (well, conceptually).
Think about it like sending sheets of paper through a mail tube. The problem is, the envelope can only fit 50 sheets. So if we need to read a book, we could receive the sheets one envelope at a time and bind the book together as we receive the envelopes.
Being the impatient people we are, though, we don't want to assemble the whole book before we can start reading. So what we do is take the part of the book that we have received when we have enough to start reading and bound it together and start reading it.
This is what they call progressive downloading. You basically start playing the beginning of a media file before it's completely done. It's kind of a hack. Not all video types support it, and it means that you have to download the whole file to see the whole file, like finishing binding the book before you can toss it.
After doing this a while, reading an unfinished book feels very unrefined. I mean, threads are sticking out of it and if we finish midchapter we have to wait what feels like forever to see if Bob kisses Jane. You try something new. Instead of assembling the book, you use an old-style report cover that lets you bind the pages together with a clip instead of thread.
As they send you the pages, you can just pop them into the back of the cover, and you can get rid of the first pages at will, as well.
This is streaming. Youtube sends a player that can download the pieces of a video and play them without having to store them on the disk or assembling the entire video. Because it's much more convenient (and since it seems acceptable to use DRM with streaming), users and companies alike prefer streaming.
What does the streaming player do? How does it get the video? What form is it in?
Depends. It always gets the video by downloading it from the server (usually using HTTP), though.
If you take Youtube as an example, it usually uses the H.264 codec (or nowadays, WebM) in a
Neflix uses a DRM'd container (and possibly codec) and you would likely be kidnapped if you found out how to break it.
Where is the actual data on the server? Can I access the video data directly?
Again, it depends.
Youtube, if you do enough poking around, will probably let you get at their video mine. In these big streaming services, it's very unlikely though.
You can access the video directly on most sites (whose main business is not video) if you poke into the HTML and find the video file the flash container is loading. Then you can just download that file.