We all know there is no "silver bullet" when it comes to technology. If a compression algorithm uses less storage or processing it has to compromise in other areas, and experts who understand those tradeoffs learn to design around them. (Since we manufacture cameras, I can tell you that in the case of our IQeye cameras, the cameras have a significant amount of on-camera processing power, which has allowed the company to choose the higher performance main profile for H.264 encoding, which provides higher video quality for the same bandwidth compared to the baseline profile.)
9 Considerations for Choosing Compression
In order to help determine what compression is right for you, we have developed a list of nine considerations that relate to either the User Requirement or the Video Environment. In this article we will cover the first two; the other seven will be addressed in two subsequent articles that will appear on SecurityInfoWatch.com and IPSecurityWatch.com.
1. RESOLUTION [User Requirement]. Do you need consistent, high quality video? If the best video quality -- that is, forensic or high detail -- is paramount, then MJPEG is the right choice since video quality will be constant in most scenes. If you are considering H.264 to accomplish the best video quality, it does allow you to select constant bit rate (CBR) or variable bit rate (VBR) to attempt to achieve this purpose. CBR is essentially a bandwidth throttle and when used, H.264 will sacrifice image quality to limit bandwidth. I recommend always utilizing VBR for security surveillance applications otherwise you could turn high quality video into blurry, block images, especially with higher resolution HD/megapixel cameras. With H.264 compression, as resolution increases, image quality can vary substantially. The same holds true for bandwidth variations, so make sure your network designers account for the worst case scenarios like challenging scenes where bandwidth will increase dramatically.
2. FRAME RATE [User Requirement]. What frame rate do you need? This is a very important consideration as the wrong answer can result in a lot of unnecessary expense. In the past, many project specifications were based on the camera's ability, not the customer's needs. Today, more customers are asking, "If I have an incident, what do I want to see?" Let's say a customer wants good images of a person walking down a street and based on the camera and lens they have, the person will be in the field of view for 10 seconds. Recording at 30 fps results in 300 images of that person. Whether that is enough or too little depends on the customer. Predicting bandwidth and storage as frame rate varies with MJPEG is quite simple as the relationship between the two is straightforward. There are many calculators that can help with this; most simply multiply the average file size by the number of frames. With H.264 it is much more complex and somewhat counter-intuitive. Since H.264 has to interpret the changes between key frames, it is more efficient at higher frame rates because there is less change from frame to frame, so the camera works more efficiently. The converse is that at lower frame rates with active scenes, there is more change between key frames that will require more bandwidth and storage to process and, more importantly, will degrade image quality. While image degradation will vary depending on how a manufacturer has implemented their version of H.264, a basic rule of thumb is that H.264 may be appropriate for applications that require 15 fps or higher depending on other user requirement and camera environment considerations.
In closing, here are some other important rules of thumb for the first two decision considerations discussed in this article:
- Select H.264 when your requirements dictate that saving bandwidth is more important than consistent image quality or predictability in bandwidth or storage needs.
- Select H.264 when your requirements are to record at 15 fps or higher and other Requirement and Environment considerations also support that choice.
- Select MJPEG when you need very high quality images with consistent and predictable bandwidth and storage
Look for a discussion of the following compression considerations in future articles as well as recommendations based on such considerations for what compression methodology is best for your application:
3. WEATHER [Environment]
4. LIGHTING [Environment]
5. SCENE MOTION [Environment]
6. OBJECT SPEED [Environment]
7. CAMERA MOTION [Environment]
8. RECORDING [Requirement]
9. LIVE VIEWING [Requirement]