AVI File Maximum File Size of 2 GB

Updated Aug 17, 2023

Reported In

Software

  • Vision Development Module

Driver

  • NI-IMAQ
  • NI-IMAQdx

Issue Details

I'm writing data to an AVI file in LabVIEW and I eventually receive error -1074395965The following reason is given:
 
IMAQ Vision:  (Hex 0xBFF604C3) The AVI file has reached its maximum size of 2 Gigabytes.

Why is this occurring and what are possible workarounds?

Solution

Software versions 2019 and onwards:
Starting with Vision Development Module 2019, writing AVI files bigger than 2 GB is supported by LabVIEW. However, limitations to AVI file size exist in individual codecs. If you are seeing this error while using VDM 2019, try using a different codec. See "Additional Information" for a list of codecs that support writing file sizes of at least 2 GB. 

Software versions 2018 and before:
The IMAQ AVI2 VIs in LabVIEW have an inherent 2 GB limitation that cannot be altered. Both LabVIEW 32-bit and LabVIEW 64-bit have the same capability in regards to AVI files.

If you are running into this limit, monitor the amount of data you are writing to the file using the Get File Size Function and programmatically create a new file before hitting the 2 GB limit.

Alternatively, you can use the older IMAQ AVI VIs to write AVI files. However, these VIs have limited codec support. 
You can find the IMAQ AVI VIs in the Avi1.llb and Avi2.llb libraries, which are located in the following folder:
 <National Instruments>\20XX\vi.lib\vision\
The IMAQ AVI Write Frame.vi is in Avi1.llb

Additional Information

Below is a list of codecs that have been tested by NI. This is not an exhaustive list of codecs, and for reference only. Codecs labeled with "(NI Vision)" are shipped with the Vision Development Module and support writing AVI files larger than 2 GB. However, NI does not develop these codecs, and NI cannot alter codecs to support larger file sizes. 

Codecs that support files over 2 GB:

  • Motion JPEG (NI Vision)
  • FF Video Codec 1 (FFV1) (NI Vision)
  • VP8 (NI Vision)
  • VP9 (NI Vision)
  • Y800 Uncompressed Grey Scale (NI Vision)
  • YUV 420 Planar (NI Vision)
 

Codecs that do not support files over 2 GB: 

  • Intel IUV codec
  • Microsoft Video 1
  • Cinepak Codec by Radius