h.264 vs. mpeg4

I just encoded the same video clip many times using different settings, and thought I'd report my findings here.

Short summary: If space is a concern, use h.264. If space isn't a concern, use MPEG4 instead, at a higher bitrate.

Since the new iPod can play h.264 video up to 768kpbs or mpeg4 at 2500 kpbs, I tried encoding a music video (Weird Al's "All About the Pentiums", interestingly enough...) from DVD using Handbrake using the max playable-on-iPod bitrate for each encoder. In all tests I used 2-pass encoding. In particular, I was comparing one scene in the video, where you can clearly make out (or not make out, as is the case at lower bitrates) the panels on the ceiling.

The image quality of the mpeg4 is far superior due to the higher bitrate (plus much faster to encode), but the filesize was about 3x larger, as you'd expect. But I was actually quite surprised at the quality difference, since it seemed like everyone was talking about how great h.264 is and all iPod video conversion guides I saw said to use h.264. Even a 1000kbps mpeg4 looked better than 700kbps h.264.

But to be fair, I haven't actually tried any of these videos on an iPod, since I won't be getting my new iPod until tomorrow...

What are everyone else's experiences with these codecs?



PowerMac G5 Dual 1.8 Mac OS X (10.4.3)

Posted on Dec 3, 2005 11:45 PM

Reply
8 replies

Dec 4, 2005 3:56 AM in response to Mike Hildebrandt

Comparing two different codecs and two different bitrates doesn't really give you anything to judge. How do you know it was the codec and not the higher bitrate that made the difference? Try encoding with both of them at 768kbps, for example, and comparing them then.

Yes, h264 is slower to encode. It's a much more complex beast, and it's also new so it has not been as well optimized as older codecs yet. However, at the same bitrates, it has significantly outperformed pretty much everything else I've seen, in quality terms.

I like h264. I don't like the long encode time, but I can encode it while I sleep. 🙂

Where you really notice the difference is at lower bitrates. h264 works very well at bitrates below 600kbps, whereas many others look like total crap at the same bitrates.

Dec 4, 2005 6:35 AM in response to Mike Hildebrandt

1) As "Otto" pointed out, your comparisons are quantitatively flawed. The more normal procedure would be to say "for a given data rate, file size, or resoluthion one or the other codec is (or appears) better."

2) Further, if you actually maxed your data rates in any of your comparisons, chances are 50-50 that the video content may have a peak transient data rate that may prevent upload/sync to your iPod when it arrives. (I.e., it is the "peak" data rate that is most important here.)

3) When your iPod arrives, recommend you make your comparisons on the monitor (as I assume you have already done), on the iPod, and on a TV. Also, if you have not already done so, add a comparison between MPEG4 480x480 and H.264 320x240 resolutions at the same give data rate/file size.

2.0GHZ G5/533MHz G4 DeskTop/400MHz G4 PB Mac OS X (10.4.3)

Dec 4, 2005 12:51 PM in response to Mike Hildebrandt

I encode at 480 width by whatever necessary height (depending on the video size ratio) at ~760kbps mpeg4. When using H.264 at a similar bitrate at the max 320 width by whatever necessary height, mpeg4 looked a lot better (sharper, less artifacts) on the iPod screen and on my computer. And it was tons faster to encode. It's probably easier to decode on the iPod too, maybe saving battery life but I don't know for sure.

Dec 4, 2005 1:33 PM in response to Otto42

Yeah, I'm aware that it's an "apples to oranges" comparison, but I was approaching it from an "If you could only eat one small apple or one large orange, which would be better overall?" standpoint.

My point was that although at 768kbps the h.264-encoded file does look much better than a 768kbps mpeg4, you're allowed to use a much higher bitrate for mpeg4. Given the choice between a 768kbps h.264 file and 2mbps mpeg4 I'll take the higher bitrate mpeg4 anyday. I just picked up a 60 GB iPod so space usage isn't a concern at this point. 🙂 I'll post again shortly with my viewing-on-the-iPod comparisons.

Of course, it all depends on the source video as well. 2mbps would be overkill if the original video is a 500kbps mpeg... 🙂

PowerMac G5 Dual 1.8 Mac OS X (10.4.3)

Dec 4, 2005 5:37 PM in response to Mike Hildebrandt

I have a very interesting example and I defenitely like the H264 codec....

I have ripped my band of brothers DVD set, first in XVID to see on my media center pc and then in H264 to see on the ipod. I put both to the test on my TV (regular 4:3 panasonic), both look ok, with the advantage that the H264 file is smaller in size. On certain black scenes you can see some artifacts on the TV but nothing that will stop you from enjoying the movie.

Of course I also think that the new IPOD has better quality components that the previuos ones and also my previous mp3 player (zen nx from creative), therefore if you wanto to encode at a higher bit rate, the ipod will acept those files and actually reward you with a better experience.

All this is very subjective. At the end of the day, if you are happy, thats the bottom line, regardless of H264 vs MPEG4 or MP3 vs AAC (MY mp3s are encoded using lame with the alt preset extreme setting).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

h.264 vs. mpeg4

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.