LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ AVI read frame performance

 

I've been playing around with the read AVI with buffer example in the Developer Community.  It reads all the frames of an AVI into memory and then plays them back at the appropriate frame rate.  This works ok with very small AVI files but with anything larger it gets slower and slower until it almost stops loading the AVI.  At that point it seems to be loading less than 5 frames per second and is killing my cpu.  I have plenty of free RAM during this.     

 

https://decibel.ni.com/content/docs/DOC-8479

 

This is the case with the play AVI example that comes with Labview too (without a buffer) which just loads and plays one frame at a time.  Can someone suggest a way to improve the performance of an AVI player in Labview?  My ultimate goal is to read an AVI and detect changes in motion of objects by comparing two frames at a time.  These AVIs are going to be at least 5 minutes in duration at a frame rate of 30 fps.

 

I'm using Labview 2009 with the Vision Developer installed.

 

 

0 Kudos
Message 1 of 5
(2,616 Views)

Hi,

 

One thing we could implement is a compression filter that is on the IMAQ AVI Create VI used in conjunction with the IMAQ AVI Get Filter Names VI.  Also, what is the RAM available on your computer and what size images are you acquiring and saving to AVI?  Thanks!

 

Kim

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

@VTKim wrote:

Hi,

 

One thing we could implement is a compression filter that is on the IMAQ AVI Create VI used in conjunction with the IMAQ AVI Get Filter Names VI.  Also, what is the RAM available on your computer and what size images are you acquiring and saving to AVI?  Thanks!

 

Kim

 


 

Thanks for replying.  I'm running labview 2009 on a dual core pentium 2.3 GHz with 4 Gigs of ram.  It typically has 2 Gigs free while running the program.

 

I'm not tryingt write an AVI, I'm trying to read an AVI.  The frames are 352 x 240 in size.  I've tried several read AVI examples and they all act the same way.  They slow down quickly and the hard drive and CPU are really cranking away.


 

0 Kudos
Message 3 of 5
(2,582 Views)

 

I noticed today that when I view an uncompressed video, the read rate is acceptable.  The codec decompression seems to really slow things down.  The AVIs are normally in xvid.  This doesn't happen in media player though.

0 Kudos
Message 4 of 5
(2,568 Views)

Hi,

 

Great to hear that you found something that will read at an acceptable rate.  One thing I was going to add was to try to read different size AVI files and see at what point (or read time) the VI starts to slow down, but it seems like the compression on the video increased the buffering of the file.

 

Kim

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