user5777: There's a lot of advice on the internet on encoding settings to apply to your video before uploading to YouTube (https://support.google.com/youtube/answer/1722171?hl=en, 

, ...). They say that not only will compression allow your video to upload faster but it will make it look better when played back on YouTube (an example of this is at 0:18 in the YouTube link above). 

What I also read is that YouTube re-encodes any video that you upload (example: "Telestream Episode product manager Kevin Louden started by noting that YouTube re-encodes all video uploaded to the site" - http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/Encoding-for-YouTube-How-to-Get-the-Best-Results-83876.aspx).
So the obvious question for me is if YouTube re-encodes anything that it's asked to upload, why should different codecs make a difference to final playback quality on YouTube? To get the best playback quality on YouTube, shouldn't I upload a lossless file and let YouTube compress it however it wants?
I don't care about upload time or file size, I just care about playback quality on YouTube.

user12347: Ultimately youtube is thinking about upload quality versus upload speed.
If someone tries to upload lossless on a less-than-amazing internet connection, they'll get frustrated and quit. If they upload with a lossy codec which is less-than-satisfactory (eg. motion-jpeg or mpeg2) they'll either take a long time to upload, have a poor quality end result, or both!
The best solution is the upload a video using a codec which has the best quality-to-size ratio, which at this point in time (2015) is either h264 or webm (in terms of codecs which are widely-supported at least).
If you use a decent encoder (eg. MeGUI) and high quality settings (eg. multiple passes, high maximum bitrate) it is doubtful you will see a significant difference between uploading lossless and h264. However, the filesize will be significantly smaller and the upload time a fraction of the lossless upload time.
Perhaps some day when we have quadruple-light-speed internet connections, we won't have to worry about these 'implementation details' - however until then, quality-to-filesize ratios will always be important, particularly in the age of 4K and ever-increasing screen resolutions.
Hope this helps.

user12554: You should upload the highest quality your tubes can afford. The current YouTube help text on uploads is misleading. It states:

Your videos will process faster if you encode into a streamable file format. For more information, visit our Help Center.

It contradicts what Colleen Henry, formerly of Google, now at Facebook said:

Colleen Henry, Video Hacker, Google Video Infrastructure, with some
great suggestions to help you get the best video quality on YouTube:
It's important to think of the files you upload to YouTube as golden
masters, as they will be used as source material to generate video
streams for years to come. Simply put, the better the quality of the
file you upload to YouTube today, the better quality the viewer's
experience will be throughout your video's life on YouTube.
As displays increase in size, compression techniques become more
efficient, playback devices become more sophisticated, and internet
connections improve, so will the quality YouTube will be able to
provide to the viewers of your videos. This means, while you may reach
a limit on perceived benefits from higher bitrates or more efficient
encoding if you were to test it today, that does not mean you should
stop there. You will see a huge benefit over the lifetime of your
video being available on YouTube, as internet speeds, hardware, and
software evolve. Upload the best quality video that you can create and
squeeze through your internet connection!
Bonus tips:

Many encoders can spend more CPU time to create a much more efficient
file. If you have a powerful computer, but a slow internet connection,
look into using more complex and efficient encoding to save upload
time.

You can noticeably improve the quality of your video on YouTube by
using a sophisticated, scene aware, denoising filter prior to
uploading.

Keyframe interval doesn't really matter much at this moment in time,
but please keep it under 5 for VOD.

The sample rate of your audio should match your source's sample rate
in which it was produced.

If you make sure to use a streaming format, like an mkv, .mp4 or a
.mov, with the metadata at the front of the container we will begin
processing your video WHILE you are uploading it, drastically reducing
overall turnaround time. This will make things MUCH faster, with no
negative side effect. You can add the metadata atom to the front of
your file with something qtfaststart, or select it when you are
creating the file in Squeeze, Episode, etc.

