Understanding MPEG Bitrate

Discuss anything about video editing, HD, codecs, etc......
Post Reply
vmpoulsen
Posts: 13
Joined: Thu Nov 03, 2005 7:32 pm

Understanding MPEG Bitrate

Post by vmpoulsen »

I've been trying to understand bitrate as it relates to MPEG video. I know I can set the bitrate in hardware and in software MPEG-2 encoders, and I know that increasing the bitrate balloons the resulting file size, but I haven't had a good feel for what it all means; so I did a little math.

Bitrate = [(720x480)pixels/frame] x [24bits(color)/pixel] x [30frames/sec] = 248.8Mbits/sec

But no single 720x480 frame can contain the 16 million colors provided by 24 bits. At most, such a frame can contain 720x480 = 345,600 colors which can be provided by 18 bits. But, in practical terms, frame color content will be much less than this and will vary with time. Nevertheless (and to keep things simple)...

Bitrate = [(720x480)pixels/frame] x [18bits(color)/pixel] x [30frames/sec] = 186.6Mbits/sec

Obviously 186.6Mbps is WAY beyond the ~4Mbps used in (non-HD) cable broadcasts and the 8Mbps used in commercial DVD movies! I have to assume that video compression accounts for the difference. As I understand it...

Spatial compression: Quantizes color to reduce frame size (as in a JPEG).
Temporal compression: Removes duplicate data in adjacent frames.

This results in compression ratios of 24:1 (for 8Mbps) and 47:1 (for 4 Mbps). If my thought process and math are correct here, tweaking the bitrate for MPEG-2 encoding tunes the compression in both space and time and is akin to setting the compression ratio when saving a JPEG file. Am I on the right track? Any comments or additional information?
sjj1805
Posts: 14383
Joined: Wed Jan 26, 2005 7:20 am
operating_system: Windows XP Pro
System_Drive: C
32bit or 64bit: 32 Bit
motherboard: Equium P200-178
processor: Intel Pentium Dual-Core Processor T2080
ram: 2 GB
Video Card: Intel 945 Express
sound_card: Intel GMA 950
Hard_Drive_Capacity: 1160 GB
Location: Birmingham UK

Post by sjj1805 »

WOW I've never seen anyone do the maths on this before but
yes....

An MPEG put simply is a long set of JPEGs played one after the other rather like those cartoon flick books we used to make at school.

There is a bit more to it and you have to look at I-frames B-Frames and P-Frames (GOP sequence)
There is an interesting article about GOP sequences by Terry Stetler here:
http://phpbb.ulead.com.tw/EN/viewtopic.php?t=10880

You have overlooked that no frame will ever contain 16 million colours, it is simply that a frame can contain colours from that range. If you reduced the choice from 24 bit to 18 bit you reduce the choice of colours available.
For a quick and simple (extreme) demonstration just change your computer monitors resolution from true colour to 256 colour and see what happens!

Steve J
Post Reply