videoyoutubevideo-streamingcodecbitrate

Manually Calculate Youtube Video Bitrate


I'm newbie to video processing world. My goal is to understand how YouTube posts 2,250-6,000 Kbps video bitrate for 720p @ 60fps video at https://support.google.com/youtube/answer/2853702?hl=en. I'm ignoring audio at the moment.

Here's my understanding:

Final Video Bitrate for 3x8bit* color depth = (Horizontal Length in pixels x Vertical Length in pixels) x (Frame rate in fps) x (3 * 8 bits encoding) x (Compression)

Therefore,

Final Video Bitrate for 1280x720p 60fps = (1280 * 720) x (60) x (24) x (compression factor)
= (921600) x (60) x (24) x (compression factor)
= 1.327Gbps x (compression factor)

Now, above result is same as what ToolStud.io** has. However, YouTube says that 720p60fps has maximum bitrate range of 6Mbps here. YouTube uses VP9 codec. I found this using debug info on YouTube video.

Question: If above calculation is correct, then the compression factor is about 216 1.3e9/6e6=216.66. Is that even possible? I think I'm missing something.

Can someone please guide me? I've spent about 2 hours on stackoverflow and found a few links (How to correctly estimate mp4 H.264 video size?, calculate bitrate from video video etc.), and I couldn't find any good explanation on this. Their focus is more on the size of the file rather than the video bit rate.

Thanks for your help.


*It seems YouTube recommends 3x8 bit = 24 bit color depth at https://support.google.com/youtube/answer/6039860?hl=en

**ToolStud.io provides a tool to compute uncompressed video bit rate.


Solution

  • Yes, your numbers are correct. except the video is probably YUV420p, hence 12 bits per pixel. And yes this compression is very possible. Youtube is not doing anything special. You can set a bitrate of 2.5Mbps - 6Mbps with a tool like ffmpeg