What happens when uploading videos to YouTube & how does the video play?

On YouTube, you can upload just by dragging and dropping videos, and you can play movies smoothly by clicking the play button of the movie you want to watch. YouTube became the world's largest video site now that anyone knows, but how you do "cinema playback" and "uploading of videos" casually is being done on YouTube A movie that the engineers explained in an easy-to-understand manner is released.

What Does YouTube Do To Your Video After You Upload It? - YouTube

YouTuber's two people are charging Google engineers and others and uploading technology-related report videosNat and Lo. This video with 2 people appearing is just one of many videos released on YouTube ... ...

The number of videos uploaded to YouTube in recent years seems to be up to 2081 until all the uploaded amount is seen even if you watch them all.

A movie of 400 hours is posted in one minute, and that alone corresponds to 184 movies.

Nat and Lo, who celebrated its first year as YouTuber, said the engineer told YouTube's structure, which was the world's most famous video upload site by visiting YouTube's office.

Because the content of the interview was so dense, the contents heard were divided into "Part 1: What happens when uploading videos" and "Part 2: How is the movie being played" released to the public?

Video on YouTube will be uploaded with different file formats, resolutions and formats taken with various cameras.

It's the job of YouTube engineers to make this playable, but because YouTube is a global website, we need to accommodate a variety of users and terminals around the world.

To cope with this problem, YouTube converts all uploaded videos to a form suitable for YouTube.

Even if you do not convert at all and deliver it in its original shape, you will encounter such problems that movies with too high resolution can not be played. Nat and Lo commented that "If you do that, the terminal will melt as soon as it is waiting." A Google engineer says, "If people around the world replay such large volumes of videos at the same time, the Internet may be destroyed."

In order to prevent the Internet from being destroyed, YouTube analyzes the uploaded video ... ....

Movie "MezzanineIt is said that he is making a "copy of a high-quality movie" called so.

Dividing this finely at intervals of about 5 seconds ... ...

By sending divided fragments to separate machines for processing, the burden on the machine is reduced.

The machine calculates the fragments of mezzanine, so that a number of compressed versions are generated.

By connecting the compressed versions generated finally to each other, you can change the resolution. Depending on the resolution of the original movie, 25 kinds are outputted.

As a result of this processing, the video uploaded at 4K can be played at 4K picture quality if HDTV ......

Among the slow Internet speed jungles, you can choose the lower resolution version and watch the movie.

Richard, a YouTube engineer who was asked about how to compress the video, said, "As a technical story, do you know the word" CODEC "?

"It is a coined word made from two words" COMPRESSION (compression) "and" DECOMPRESSION (decompression) ""

The YouTube codec technology can make the file size small, making almost no deterioration of the original video's image quality.

Since the original video taken with the camera contains detailed information,

To limit only to information that codecs can recognize visually.

Roughly speaking, it is like to make it small by putting similar pixels together.

For example, the background of this movie hardly changes, only a part changes only when you move your hand. It seems that it is possible to reduce the file size while minimizing the change in image quality by not updating the unchanged part too much.

One person at Nat and Lo asks "If I move and dance like this, does the codec get serious?"

Mr. Richard tweeted as "an enormous sorrow as an engineer" while saying "It's terribly tough ... ...."

However, as with all other technologies, codec technology is not perfect. Therefore, YouTube frequently conducts human tests to compare and evaluate videos, and he seems to be adjusting the algorithm as well.

By adjusting the algorithm so that human beings can see easily, "Banding" which makes color unevenness such as light gradation etc ... ....

It seems that blocking noise "blocking" caused by compression can be improved.

In addition to these processes, thumbnail images are automatically generated when uploading videos to YouTube ......

Automatic subtitles are generated by voice recognition, and various processes are done just by uploading. Nat and Lo tells us that "Sugoi is doing thousands of such processing at the same time per second".

Uploading part 1 is here, so you can watch "Part 2: how the movies are being played" as the sequel from below.

What Actually Happens When You Watch A YouTube Video? - YouTube

Nat and Lo seems to have had the image that "YouTube will get the movie you want to watch when you click on the video on YouTube."

Actually, it seems that it was such a mechanism as it was only one file that can be played on old YouTube.

However, because it was "just loading uploaded videos", a mark often indicating loading was displayed.

So, YouTube came up with a strategy called "SLICED BREAD".

Dynamically change the size of the slice to be received next according to the situation of the net each time it receives a slice (continuation of moving image) in a method of downloading the continuation little by little while reproducing the divided video By doing so, it became possible to play movies without stress.

This distribution technology is "Adaptive bit rate(ABR) "is known as.

In other words, when you push the play button of the movie that you always click casually ... ....

YouTube instantly analyzes the user's Internet situation and so on.

If conditions are good, load high-resolution video slices and repeat this until the end of playing video slices.

If the siblings came back and started downloading a large capacity file during playback of the movie, the bandwidth would decrease ......

Since YouTube will select small slice slices from the next slice, it is not necessary to wait much if the situation of the Internet deteriorates.

Engineer Mr. Richard says, "When you are watching a movie it's really frustrating when you are loading, so it's trying to reduce waiting time even a bit."

Another approach to make playback smooth is to "shorten the distance to movie files".

It seems that all the videos are gathered in the place called "YouTube", but in fact it seems that it is structured to be delivered from a place physically close to the user.

this is"Content distribution networkIt is called.

YouTube has affiliated with Internet providers around the world ... ...

They said that they are offering storage for storing moving images around the world.

Videos are played from the storage in the vicinity of the user, not from Google's server. When you play the movie, YouTube goes to the nearest storage to ask "Do you save this movie?"

Browser that is sending YouTube to provider's storage is a browser.

Immediately after uploading, if there is no video played by anyone in the area, it may not be saved in the nearest storage ... ...

At that time, it is supposed to go to ask if the nearest storage saves the movie in the higher storage.

If it is not stored in the upper storage, it will eventually lead to Google's data center and the relevant video will be sent to the lower storage.

Our engineers say this is like a tree rooted in the world.

in Web Service,   Video, Posted by darkhorse_log