How YouTube Works - Computerphile
Why Stack Overflow recommends it
Stack Overflow users link it when answering how YouTube offers multiple resolutions, how video is chunked and streamed adaptively, and how bandwidth-based delivery works.
Recommended by 3 people across 3 different months, 2014 to 2015.
What it is
A Computerphile interview filmed at YouTube HQ in San Bruno that explains, at a high level, how YouTube stores and delivers video. It covers re-encoding uploads into multiple resolutions, splitting video into small chunks, and why videos buffer. Presented by Computerphile with Sean Riley and Brady Haran.
What people said
Strong rec 0x24a537r9 · 2015-04 · Stack Overflow · on “how youtube produce different quality video for one uploaded video”
Upon upload, YouTube and all other video-hosting sites I know of reencode the source video into a number of different formats and resolutions, and store them all as separate stable blobs. The only other option (re-encoding on the fly) is absolutely unscalable and needlessly inefficient. Yes, storing a Cartesian product of formats and sizes of each video is heavy, storage-wise, but storage is cheaper than CPU. I'd recommend watching this excellent YouTube video [this video] on how YouTube works (from a high level perspective). It directly addresses literally the exact same question you're asking.
Recommends Adrian Pirvulescu · 2014-01 · Stack Overflow · on “Flash as3.0 how to set the video resolution quality to 144p,360p,480p,720p like youtube?”
Except you are playnig youtube videos, you need to implement your own mechanism. What youtube is doing is: Create different version of files for each resolution 240p .. % to max video resolution Play the appropriate file depending on the resolution selected. I suggest you look at he following "youtube video" about how youtube works. [this video]
Recommends jjmontes · 2014-12 · Stack Overflow · on “what decides ftp download and stream?”
If using FTP, streaming is implemented client side using the REST command (for Start Position), as explained at How does a FTP server resume a download? [LINK] and (in more detail) at [LINK] . Your server therefore needs to allow the REST verb (most do by default). Throttling (flow control) is also managed client side. Long story : This mechanism is similar to the strategy used by HTTP too. Streaming, however, is a wide subject. and there are other approaches to streaming. Some protocols provide extra verbs to signal other events like changes of bandwidth/resolution to account for unstable connections (like videoconference / desktop share protocols). Some are more suitable for live broadcast
Cites kjlubick · 2014-02 · Stack Overflow · on “How to get the video file for a movie currently playing in browser?”
In the old days of YouTube, it may have been possible to find the single video file on your harddrive and save it, but this is no longer the case. As explained in this Computerphile video [this video] , all YouTube videos are now split into tiny pieces and downloaded piece by piece. You can observe this for yourself if you open up Chrome (or Firefox's) Dev Tools and watch the nnetwork tab. You'll see: all of the pieces of the video loading bit by bit. One additional thing you'll learn from the Network tab is that the videos are downloaded as octet streams, so you won't be able to find the links to the pieces hidden in the DOM. One thing you migth try is, in the Network tab, clear the results and
Cites Greencat · 2015-04 · Stack Overflow · on “Objective-C How to compress images and videos to decrease data usage for app?”
@Adp I know youtube uses the DASH protocol and has several servers set up across the world that have pieces of each video locally available Source [this video] . I'm not sure how facebook/Instagram does it but I imagine that it is similar. Being such large companies, I imagine they have more resources available than an Amazon s3 Server.
Cites Toni Leigh · 2015-06 · Stack Overflow · on “Download video file for website based on screen size?”
How to do it based on screen size see the other answers, measure screen size with javascript and only add the video tag, or set the source, if the screen size is big enough. There's a gotcha if you use jquery as the <video> functions like .play() are javascript functions and won't be available to a jquery object. How to actually do it The best current solution for the problem of avoiding sending large video files to devices that haven't got the available bandwidth to handle it is currently server side and relies on the much more reliable metric of actual bandwidth. This is what YouTube do [this video] . Consider the following two scenarios: I'm at home, I have my smart phone connected by wifi to