It is ideal to use
constant quality encoding. This will let you create a high quality
variable bitrate file, at the speed of a single pass. It will maintain
a consistent target quality throughout the file, rather than trying to
allocate bits to hit an arbitrary bitrate, which can easily
under-shoot or over-shoot, and with two pass, take extra long to
create.

You can put uncompressed PCM audio in an .mov or .mkv
container and deliver it to us if you like. However, make sure not to
create multiple discrete mono streams when you do it.



source: http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/Encoding-for-YouTube-How-to-Get-the-Best-Results-83876.aspx

user3295: I've answered a similar question some time ago. YouTube added a few codecs since then but all the info there still applys: How does YouTube encode my uploads and what codec should I use to upload?
Short answer: Yes if you are concerned about maximum quality a lossless codec or visually lossless codec is the way to go. Re-encoding always means loss of information if you re-encode with a lossy codec like h264.
Saying that videos will look better with compression is just a wrong statement.
Compression reduces file size, that's the only benefit you get from it. Best case you don't loose information with that compression but with most codecs like h264 you do because they discard information and re-arrange it in order to achieve a high compression.
Though different codecs do have an affect on the outcome, encoding a video with MPEG2 or h264 makes a huge difference. The former will usually have way more compression artifacts depending on your encoding settings than an h264 encoded video with similar bitrate.
So if your source is already having artifacts the second encode from YouTube won't make it look any better but worse.

5777: <p>There's a lot of advice on the internet on encoding settings to apply to your video before uploading to YouTube (<a href="https://support.google.com/youtube/answer/1722171?hl=en">https://support.google.com/youtube/answer/1722171?hl=en</a>, <div class="youtube-embed"><div>
                <iframe width="640px" height="395px" src="https://www.youtube.com/embed/2DuHhd3lwOs?start=0"></iframe>
            </div></div>, ...). They say that not only will compression allow your video to upload faster but it will make it look better when played back on YouTube (an example of this is at 0:18 in the YouTube link above). </p>

<p>What I also read is that YouTube re-encodes any video that you upload (example: "Telestream Episode product manager Kevin Louden started by noting that YouTube re-encodes all video uploaded to the site" - <a href="http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/Encoding-for-YouTube-How-to-Get-the-Best-Results-83876.aspx">http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/Encoding-for-YouTube-How-to-Get-the-Best-Results-83876.aspx</a>).</p>

<p>So the obvious question for me is if YouTube re-encodes anything that it's asked to upload, why should different codecs make a difference to final playback quality on YouTube? To get the best playback quality on YouTube, shouldn't I upload a lossless file and let YouTube compress it however it wants?</p>

<p>I don't care about upload time or file size, I just care about playback quality on YouTube.</p>
 12347: <p>Ultimately youtube is thinking about upload quality versus upload speed.
If someone tries to upload lossless on a less-than-amazing internet connection, they'll get frustrated and quit. If they upload with a lossy codec which is less-than-satisfactory (eg. motion-jpeg or mpeg2) they'll either take a long time to upload, have a poor quality end result, or both!</p>

<p>The best solution is the upload a video using a codec which has the best quality-to-size ratio, which at this point in time (2015) is either h264 or webm (in terms of codecs which are widely-supported at least).</p>

<p>If you use a decent encoder (eg. MeGUI) and high quality settings (eg. multiple passes, high maximum bitrate) it is doubtful you will see a significant difference between uploading lossless and h264. However, the filesize will be significantly smaller and the upload time a fraction of the lossless upload time.</p>

<p>Perhaps some day when we have quadruple-light-speed internet connections, we won't have to worry about these 'implementation details' - however until then, quality-to-filesize ratios will always be important, particularly in the age of 4K and ever-increasing screen resolutions.
Hope this helps.</p>
 12554: <p>You should upload the highest quality your tubes can afford. The current YouTube help text on uploads is misleading. It states:</p>
