What audio codec does YouTube Music use

Why converting YouTube to MP3 at 320Kbps is a waste of time

Converting Youtube videos to MP3 (or a similar audio format) is a popular way to get music and there are numerous websites dedicated to this purpose. The problem, however, is that many people looking for lossless music or CD quality music are misled by the capabilities of these converters.

If you're not a huge audiophile and don't care about things like MP3 bitrates, this article is not for you - but if you frequently use website converters to download 320 kbps MP3s from Youtube videos, keep reading find out why you are wasting your time.

What audio bitrate is YouTube streamed in?

For starters, Youtube does not play audio at 320 kbit / s even with the highest video resolution. It doesn't even come close to 320kbps. Youtube uses two types of audio formats: AAC (packed in an MP4 container) or Opus in a WebM container.

For AAC, Youtube plays a maximum audio bit rate of approx. 126 kbps. For Opus it can be between 56 kbps and 165 kbps. This is independent of the uploaded audio source format as Youtube will automatically re-encode videos to use their format. Even if you upload a video with lossless audio 24/7, Youtube will convert it to AAC at 126 kbps in an MP4 container.

Note: You can also try manually determining the bitrate of an audio file.

As soon as a video reaches a certain number of views and becomes “popular”, Youtube automatically re-encodes a WebM / Opus version of the video, the quality of which can only be slightly higher (156 versus 126 kbps). There are numerous ways to test this. However, use a free online tool called “YouTube Video Info”.

https://www.youtube.com/watch?v=_OSVhlGmUH4&t=19s

The video we'll be using is "[Lossless] Dire Straits - Money For Nothing 24-bit Sound 2K Video". This video was uploaded as MKV which was merged with a lossless FLAC file. So it should sound amazing.

Now we are running the video url from the video info tool and here is what we get (note the bitrates circled in red). A variable bitrate stream between 55 and 143 kbps.We can do this again in VLC and check the codec while streaming the video.

Audio source is important, but not by much

Despite its bit rate, the video sounded really good. Where from?

It had great source material, a lossless format from a master studio track. Of course, it will sound better than most videos that use horribly compressed MP3s as an audio source. Even if it isn't delivered to you in a lossless format, it still sounds better than the average music video on Youtube. But make no mistake about YouTube compressing the original audio source.

Now that we know that YouTube compresses audio to 128-156 Kbps, you might be wondering what it is possible to convert YouTube videos to 320 Kbps MP3 for, for example on websites that offer "high quality MP3 rips" from Offer YouTube.

That does not exist.

If you convert a YouTube video to MP3 at 320Kbps, the audio quality will be degraded. The conversion site rips the audio from YouTube in their AAC / MP4 container and then re-converts it to a 320kbps MP3 file.Every time you convert an audio file from one format to another, it is re-compressed. By "upsampling" a 128 kbps source to a 320 kbps MP3 file, you're just adding a bunch of useless data to the file, with useless background noise.

Think of it this way - you have some old VHS tapes lying around. You copy them to your computer and burn them to DVD. Do they magically become DVD quality videos? For example, suppose you have a 500 × 500 image file and you change the size to 5000 × 5000. Although the file size increases, the image itself becomes blurry, doesn't it?

This is essentially the case when you're “converting” a YouTube video to a higher bit rate. If you want to convert YouTube videos to audio files without degrading the audio quality, you'd better convert to a lossless format like WAV or FLAC. At least that way, the original YouTube video won't be compressed during re-encoding.