From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ AVI Get Filter Names VI very slow...

All of the sudden, IMAQ AVI Get Filter Names VI is tremendously slow (i.e. I didn't change the VI or the machine substantially, and now it's running slow). I've removed it from the VI and am now just using a list I generated by running it once, but I use this VI on multiple machines with prossibly different codecs so it would be nice to use the VI. Does anyone know any reason why this VI would take upwards of 5 seconds to run? Even though it only needs to be run once, it's annoying to sit there with a frozen VI while it waits for the IMAQ AVI... VI to run.
0 Kudos
Message 1 of 5
(3,361 Views)

Hi Majoris,

 

My IMAQ AVI Get Filter Names also takes about 5 seconds to run--and this is expected.  The VI must poll the computer itself for information to retrieve these various filter names,which depending on your computer can take time.  If you need to run this VI at the beginning of your program and do not want to wait, I'd recommend saving the results to a text file and pulling the filter names from there.  

 

If you choose not to use the VI,  you can also get the codecs' information from the Control Panel: 

Sounds and Audio Devices> Hardware>Video Codecs>Properties>Properties Tab will list the Codecs that you have on your computer.  Exploring the Settings of these should yield the same results.  However, I don't think that this effort is worth the 5 seconds wait. 

 

Cheers, 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 2 of 5
(3,342 Views)

Well, we're just two different people. Regardless of where I put this VI in my program, it hangs the entire program when it's encountered. If it just took 5 seconds to run, that would be fine. But 5 seconds to run while the rest of the program has a seizure is something I want to avoid. For now, I've decided just to take the result of one run (which I pipe into string ring selector) and turned that into a constant that I later manipulate.

 

It's so weird that in a program where I push and manipulate 100s of MBs of data a second, the slowest part of the program is reading an 8 entry long array of strings from the system.

 

Thanks for the help,

 

Chris

0 Kudos
Message 3 of 5
(3,337 Views)
My laptop takes 300 msec to do an avi read filter names. But the big issue is that my list returned does not equal what the system lists as avaialable. This is a problem since I can't read some files because the codec is not showing up as recognized. Any reason for this? I am using Vison 8.5. Maybe a newer version fixes this?
0 Kudos
Message 4 of 5
(3,256 Views)

Hi,

 

Which codec in particular isn't showing up?  Does it show up in your list of codecs on your computer (within Control Panel)?

 

Regards,

 

Marti C
Applications Engineer
National Instruments
NI Medical
0 Kudos
Message 5 of 5
(3,238 Views)