Why MPEG2 is not as bad as you may think…

Many thinks that MPEG2 is necessarily a bad codec to use, in particular for HD video – because is old, and there are more sophisticated new video codecs around; well, even if AVC (and VC-1, too) is better – a lot, indeed – this “ancient” codec is quite good.

With this, I don’t encourage anyone to compress video using MPEG2 instead AVC, at the contrary; but, when you encounter an MPEG2 hi-def source – like HDTV or D-VHS – please don’t discard it immediately!

following this table, if an AVC file size is set to 100%, a comparable quality MPEG2 video should have a file size of about 224%, right?

Ain’t that cute? BUT IS WRONG!

PSNR should be used to make comparisons between different encoders or quality settings, but with the same codec, not between different codecs…

Infact, MPEG2 (as AVC and all modern video codecs) takes in account the human vision, and works “tricking” the brain (through the eye).

So, if we have two similar images in perceived quality, PSNR could be a totally wrong method to calculate it… SSIM is a better method!

Example:

Quality: 90, PSNR: 43.06 dB, SSIM: 0.9863, Size: 24308 bytes

Quality: 100, PSNR: 58.44 dB, SSIM: 0.9993, Size: 94169 bytes

As you can see, images are really close in quality, right? But, according to PSNR, the first has only 3/4th quality of the second, while using only our eyes, we should disagree, as we think quality is really close…

Conclusion: even if an MPEG2 source has a lower bitrate in comparison to the same (or comparable) AVC one, it should not (necessarily) means that the MPEG2 has a bad quality! Indeed, sometimes it is surprisingly good, if the bitrate used is adequate – and many HDTV and D-VHS files proves this! So, encoding bitrates and codecs used are only parts of the quality equation, along with master used, encoder type, quality settings etc… and, last but not least, our expectations!

***   ***   ***   ***   ***

Personal thought: as in the late years almost all BD releases are AVC (and, in minor part, VC-1), and MPEG2 is almost abandoned, I think many, if not all, standalone BD players have a superior AVC (VC-1) decoder in comparison to MPEG2; so, maybe the one used, probably in a single chip with AVC, it’s an ancient one with lower quality in comparison to newest ones found in e.g. HDTV receivers; also, ffdshow (libavcodec) is considered by many the best MPEG2 decoder and I think is not available in standalone BD players.

So, decoding an MPEG2 source (BD, HDTV, D-VHS etc) with libavcodec, and encode it to AVC (at higher bitrate) using X264 (probably the best AVC encoder), and authoring this to a BD-R, *should* improve a bit the quality, instead of using the MPEG2 file “as is” (if it’s BD compliant, of course) authored to BD-R…

Can someone confirm/confute this?

***   ***   ***   ***   ***

Resources:

Video quality characterization techniques

MPEG2 decoders comparison (PDF)

Restoration tips: Kush Gauge™

Leave a Reply

Your email will not be published. Name and Email fields are required.