Quality of MPEG2 vs AVC H.264 at 50 Mbps

john-beale wrote on 2/21/2008, 3:57 PM
I recorded some high-quality video with the Red 4k camera. I downsampled the raw file to 1920x1080 still frames, did some CC in Photoshop, and exported the stills as JPEG, Quality 11. I imported into Vegas 8b. I rendered out 1080p 30 fps video as MPEG2 and also AVC (H.264) both at 50 Mbps (megabits per sec) and I played both files on my PS3 connected via HDMI to my flatpanel HDTV.

I've always assumed that H.264 is better than MPEG2 for any given bitrate, but I found the opposite here. In the regions with high detail, both files look ok, but in the background where there is a smooth gray region, the H.264 shows distinct blocky artifacts. The MPEG2 does not show these artifacts. I did have the "deblocking" filter checked for the AVC encode. Have other people found this also?

Note: I tried loading the rendered H.264 and MPEG2 versions back into Vegas and compared with the original. The largest difference seems to be that the H.264 version is clamping to 16...235 while the MPEG2 is retaining the full 0...255 of the original (not sure if that happens on import or export). In any case the blocky artifacts do not appear, so that issue may relate to the implementation of H.264 decoding in the PS3.

Comments

Spot|DSE wrote on 2/21/2008, 4:24 PM
Have other people found this also?

yes, your experience is fairly consistent with ours.
H.264 *can* be better at higher bitrates, and if you eliminate the B/P frames and...there are lots of "and/but/or."
john-beale wrote on 2/21/2008, 4:46 PM
Thanks Spot. I'd always just assumed H.264 was better all-round, so it was a surprise.

If anyone else wants to have a look, the two files in question are available at the line marked "Another clip: mpeg2 mpeg4" on this page:
http://www.bealecorner.org/red/test-080108/page2.html#Test_7

My PS3 is the only platform I have at the moment that can display these at full resolution in real time. For all I know, the test might go the other way using other hardware.
Xander wrote on 2/21/2008, 4:47 PM
Just some general experience here:

MPEG-2 is in its approx. 7th generation of codec versus H.264's approx. 2nd generation of codec. Additionally, the focus of H.264 at present has been HD and SD at low bit-rates, i.e. distribution versus contribution rates. 50 mbps would be considered a contribution rate.

When companies start implementing the higher profiles of the H.264 codec, then H.264 will be better quality at the same rates. That's probably a couple of years from now, but who knows, surprises are known to happen.
4eyes wrote on 2/21/2008, 5:14 PM
How did you set the AVC encoder in Vegas to go above 20mbs (20,000kbs).
Mine max's out at 20mbs, using m2t as source.
Did you check the true bit-rate while playing back on the PS3?
That's the "Select" button on the controller while the video is playing.
john-beale wrote on 2/22/2008, 3:19 PM
I'm using Vegas Pro 8b, export to MainConcept AVC/AAC (*.mp4) encoder, set to 50,000,000 bps (CBR). The menu options offer up to 240,000,000 bps (!)

If you use the Sony AVC (*.mp4) option then you're limited to 20 Mbps.

While playing my mp4 file, the PS3 on-screen display fluctuates between 48 and 51 Mbps. Anyway, you can download it and try it out if you want (next to "Another clip" on this page): http://www.bealecorner.org/red/test-080108/page2.html#Test_7
4eyes wrote on 2/22/2008, 8:12 PM
jbeale,
Thankyou, it was easy to adjust a new template.
Rendering a video now to test it out.

I used another program to encode to h264 and added one to many zero's.
The PS3 was stuttering on playback, I think the bit-rate was over 100MBS or so.
I just deleted the file but now curious what the max-bit-rate the PS3 can play.

Edited:
The help file says to uncheck the de-blocking filter for high bit-rates otherwise you can get artifacts.
The help files says the de-blocking filter smooths the edges between the macro-blocks when using low bit-rates. This can produce arti-facts at high bit-rates.