Using StreamPix with WDM based compression codecs and analog, digital or IEEE cameras.
Cineform Codec: Real-time video compression with no degradation of quality
Application Note:
When streaming direct to disk with StreamPix, it may be useful in some cases to use compression codecs in order to save disk space or bandwidth. StreamPix can stream images from any supported cameras directly to disk using its own file format in a high-quality uncompressed mode.
An additional feature of Streampix is the ability to use commercially available compression codecs to compress images as they are captured and then transferred to the computer hard disk. The clear advantage of using codecs is the amount of disk space saved. The main disadvantage is the lower quality of the final images saved.
Various off-the-shelf codecs are available. Some of them work only with color images and others with monochrome images.
This table summarizes the codecs we have tested and recommend for IEEE cameras.
| Tested Codec | Resolution | Quality |
|---|---|---|
| DivX 6.5.1 | 640x480 x 8,24,32 bits | good |
| Xvid | 640x480 x 8,24,32 bits | recommended |
| 800x600 x 8,24,32 bits | ||
| 1024x768 x 8,24,32 bits | ||
| 1280x1024 x 8,24,32 bits | ||
| 3ivx D4 4.5.1 Video codec | 640x480 x 8,24,32 bits | good |
| 800x600 x 8,24,32 bits | ||
| 1024x768 x 8,24,32 bits | ||
| 1280x1024 x 8,24,32 bits | ||
| Cinepak codec by Radius | 640x480 x 8,24,32 bits | good |
| 800x600 x 8,24,32 bits | ||
| 1024x768 x 8,24,32 bits | ||
| 1280x1024 x 8,24,32 bits | ||
| Intel Indeo(R) Video R3.2 | 640x480 x 8,24,32 bits | poor quality |
| 400x400 x 8, 24 bits | ||
| Intel IYUV codec | 640x480 x 8,24,32 bits | low compression ratio |
| Microsoft Video 1 | 640x480 x 8,24,32 bits | low compression ratio |
| 800x600 x 8,24,32 bits | ||
| 1024x768 x 8,24,32 bits | ||
| 1280x1024 x 8,24,32 bits | ||
| Lead MPEG 4 encoder | 640x480 x 8,24,32 bits | good |
| 800x600 x 8,24,32 bits | ||
| 1024x768 x 8,24,32 bits | ||
| 1280x1024 x 8,24,32 bits | ||
| Lead MCMP/MJPEG codec | 640x480 x 8,24,32 bits | good real time compression |
| 800x600 x 8,24,32 bits | ||
| 1024x768 x 8,24,32 bits | ||
| 1280x1024 x 8,24,32 bits | ||
| Lead MJPEG2000 codec | 640x480 x 8,24,32 bits | low compression ratio |
| 800x600 x 8,24,32 bits | ||
| 1024x768 x 8,24,32 bits | ||
| 1280x1024 x 8,24,32 bits | ||
| JPEG Intel library | 640x480 x 8,24,32 bits | good |
| 800x600 x 8,24,32 bits | ||
| 1024x768 x 8,24,32 bits | ||
| 1280x1024 x 8,24,32 bits |
Notes
When using codecs, it must be remembered that compressing images as they are captured will lower the quality of the final image saved. Compression codecs vary in terms of quality versus compression ratio. The higher the compression ratio, the lower the quality of the final image captured and vice-versa.
Performance of the codec depends on the type of camera used. A high frame rate/resolution camera will require a faster CPU in order to save all the images.
Code Benchmark Test Using Streampix
Test data: Recorded 15 seconds, 1280 * 1024 pixels, at 10 frames per second, approximately 150 frames. Monochrome is 8 bit per pixel. Color is 24 bit per pixel.
| Codec Name | File Size (MB) | Number of Frames Recording | CPU Usage With Image Display | CPU Usage With No Image Display | ||||
|---|---|---|---|---|---|---|---|---|
| Mono | Color | Mono | Color | Mono | Color* | Mono | Color* | |
| Regular Streampix Seq. File | 187 | 401.4 | 150 | 150 | 19% | 30% | 10% | 18% |
| Full Frame AVI Uncompressed | 181 | 149 | 25% | 32% | 12% | 20% | ||
| Microsoft RLE | 83.1 | 0 | 150 | 0 | 32% | 0% | 22% | 0% |
| Morgan MJPEG www.morgan-multimedia.com | 0 | 19.8 | 0 | 156 | 0% | 49% | 0% | 35% |
| DIVX 4.1.1 www.divx.com/divx | 0 | 1.22 | 0 | 129 | 0% | 68% | 0% | 49% |
* Processing bayer convertion while acquiring RGB
Notes:
- If the resulting AVI file size is zero, the codec failed to process the acquired signal.
- All Codec settings are set to default.
- When the number of recorded frames is lower than 150, it indicates that the codec cannot be used for real-time recording as some frames will be dropped. It is too demanding for the CPU. It is always possible to export the seq file to those AVI formats later.
- Compression ratio can easily be calculated from the AVI file size, number of frames and the sequence file size.
- CPU usage on a DUAL CPU machine is an average between the 2 CPUs. Also, some codecs are not multi-thread, so running on a dual CPU machine will not help.
In conclusion, StreamPix not only allows the capture of uncompressed images - using its own file format - but can also use any VFW-based codecs. However, most codecs aren’t made to support non-standard image format such as those used by some cameras. The codecs shown in the table above provide, in our opinion the best performance and quality. Codecs can save disk space but have a drawback in lower image quality and/or higher CPU consumption.
For further questions, please contact NorPix Inc. at