From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ AVI2 Create `uncompressed' format?

Solved!
Go to solution

Since upgrading to LV 2012 SP1, I've noticed that the newer `IMAQ AVI2 Create' module doesn't seem to write uncompressed .avi files in the same way as the old one (IMAQ AVI Create).  For compatibility, I need to use uncompressed video; it seems that the new version only allows `Y800 Uncompressed Grey Scale' video, which is not understood by my operating system (W7 x64), so Windows Explorer can't draw thumbnails or open in media player - this is useful for previewing and organising videos.  ImageJ and VirtualDub have no problem opening the videos.

 

It's unclear exactly what format the older `IMAQ AVI Create' uses by default - whatever it was, it worked fine! Various astronomy forums have suggested installing ICcapture to provide a Y800 codec for WMP, but this doesn't work for me.  

 

Does anyone have any suggestions?

 

Thanks,

Laurence

0 Kudos
Message 1 of 15
(5,411 Views)

You can use IMAQ AVI Get Codec Names to generate an array of all of the available codecs.  What does this return on your system?

Applications Engineer
National Instruments
0 Kudos
Message 2 of 15
(5,384 Views)

Hi Eric - thanks for getting back to me, I appreciate it.  

 

When I wire up the IMAQ AVI2 Get Codec Names vi, I get the following:

 

Microsoft Video 1

Intel IYUV codec
FF Video Codec 1 (FFV1) (NI Vision)
Motion JPEG (NI Vision)
Y800 Uncompressed Grey Scale (NI Vision)
YUV 4:2:0 Planar (NI Vision)

 

I think only one of these (Y800) is uncompressed 8-bit video.

 

Laurence

 

0 Kudos
Message 3 of 15
(5,378 Views)

You mentioned that this change took place when you upgraded your IMAQ driver.  Could you possibly uninstall the current IMAQ driver and reinstall the one you were using previously (assuming its compatible with 2012 SP1).

 

If that is not an option, you can try finding the appropriate codec on Microsoft's website and then use it in your code.

Applications Engineer
National Instruments
0 Kudos
Message 4 of 15
(5,359 Views)

Hi Eric - thanks for getting back to me.

 

Sorry, I don't think I've explained myself explain properly; I'm using LabVIEW for data analysis, rather than acquisition, so this should be between W7 x64 and LabVIEW, with no third party drivers involved.   I can open uncompressed video files fine, it's just writing again using the same format that's the problem, as LabVIEW doesn't seem to have that option built in any more.  The only thing that has changed in my setup is the installation of LabVIEW 2012 SP1 (v.12.0.1f2), and the associated Vision Development Module (VDM).  If I use VIs written with LabVIEW 2011 (and the accompanying VDM) on the same computer, I can read/write video files in the correct format without a problem.

 

I can have a go at reverting to the old VDM, but that would lose some of the additional functionality I was hoping for.  The older VDM writes Microsoft DIB (Device Independent Bitmap) video sequences if you leave the `compression codec' input on the AVI Create subVI unwired.  Unfortunately, there is no codec available anywhere for uncompressed Microsoft DIB sequences (I guess because it's such a basic format), and the new "AVI2 Create" VI requires me to wire something to the `codec' input.

 

I've attached an image showing two simple VIs that write array data to a video frame.  The top one (LV2011/VDM) does what I want, but the bottom one (LV2012/VDM) requires the extra input, and there are no options that will produce the same, basic output as the top one.

 

Thanks again for your help with this, it's a bit of an odd problem!

0 Kudos
Message 5 of 15
(5,345 Views)

When LabVIEW installed 2012 Service Pack 1 (a.k.a. the 2012 Spring release), the AVI functions in IMAQ were replaced with AVI2 functions, which don't have the same functionality.  [In our case, we were using the ability to embed data in the AVI frame -- this ability is not present in AVI2: it "seems to be there", but the VIs don't work].  However, the original AVI functions are still in your LabVIEW directory, just not readily available on the Palette.

 

If you look in (on my machine) C:\Program Files (x86)\National Instruments\LabVIEW 2012\vision, you should be able to find both the new AVI2.llb and the original (now-renamed) AVI1.llb.  Using these "original" versions might get back the missing features you need.

 

Let us know if this works for you.

 

Bob Schor

0 Kudos
Message 6 of 15
(5,335 Views)

Hi Bob - thanks for the tip; I hadn't noticed that library tucked away in there!  On my (64-bit) version of LabVIEW, Avi1.llb only contains create, write and close functions, but that's all I need in the short term.  I can read movies and extract pixel values using the AVI2 suite, then write using the older versions.  Hopefully the ability to write uncompressed AVIs will be restored at some future point...

 

Thanks,

Laurence

0 Kudos
Message 7 of 15
(5,312 Views)

i'm also using w7-64 with latest LV and vision developer.

i've encountered the same difficulty writing uncompressed grayscale avi's with AVI2.

in particular,

the LV example (AVI Compression Comparison Example.vi)  runs fine with all codexs' except Y800,

for which it reports an error.

 

i'll be watching for a fix.

thanks for your posts.

0 Kudos
Message 8 of 15
(5,285 Views)

Hi all,

 

I am running into exactly the same problem.  It started out with setting up a new machine (with 2012) and the 2011 AVI's would show up in the diagrams but the "detailed help" didn't work.  The vi's were also not in the pallet.  I converted to the AVI2 Vi's and am now running into the same issue trying to write uncompressed .avi's.  This is important for us because we are doing image analysis and the compressed images evaluate differently then the originals.

 

If anyone comes up with a fix for the AVI2 vi's I would be interested. 

 

Jim

 

0 Kudos
Message 9 of 15
(5,269 Views)

larry2, what error do you see when you use Y800?

Applications Engineer
National Instruments
0 Kudos
Message 10 of 15
(5,244 Views)