user6470: First of all, is the technique called "resampling" ?
Does youtube make live resampling for every user ? Isn't it too cpu costly ? So far what i know about codecs is that it has to go through many encoding steps ( compression, motion prediction etc etc ). All this things happens live ?
Or it encode and save different video files for different bitrate, so that when a user changes bitrate it servers that file. 
Isn't that a disk space destroyer too ?

user3295: Just to add a little bit more info to SlimSCSI's straight up answer.

Does youtube store different video files for different bit rate?

Yes and no, for the 1080p stream YouTube utilizes a technique called DASH. This serves essentially a video that was encoded with several different bitrates (though its one file) and adapts the bitrate on the fly according to bandwidth capabilities on the user side.
This is not true for any other resolution lower than 1080p.

Isn't that a disk space destroyer too?

It does use up more disk space but disk space is very cheap nowadays.
Destroyer? No, the increase in size is not that huge as the higher bitrate streams can "share" information with the lower bitrate ones.

user4169: 
Does youtube store different video files for different bit rate?


Yes


is the technique called "resampling" ?


No


Does youtube make live resampling for every user ?


No


All this things happens live ?


No, not on youtube. But Yes on twitch.tv


Or it encode and save different video files for different bitrate, so
  that when a user changes bitrate it servers that file.


Yes


Isn't that a disk space destroyer too ?


Yes


6470: <p>First of all, is the technique called "resampling" ?</p>

<p>Does youtube make live resampling for every user ? Isn't it too cpu costly ? So far what i know about codecs is that it has to go through many encoding steps ( compression, motion prediction etc etc ). All this things happens live ?</p>

<p>Or it encode and save different video files for different bitrate, so that when a user changes bitrate it servers that file. </p>

<p>Isn't that a disk space destroyer too ?</p>
 3295: <p>Just to add a little bit more info to SlimSCSI's straight up answer.</p>

<blockquote>
  <p>Does youtube store different video files for different bit rate?</p>
</blockquote>

<p>Yes and no, for the 1080p stream YouTube utilizes a technique called <a href="http://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP" rel="nofollow">DASH</a>. This serves essentially a video that was encoded with several different bitrates (though its one file) and adapts the bitrate on the fly according to bandwidth capabilities on the user side.</p>

<p>This is not true for any other resolution lower than 1080p.</p>

<blockquote>
  <p>Isn't that a disk space destroyer too?</p>
</blockquote>

<p>It does use up more disk space but disk space is very cheap nowadays.
Destroyer? No, the increase in size is not that huge as the higher bitrate streams can "share" information with the lower bitrate ones.</p>
 4169: <blockquote>
  <p>Does youtube store different video files for different bit rate?</p>
</blockquote>

<ul>
<li>Yes</li>
</ul>

<blockquote>
  <p>is the technique called "resampling" ?</p>
</blockquote>

<ul>
<li>No</li>
</ul>

<blockquote>
  <p>Does youtube make live resampling for every user ?</p>
</blockquote>

<ul>
<li>No</li>
</ul>

<blockquote>
  <p>All this things happens live ?</p>
</blockquote>

<ul>
<li>No, not on youtube. But Yes on twitch.tv</li>
</ul>

<blockquote>
  <p>Or it encode and save different video files for different bitrate, so
  that when a user changes bitrate it servers that file.</p>
</blockquote>

<ul>
<li>Yes</li>
</ul>

<blockquote>
  <p>Isn't that a disk space destroyer too ?</p>
</blockquote>

<ul>
<li>Yes</li>
</ul>
