How do streaming videos download works?

Solution 1:

There are at least two ways to accomplish this:

  1. The software intercepts the download streams and saves any videos it detects (this is the most likely scenario)

  2. The software simply copies it out of the web brower's cache (although not impossible, this is far less likely for two reasons: 1., requires specific knowledge of all supported web browsers and possibly also certain video players; and 2., not all videos are stored on disk in their entirety as this depends on the video player)

    Edit: Added third and fourth possibilities...

  3. The software requests the video by crafting the same download request as the viewer plug-in would, and then saves the data as it is received (this is different from the first possibility I listed above, and it may require some reverse-engineering of the movie players written in Flash or some packet sniffing to determine how the URI was actually constructed)

  4. The software replaces the default handler for video players (or it may replace the Flash Player handler and act as an interim handler on web sites it recognizes such as YouTube.com, Video.Google.com, etc., but for web sites and Flash Animation content it doesn't specifically recognize it just passes the work off to the previous Flash Player plug-in to create a more "transparent" effect for the user)

Solution 2:

YouTube has a unique URL for each video. Some sites offer an online script that converts YouTube videos into MP4 or similar video file extension. That script usually downloads the video to their FFMPEG server and then converts it into MP4 or any other supported format and lets you download that streaming video.