Video: Fulfilling the Promise of H.264

June 19, 2012
H.264 video compression seems here to stay, and there are tips to its practical deployment

H.264 is a buzzword throughout the industry. Since the first version of the H.264/MPEG-4 Part 10 compression standard was released in 2003, there have been multiple revisions, improvements and enhancements that have made the technology attractive for use by both consumer and professional video manufacturers. H.264 compression has greatly improved picture quality while also dramatically reducing the amount of data required to produce high-definition (HD) video coding. These are proven benefits that have impacted the larger market for broadcast/commercial video before migrating to the security video market. These capabilities justify much of the hype, but there are also several practical facets to be considered related to H.264.

Be wary of using H.264 with Windows-based video management software. The Microsoft standard file systems are not suitable for large sequential files needed to store H.264 streaming security video. Windows operating systems are designed for general file use. Microsoft's FAT32 and NTFS standard file systems are suitable for JPEG file storage since each file is relatively small, and modern hard disk drives (HDD) can skip from one small file to another quickly. However, storage for H.264 streaming files requires continuous, not fragmented, files that are laid out sequentially on the HDD for the fastest writing and retrieval. In a Windows system, over time, more files are broken up because of how the file system operates and fragmented files are not conducive to fast writing and retrieval of video. File fragmentation may cause these systems to degrade over time and lower performance. The situation may require a dealer/integrator to make an expensive trip to a customer's site to “defrag” the system, which involves shutting down other functions during the process.

An alternative is to use a non-Windows-based network video recorder (NVR) appliance in which video files sizes are of appropriate length (about five to 15 minutes) and laid out on a storage system in an efficient manner. In this case, expensive fast hard drive write technologies such as the new 15,000 RPM disk drives are not needed. Standard SATA/3-gigabit-per-second HDDs at 7,200 RPM are sufficient in a properly designed recording system. Although the price of solid state HDD is coming down, there is still a large cost-per-gigabyte difference between solid state HDD and SATA. In H.264 applications especially, users may benefit from a video recording appliance (rather than a PC) that uses a flat sequential type of file system. Another alternative is a video management software application that runs under Windows but uses a specially formatted partition or HDD for video storage.

Not all H.264 files are alike. Security video solutions differ regarding how they implement H.264. Various compression profiles are built into the specification and different profiles are used for various applications. Each one has its pros and cons. The H.264 baseline profile is intended for small portable devices, such as portable video games, that have limited CPU devices and memory sources to decode the video. H.264 baseline profile is also used in video conferencing applications. As the name implies, baseline profile is considered a minimum quality specification. Many security recording solutions will either re-encode the video to H.264 baseline profile or record in the camera's native H.264 baseline profile.

Others cameras and recording devices use H.264 high profile, which goes beyond the minimum standard to provide a higher level of compression (and smaller video streams) while maintaining high-quality HD video. This is the profile used by Blu-ray storage devices and broadcast HDTV. However, high-profile H.264 requires a more powerful computer chip inside the camera and more CPU power on the decoding side, too.

Within the H.264 standard, there are many methods of compressing, transmitting, and validating the data, so H.264 video compression is not always recognizable by every H.264 engine. You may or may not be able to play a given H.264 video file with a given H.264 video player. Therefore, an H.264 video stream from one supplier's camera might not be compatible with another supplier's recorder, although sometimes only minor tweaking or a slight modification can fix the compatibility issue.

Match compression to the application. H.264 is designed for and used in applications that require streaming HD video quality at resolutions up to 1080p. H.264 takes up less bandwidth and storage, especially at the real-time frame rates (30 fps) most customers want. However, because of how the compression format does its job, not every “frame” is a complete picture. Instead, full frames (I-frames) alternate with frames that contain partial information (P-frames and B-frames), thus taking advantage of the redundancy between neighboring frames to achieve higher compression rates.

However, in MJPEG recordings, each frame is a complete picture, which can be useful in situations where the camera is farther away and/or more detail is needed. But at 30 fps, MJPEG creates too much data to be practical in many applications. For higher megapixel camera recording (greater than 3 megapixels), MJPEG is used at lower (less than 30 fps) frame rates to compensate for the larger file sizes and resolution. MJPEG is better suited for high-quality, frame-by-frame stepping since each frame is a complete picture.

To freeze an H.264 picture for viewing or forensic use, many security video applications would either have to jump to the next I-frame, which contains a full picture's worth of information, to build a complete picture from several frames of video, or to convert the on-screen display to a JPEG picture. If encoded in MJPEG, on the other hand, any individual frame can be obtained without data or picture loss due to conversion.

End user drives the bus

End-user demands for real-time recording and HD image quality are driving adoption of H.264 for viewing and recording applications. To address a variety of system requirements, cameras provide multiple streams that can enable simultaneous H.264 viewing at 30 fps and MJPEG recording at a lower frame rate for forensic investigations.

Understanding all aspects of implementing H.264 is critical as the industry continues to make the transition. Importantly, nothing on the horizon appears poised to take the place of H.264, so it's here to stay, and its impact on the industry will continue to be felt. The market's demand for HD images and real-time frame rates plays to the strengths of H.264 to provide superior resolution with smaller video file sizes that lower a system's bandwidth and storage requirements.