Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want this question deleted. I have reposted the modified question at StackOverFlow.

share|improve this question

migrated from 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.

Hmmm. That could be a very....long....answer. – Jonathan M Aug 15 '11 at 18:54
An overly simplified story: the original video is encoded into one or several files (different formats, bitrate, etc.) and is accessed by the flash play through plain HTTP (in most cases). The client can use the HTTP Range header to download part of the file or some sever side program can do this (rare?). The video meta data is normally an XML file downloaded from some server and it contains the URLs to the different videos files or ways to find them. Usually flash video is distributed by some CDN, so the URLs to the videos may be generated dynamically. – Aug 15 '11 at 23:03

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 .flv container. In the client-side, it's usually stored as such.

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.

share|improve this answer
Thank you for taking time to answer my question so lucidly. – Jinal Kothari Aug 16 '11 at 9:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.