Key considerations when selecting a video compression algorithm: Part 2

A comparison between H.264, MJPEG and other common compression schemes for surveillance video


There are two characteristics of lighting that need to be considered when selecting a video compression algorithm; the first is the amount of change in light over time. For static lighting scenes, H.264 can offer excellent efficiencies over MJPEG with minimal image degradation. Scenes where the light is changing, like outdoor scenes, can present some challenges for H.264. Similar to rain and snow, changing light -- whether headlights in the field of view or clouds passing in front of the sun -- can represent large frame-to-frame scene changes. H.264 cameras will respond to this by increasing the bandwidth, in some cases exponentially, and all but the highest broadcast quality HDTV cameras like those found in professional sports will degrade the image quality noticeably.

The other characteristic of lighting that will have an impact is low light. When lighting decreases, cameras have to amplify signals to try and reproduce the image. Anytime you amplify a signal, you introduce noise. For those of you old enough to remember TV before cable, weak TV signals meant a lot of noise or "snow". Today it is no different. While more mature companies are very effective at reducing low-light noise in the camera, at some point it will happen and when this occurs, it behaves exactly like real snow.

Overall, a temporal compression scheme such as H.264 will serve to compound the problems associated with video degradation and bandwidth increases in low-light environments. MJPEG compression can also produce slight increases in bandwidth as it tries to compress video with this additional overall noise but the variability will be much less pronounced. Some of the negative impacts seen in lower-light conditions with H.264 encoding can be mitigated by specifying a day/night camera (one with a removable IR cut filter) rather than a standard camera. Negative impacts may also be reduced by decreasing the sharpness setting of the camera, although this will also make the overall video less crisp during regular lighting conditions.

5. Scene Motion [Video Environment]

Scene motion, or the amount of motion within the field of view, is one of the most important elements to take into account when selecting a video compression algorithm. H.264 and MPEG-4 are what called temporal compression schemes. If you remember your Star Trek episodes, you will recall that the term temporal refers to time. With H.264 compression, the more things change over time, (i.e. motion in the field of view) the more difficult it is to compress the video while maintaining high quality and minimizing bandwidth and storage.

For frame-based compression like MJPEG, scene motion will not impact image quality, bandwidth, or storage. With H.264, scene motion such as trees blowing in the wind can have a dramatic impact on bandwidth and storage requirements. Having to factor in the frequency of windy days for your bandwidth and storage requirements is very difficult and typically inaccurate.

Like wind, vehicle and pedestrian traffic will have a similar impact on compression. Consider a camera system installed in a school's hallways. During class there is virtually no motion, which would be ideal for H.264 compression. However, if an emergency situation such as a fire alarm occurs, the hallways are suddenly filled with rapidly moving students resulting in nearly 100 percent scene motion which causes large spikes in network bandwidth and storage. If the network wasn't designed with these incidents in mind, then these large bandwidth spikes can cause network data losses which can translate into corrupted video. This is not something you want to try to explain to your customer. Since scene motion can impact the overall image quality of the video, we recommend utilizing H.264 compression for camera installations where no more than 20 percent of the field of view will contain motion at any given point in time.

6. Object Speed [Video Environment]

The faster objects are moving through the field of view, the more distance they cover between frames. The more distance they cover, the more changes you have between frames. The more changes you have between frames, the more a temporal encoding scheme (H.264/MPEG-4) must estimate where the objects are moving to. Fast moving objects have negative impact on bandwidth, storage, and video quality when using temporal compression. The pain is compounded at lower frame rates (there are more changes between key frames) and lower performance H.264 profiles (see article 1).