AVI Codec Support with AVI2 in NI Vision Products

Publish Date: Feb 26, 2013 | 3 Ratings | 2.67 out of 5 | Print | Submit your review

Overview

This document describes the changes to AVI codec support in NI Vision starting with Vision Development Module 2012 SP1 and Vision Acquisition Software February 2013. In general, users can build and read AVI video files through NI Vision. The changes to AVI implementation in NI Vision provide improved 64-bit functionality, support for more codecs, and RT target compatibility. The functions and VIs that represent this change are labeled as "AVI2" to differentiate them from the old AVI implementation.

Table of Contents

  1. Overview of AVI Codec Support in NI Vision Products
  2. AVI2 Features and Changes
  3. New Terminology and Location of Old Functions
  4. How to Use the AVI Functions in LabVIEW
  5. Related Links

1. Overview of AVI Codec Support in NI Vision Products

AVI (Audio Video Interleave) is a widely-used multimedia container format commonly used to package videos. With AVI, video data can be encoded or decoded with any number of codecs. These codecs translate the video data to compress it and optimize it for certain uses. The user who builds the AVI file can choose which codec to apply depending on what the intended use of the video is. Through NI Vision products, a user is able to create and read AVI files, and that functionality has been expanded to support more codecs and more devices. As a result of this new implementation, the functions and VIs for AVI have been renamed. They are now labeled "AVI2" to distinguish from older AVI functions and VIs.

NI's AVI2 implementation recognizes codecs instead of filters. On Windows the user now has access to any codec on the system that is compatible with Microsoft's Video Compression Manager. In addition, previously many codecs could not be used on Windows 64-bit machines. Because the AVI2 implementation uses Microsoft's Video Compression Manager, many of these codecs are now accessible on Windows 64-bit machines. Finally, on both Windows machines and compatible Real-Time (RT) targets, NI provides the following four codecs: FF Video Codec 1, Motion JPEG, Y800 Uncompressed, and YUV 4:2:0 Planar. The guaranteed presence of these codecs allows for portability of AVI files built from AVI2 functions.

AVI2 is installed starting with Vision Development Module 2012 SP1 and Vision Acquisition Software February 2013. An overview of Vision Development Module is available at the following link: Products and Services: NI Vision Development Module.

 

Back to Top

2. AVI2 Features and Changes

This section describes new features available through AVI2, including broadened codec availability, expanded Windows 64-bit compatibility, and Real-Time (RT) target support.

Built-In Codecs and Codec Support Through Microsoft's Video Compression Manager

Through AVI2, on Windows any codec that is compatible with Microsoft's Video Compression Manager is available to the user. This means that the codecs recognized by Windows are recognized by NI Vision products as well.

In addition, on any system that supports AVI2 (both Windows and Real-Time), the following codecs are packaged with Vision Development Module and Vision Acquisition Software. You will see these codecs on every machine with AVI2 functions installed.

  • FF Video Codec 1
  • Motion JPEG
  • Y800 Uncompressed
  • YUV 4:2:0 Planar

Note that the Quality input in IMAQ AVI2 Create.vi is only implemented for Windows codecs, and is not available for these four codecs that install with NI Vision.

To use LabVIEW to see which codecs are available on a machine, run IMAQ AVI2 Get Codec Names.vi, which is located in the Functions palette under Vision and Motion»Vision Utilities»Files»AVI. Note that the native codecs are labeled with "(NI Vision)" as seen in Figure 1 below.

Figure 1. Listing Codecs in AVI2

 

Expanded Codec Support on Windows 64-bit Machines

Because of the new method by which codecs are detected in AVI2, users have expanded access to codecs installed on Windows 64-bit machines. With AVI2, any codec compatible with Microsoft's Video Compression Manager is available to the user, which eliminates the previous limitation in detecting certain codecs on Windows 64-bit machines. This resolves issue ID 304337.

Real-Time Target Support

With AVI2, certain Real-Time targets can now create and read AVI video files. These targets include the Embedded Vision System (EVS) and the 177x line of NI Smart Cameras.

For Real-Time targets, NI provides the same four codecs with which to create or read videos: FF Video Codec 1, Motion JPEG, Y800 Uncompressed, and YUV 4:2:0 Planar. An AVI file created on Windows with any of these codecs will be readable on Real-Time targets, and vice versa. Keep in mind that on Windows machines, there might be some codecs that NI does not provide that will appear through the Video Compression Manager, and videos generated with these codecs will not be readable on Real-Time targets.

AVI2 is not available for the following devices:

  • The following NI Smart Cameras: 1722, 1742, 1744, 1762, 1764
  • NI CVS 145X (Compact Vision System)
  • In general, any target running VxWorks

 

Back to Top

3. New Terminology and Location of Old Functions

AVI2 comes with new functions and slightly different terminology.

  • In LabVIEW, the VIs have new names. They are labeled AVI2 instead of AVI. For example, IMAQ AVI2 Create.vi has taken the place of IMAQ AVI Create.vi.
  • The term "Codec" has replaced the term "Filter" to accurately reflect the new implementation. For example, IMAQ AVI2 Get Codec Names.vi has taken the place of IMAQ AVI Get Filter Names.vi.

The new VIs are still in the same location on the Functions palette: Vision and Motion >> Vision Utilities >> File >> AVI, as seen in Figure 2 below.

Figure 2. AVI Palette

All of the old VIs are still available as part of the NI Vision installations. Both the new and the old AVI functions are located in <LabVIEW>\vi.lib\vision. Within that, the libraries are as follows.

  • The new AVI2 VIs are located in Avi.llb.
  • The old AVI VIs are broken up into two libraries: Avi1.llb and Avi2.llb.

 

Back to Top

4. How to Use the AVI Functions in LabVIEW

To use the AVI functions in LabVIEW, Vision Development Module or Vision Acquisition Software must be installed. Vision Development Module includes Vision Acquisition Software. 

Vision Development Module can be found here: Products and Services: NI Vision Development Module

Vision Acquisition Software can be found here: Products and Services: NI Vision Acquisition Software.

Examples demonstrating how to use the AVI functions in LabVIEW are available in the NI Example Finder. To open the NI Example Finder in LabVIEW, navigate to Help»Find Examples. To locate the AVI examples, choose the Browse tab and navigate to Toolkits and Modules»Vision»Functions.

 

Back to Top

5. Related Links

Products and Services: NI Vision Development Module

Products and Services: NI Vision Acquisition Software

NI Vision Development Module 2012 SP1 Readme

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit