MPEG-1 and MPEG-2 are lossy codecs, so when uploading to YouTube, make sure that your codec is preferably H. 264 or another lossless codec.
What compression method does YouTube use?
Most user videos on YouTube get transcoded into a codec called MPEG-4 AVC. However, 4K videos will get transcoded into a newer codec called VP9. The VP9 codec can yield much better results, even during video playback at only HD settings. By uploading in 4K, you're prompting YouTube to use the VP9 codec instead of AVC.
Do videos use lossy compression?
Lossy compression is most commonly used to compress multimedia data (audio, video, and images), especially in applications such as streaming media and internet telephony. By contrast, lossless compression is typically required for text and data files, such as bank records and text articles.