<blockquote>
<p>Your videos will process faster if you encode into a streamable file format. For more information, visit our Help Center.</p>
</blockquote>
<p>It contradicts what <a href="https://www.linkedin.com/in/colleenhenry" rel="nofollow noreferrer">Colleen Henry</a>, formerly of Google, now at Facebook said:</p>
<blockquote>
<p>Colleen Henry, Video Hacker, Google Video Infrastructure, with some
great suggestions to help you get the best video quality on YouTube:</p>
<p>It's important to think of the files you upload to YouTube as golden
masters, as they will be used as source material to generate video
streams for years to come. Simply put, the better the quality of the
file you upload to YouTube today, the better quality the viewer's
experience will be throughout your video's life on YouTube.</p>
<p><strong>As displays increase in size, compression techniques become more
efficient, playback devices become more sophisticated, and internet
connections improve, so will the quality YouTube will be able to
provide to the viewers of your videos. This means, while you may reach
a limit on perceived benefits from higher bitrates or more efficient
encoding if you were to test it today, that does not mean you should
stop there. You will see a huge benefit over the lifetime of your
video being available on YouTube, as internet speeds, hardware, and
software evolve. Upload the best quality video that you can create and
squeeze through your internet connection!</strong></p>
<p>Bonus tips:</p>
<ul>
<li><p>Many encoders can spend more CPU time to create a much more efficient
file. If you have a powerful computer, but a slow internet connection,
look into using more complex and efficient encoding to save upload
time.</p>
</li>
<li><p>You can noticeably improve the quality of your video on YouTube by
using a sophisticated, scene aware, denoising filter prior to
uploading.</p>
</li>
<li><p>Keyframe interval doesn't really matter much at this moment in time,
but please keep it under 5 for VOD.</p>
</li>
<li><p>The sample rate of your audio should match your source's sample rate
in which it was produced.</p>
</li>
<li><p>If you make sure to use a streaming format, like an mkv, .mp4 or a
.mov, with the metadata at the front of the container we will begin
processing your video WHILE you are uploading it, drastically reducing
overall turnaround time. This will make things MUCH faster, with no
negative side effect. You can add the metadata atom to the front of
your file with something qtfaststart, or select it when you are
creating the file in Squeeze, Episode, etc.</p>
</li>
<li><p>It is ideal to use
constant quality encoding. This will let you create a high quality
variable bitrate file, at the speed of a single pass. It will maintain
a consistent target quality throughout the file, rather than trying to
allocate bits to hit an arbitrary bitrate, which can easily
under-shoot or over-shoot, and with two pass, take extra long to
create.</p>
</li>
<li><p>You can put uncompressed PCM audio in an .mov or .mkv
container and deliver it to us if you like. However, make sure not to
create multiple discrete mono streams when you do it.</p>
</li>
</ul>
</blockquote>
<p>source: <a href="http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/Encoding-for-YouTube-How-to-Get-the-Best-Results-83876.aspx" rel="nofollow noreferrer">http://www.streamingmedia.com/Articles/Editorial/Featured-Articles/Encoding-for-YouTube-How-to-Get-the-Best-Results-83876.aspx</a></p>
 3295: <p>I've answered a similar question some time ago. YouTube added a few codecs since then but all the info there still applys: <a href="https://video.stackexchange.com/questions/5318/what-codec-will-my-youtube-uploads-be-output-in-and-what-codec-should-i-use-to-u/5715#5715">How does YouTube encode my uploads and what codec should I use to upload?</a></p>

<p>Short answer: Yes if you are concerned about maximum quality a lossless codec or visually lossless codec is the way to go. Re-encoding always means loss of information if you re-encode with a lossy codec like h264.
Saying that videos will look better with compression is just a wrong statement.
Compression reduces file size, that's the only benefit you get from it. Best case you don't loose information with that compression but with most codecs like h264 you do because they discard information and re-arrange it in order to achieve a high compression.</p>

<p>Though different codecs do have an affect on the outcome, encoding a video with MPEG2 or h264 makes a huge difference. The former will usually have way more compression artifacts depending on your encoding settings than an h264 encoded video with similar bitrate.
So if your source is already having artifacts the second encode from YouTube won't make it look any better but worse.</p>
