MPEG4 vs. H.264
In recent months we have seen numerous companies introduce H.264 (aka MPEG4 Part 10) as the default codec in cameras, video players and other similar devices. Personally, I have been bombarded by e-mails from Chinese and Taiwanese manufacturers with large bold fonts in a red colour claiming that their cameras now support H.264. I therefore found myself asking the question what this hype is all about and decided to do my own research rather than accepting other people’s claims as de-facto standard.
H.264 video codec’s are quite complicated and for the sake of this article I shall try to keep it as simple as possible. The main advantage of H.264 over all other compression formats is that it can achieve higher quality video at similar data rates or relatively lower data rates for same quality video. This is all well and good, but the question to be asked is “by how much” and “at what cost”?!
“Graphs and calculations claiming the difference in compression are as large as 30 or 40 percent”
During my research I have seen many graphs and calculations claiming that the difference in compression and bit rate between H.264 and MPEG4 are as large as 30 or 40 percent and in some cases even 50 percent. These calculations do not list their assumptions and test criteria and therefore the only way to be certain was to conduct a bench test myself.
The Bench Test
The bench test consisted of an H.264 camera pointing towards a busy street and another H.264 in an empty office pointing towards some desks and chairs. Both cameras were connected wirelessly to an access point that is hard wired to a switch and a Netbook (Asus EEE PC 901 running Windows XP) and a Desktop PC (Core Duo 1.6GHz and 4 GB memory running Windows XP) connected to the switch with a CAT 5 cable. Both cameras are of the same make and model while Internet Explorer (running the manufacturer’s ActiveX control) was used to view the cameras. A 3rd computer was connected the network to monitor the traffic on the network, act as a gateway and provide DHCP and some other services to the network.
“The H.264 generated a large amount of frame loss and a drastic reduction in frames per second“
Accessing the cameras was quite straight forward; however the first thing that caught my eye was that the Netbook was suffering to decode the H.264 compression when viewing the camera pointing at the busy street. Processing power topped 85% usage and accessing both cameras at the same time from the Netbook generated a large amount of frame loss and a drastic reduction in frames per second. The Desktop seemed to perform very well with a stable video and healthy frame rate even when both cameras where accessed. I took some data rate readings from the gateway and proceeded to remove the H.264 cameras and replace them with Y-cam MPEG4 cameras.
“Processor usage was down to around 30% when accessing both cameras with MPEG4″
The Netbook seemed more relaxed with MPEG4 cams, and accessing both MPEG4 cameras produced no frame loss or reduction in frame rate. Processor usage was down to around 30% when accessing both cameras which is a huge improvement over the H.264 cameras. There seemed to be no difference on the Desktop. Again, data rate readings were taken from the gateway and I returned to my desk for some number crunching.
When accessing the camera pointing at the empty office there was a difference of just under 30% less bandwidth usage when viewing the H.263 camera over the MPEG4 camera. On the other hand, when viewing the camera pointing at the busy street the difference wasn’t much. The H.264 camera only managed to achieve just above 6% better data rates then the MPEG4. This translates to having enough bandwidth to add an extra camera with every 16 cameras you install which is hardly ever the case in a domestic or small business environment.
“If your computer doesn’t have spare processing capacity, then H.264 is not for you“
In conclusion, the only way to achieve a 30% higher compression is to have the camera facing a still image which defeats the purpose of having a camera in the first place. Also, if your computer doesn’t have spare processing capacity (and who’s does?!) with loads of spare processing power and a generous amount of memory, then H.264 is not for you.
Another point worth mentioning is that MPEG4 is more widely supported by multi-camera software and hardware manufacturers (NVRs) and is far more stable than H.264.
This is obviously not a definitive test, but the results and outcomes where quite plain to see during the test, and I’m sure there are benefits to using H.264, however, in my opinion the disadvantages and higher hardware costs tend to out-weigh the benefits in a practical environment. Therefore I wouldn’t recommend the switch from MPEG4 for to H.264 just for the sake of switching to a newer compression. For once, the manufacturers should shout a little less louder about this particular new technology.
Comparison by Conrad Spiteri