Why H.264 is just pure awesome
Posted by: Scott Olsen
on Apr 07, 2009
It's absolutely no secret that computing power is getting exponentially more powerful (and inexpensive) every passing week. However, it is also getting smaller, less power hungry, and more ubiquitous. Combine these things together and it's no wonder people are finding novel and niche ways to use this additional computing power for specific embedded tasks.
For instance... cameras. Specifically, security cameras. To many people, increasing processing horsepower in an IP camera doesn't immediately make much sense. That is, unless you have some insight into the actual process that takes place within a network enabled camera. Basically, the camera acquires a digital image (frame) of a given resolution and then encodes it, via a video codec into a stream of data that is then passed via TCP/IP over the network to one or more destinations.
The part where the camera encodes up the digital image(s) is where things get interesting. The power now available to embedded devices, the lower component cost, and the advances in compression technology allow endpoints like cameras to employ much more advanced video encoding algorithms. The one I'm currently excited about is typically known as H.264. First off, if you already know what H.264 is, you probably already know why it's awesome and the benefits I'm preparing to rave about. However if this bit of alphabet soup is completely alien, fear not, as I'll attempt to break it down for you.
H.264 is a standardized video codec. It's also known by a few other names as well (MPEG-4 AVC and MPEG-4 Part 10), albeit not as popular. While the drafting work on the standard itself was completed in early 2003, it's just recently been gaining traction and momentum with respect to widespread adoption and use. I personally believe this is because the computing power (and associated cost) is now at the level where a codec such as H.264 can be employed in situations where required processing power and cost would previously have prohibited it. For instance, that new Blu-Ray movie you're planning to watch... guess what that's probably encoded in? Yup, H.264.
While there are many uses of the standard that I could go on about, the area that interests me the most is in its use as an encoding standard for Video Surveillance. There are two major reasons for this:
1. Storage
2. Bandwidth
Storage wise, H.264 can produce video streams of comparable quality that are 2 to 5 times less than that of an MPEG-4 (generally considered MPEG-4 part 2 Advanced Simple Profile. Think Divx, Xvid, etc...) or the more traditional Motion JPEG, MJPEG. It is able to accomplish this by spending more computational effort at the device (camera) to deliver a smaller amount of compressed data for storage. When we are talking large numbers of video streams, you can see why this provides a huge benefit. Given a fixed amount of storage, you can effectively store more than twice the historical video. Or, from another perspective, twice as many camera feeds!
Now, if there is one technology commodity that has put Moore's famous law to shame, it's that of commercially available digital storage. I remember not too long ago (ok... well a decade) when a 10GB HD was $400. You can now easily purchase 2 or more terabytes for that price. Yes, mass storage is getting cheaper and cheaper by the day, but it still plays a big part when planning for weeks (if not months) of multiple feed recording.
However, there is one commodity that isn't necessarily following suit quite as fast. That, my friends, is WAN bandwidth. Typically, cameras of the digital variety that streamed data (think webcams) were direct attached devices that had a (relatively) high bandwidth connection to the viewing computer or recording device. The transport wasn't really a concern. Any compression of the video feed was performed after reaching its destination. This is where having the edge device carry the computational burden of performing H.264 compression provides an additional (and often overlooked) benefit. The video stream is heavily compressed prior to leaving the device itself. The same ratio described above for storage also comes into play here. Traffic loads can be reduced anywhere from 2 to 5 times what they would otherwise be. Depending on the WAN/MAN infrastructure, that can make or break the possibility of streaming the video data back to a central source.
I can't wait to see more and more cameras (and other video equipment) providing this as a codec option. The benefits are undeniable, and any reluctance due to associated computing costs is fading at, of course, an ever increasing rate...




