Decoding the Digital Picture

By Laura Spadanuta


When the average security director thinks about the components of a surveillance system, the encoder (often located in another piece, such as the DVR or camera) may not come to mind, but it is an integral piece of any system. One of the most important jobs of the encoder is compression. Compression is often categorized as spatial and temporal. Spatial compression is when software looks for similarities within a single frame. For example, in a photo of a tree against a blue sky, the software will “compress” the similar areas, such as the sky, by recording a shorter description of it, rather than describing each similar blue pixel.

The temporal option encodes only the changes from one frame to the next, as most frames are similar. Temporal CCTV options appeared most popular among those interviewed for this article.

Within the temporal sphere, the favored compression option is MPEG-4, Part 2, which is an improvement over an earlier temporal incarnation, MPEG-2. Where MPEG-2 would yield 6 megabit per second (mps) streams, MPEG-4, Part 2 gives a 50 percent improvement at 3 mps, with full bandwidth and resolution. (Note: mps is a measure of space being used up on the network per second, not a speed, so streams at 3 mps take up half as much bandwidth as those at 6 mps.) Therefore, MPEG-4, Part 2 cuts down on bandwidth needs, says Chip Howes, CEO of Steelbox Networks Inc.

A newer, but still not widely adopted, temporal standard is H.264 (also known as MPEG-4, Part 10), which is designed to be 50 percent more efficient than its predecessor MPEG-4, Part 2, according to Banerjee.

With H.264, “I can get the same quality video at half the bit rate, or, I can get double the quality at the same bit rate,” explains Barry Keepence, CTO of IndigoVision. Keepence adds that this compression standard also doubles the storage capacity, essentially doubling the time it will take to fill a storage medium of a certain capacity. This means that if a system recorded 30 days worth of video before, it can now hold 60 days.

So if it’s that great, why isn’t everyone rushing to install it? As with much cutting edge technology, cost is an issue. In this case, the problem is that companies would need to invest in more powerful—and thus more costly—cameras and PCs to run it.

“It takes a lot more computing power to do H.264 than it does to do the original MPEG-4. And I think most of the industry is just struggling to find the horsepower,” Keepence says. He estimates that cameras and encoders would need four times the processing power to run H.264 than to run other codecs (the industry terms for technology that encodes and decodes data), which adds to the cost. But some companies may find that the bandwidth and storage savings justify the extra cost of the additional processing power.

Keepence’s company spent millions developing its own hardware (rather than software) that uses a large amount of parallel processing to get the necessary bandwidth to do H.264. “But now we have it, we’ll have it forever,” Keepence says. That is, of course, until the next best standard comes along.

In addition to front end processing power, Banerjee says a problem with H.264 is that most PCs are too weak to run it for surveillance video. Keepence estimates that the PC would need 10 percent more power to run H.264 surveillance than another codec. Banerjee says it’s a “no-brainer” that once the PCs powerful enough to run H.264 come down in price, H.264 will become the CCTV standard. For now, however, Bosch, for example, sells mainly MPEG-2 and MPEG-4 Part 2 encoders.

On the spatial side, one compression option is a wavelet. The wavelet allows the compressed picture to become “fuzzy,” rather than “blocky” as occurs under the MPEG standard, according to Banerjee. This fuzziness creates a more pleasing picture under high compression.

 However, while wavelets use a low amount of processing power to encode and view on a PC, they consume high bandwidth. Additionally, it should be pointed out that wavelets are not standards-based but are proprietary, meaning that they will likely not be interoperable among vendors. This might make it impossible to mix and match equipment during integration and might explain why wavelets are not more popular.

Individual frames can also be compressed using JPEG, which compresses the frame, and MJPEG, which are JPEG shots filed together.  JPEG 2000 is a type of JPEG compression used in CCTV. Banerjee says that at lower frame rates, JPEG consumes the same bandwidth as MPEG options, but at higher frame rates, the consumption increases compared to MPEG.

Howes is a proponent of JPEG 2000, because it offers low latency, which is the lag time between what the camera sees and when you view it remotely. Howes explains that with JPEG you are receiving every single frame or picture, not just the changes between pictures, which can contribute to latency in MPEG and other types of compression. 

Additionally, JPEG 2000 can provide multiple resolution streams. Therefore, you can look at the video in either full or partial resolution. Howes adds that JPEG is cheaper than MPEG and H.264 because it requires less processing power.

Howes’ company offers a router-type box (digital matrix storage switch, or DMSS) that works particularly well with JPEG compressed data, and he admits that “if you don’t have a box like the DMSS then [JPEG] is not going to be as beneficial,” because it does take up more bandwidth on a normal system.

Whatever the compression choice, the system’s performance should be tested out in person, says Keepence. “H.264 doesn’t mean you’re buying a good product. MPEG-4 doesn’t mean it’s a good product. All it means is it meets some standard,” Keepence says. “It’s the implementation of the standard that makes the difference.”

 Frame Rates

As much as cameras have evolved, the concept of frame rate hasn’t changed. Frame rate is the number of frames recorded or displayed per second, and it’s one of the critical issues that must be considered. A lower frame rate will ease bandwidth demands and reduce storage needs, but it will also reduce the video quality. How much that matters may depend on the video’s intended use.

Broadcast quality frame rate is 30 frames per second. In CCTV, frame rates can be decreased per camera to allow a network to handle the feeds from more cameras within the limited bandwidth, says Roy Bordes, president and CEO of Bordes Group, Inc.

For many applications, it would be okay to go as low as 7.5 frames per second, but if you are using software to do certain analytics on the video, you’ll want to record in higher frame rates so that the algorithms will have more to work with, says Wilson. It’s also important to note that the compression rate and the frame rate together affect the total data loss per image.

It’s possible to set different frame rates and different compression standards for times of day or specific locations or certain conditions, such as when an alarm goes off.

Many companies are now offering load balancing in their products, and that includes frame-rate reduction. For example, the cameras/encoders may be transmitting a low frame rate for general surveillance but when an event occurs or something changes in a scene, that rate might bump up to 30 fps.



The Magazine — Past Issues


Beyond Print

SM Online

See all the latest links and resources that supplement the current issue of Security Management magazine.