Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

DirectX Error playing AVI file

This is not a question, but just a summary of the saga I had to go through to play AVI files when I upgraded from LabVIEW/Vision 7.0 to LabVIEW/Vision 2009.  This is so other people might perhaps find it easier to fix these problems in the future.

 

On my old system I could play the NI AVI movie examples (they used the pretty basic CODECs, like Cinepak, but they worked).  However the IMAQ Get Filter Names.VI would crash LabVIEW (this provided a list of the CODECs on the computer).  No problems though - all this would be fixed when I upgraded to Vision 2009 - right?

 

Well after installing 2009 the first thing I tried was running the IMAQ Get Filter Names.VI - it works only slightly better in that LabVIEW doesn't crash, but it takes a whopping 5 minutes to run on my Windows XP (SP3) system with the basic CODECs that come with the OS.  Why is this - I think this VI still needs improvement.

 

But worse of all was when I tried to play the simple AVI movies (Flame.avi, SideCrash1.avi etc..) that NI shipped in LabVIEW, they always came up with a DirectX error and that I should upgrade to the latest version of DirectX and yet Windows Media Player could play them fine.  So the following solutions were suggested and tried, but ALL failed:

1) Re-install the Visual Deployment Module (VDM).

2) Repair the VDM.

3) Upgrade/Repair DirectX (I already had the latest version - 9.0c installed, versions 10 and above are meant for VISTA/Windows 7).

4) Remove an additional Codec (TSCC- Techsmith) I had installed.

5) Repair the registry.

 

So at this stage I was ready to slash my wrists, but was told to download a program called GraphEdit.  This is a visual tool for building/testing filter graphs?? ie. it shows the DirectShow Filters that are used to decode and play the AVI file (see attachment).  This is where my simple understanding of how an AVI is played went out the window.Smiley Sad  I  had assumed that if an AVI movie was encoded with say the Cinepak Codec all I needed was this codec installed and it would work.  However looking at the AVI files through GraphEdit the Cinepak codec is not even mentioned!!  The OS seems to have choosen a DirectShow Filter called "Nero MP4 Splitter" (this was obviously installed when I installed Nero Express 😎 plus some other filters to play my AVI files.  I don't get it how does all this work?

 

1) If I was using an older OS (say windows 2000) would it use VFW (Video For Windows) and hence use the Codec to play the AVI.

2) But for a newer OS, does it use Directshow Filters and is independent of the Codec?

 

Anyway the problem I had now was, how to tell the OS I didn't want to use the Nero MP4 Splitter Filter.  I didn't want to uninstall Nero, so I had to install another program called RadLight Filter Manager which allows me to adjust the Merit level of the DirectShow Filters.  The Merit Level can vary from Preferred to Do not Use and tells the OS which filters should be chosen.  So I adjusted the Nero MP4 Splitter level to "Do Not Use" and the AVI Splitter to "Preferred" (since this is the same filter that was used on my old system) and voila I can now play the AVI movies through LabVIEW Smiley Very Happy

 

This whole experience has been very exhausting though. I really think NI should put more effort into Codec?/DirectShow Filter compatibility with LabVIEW/Vision - if the Windows Media Player can play an AVI then so should LabVIEW.

 

Chris

 

Message 1 of 5
(6,230 Views)

I somehow fixed the problem with the IMAQ Get Filter Names.VI taking forever to execute (5min+)

 

I used a program called "Codec Tweak Tool" (www.videohelp.com/tools/Codec_Tweak_Tool) which can detect and remove broken references to codecs and filters.  It found some from the RadLight Filter Manager (which I needed to set the Merit value of some Codecs).  I also un-installed ffdshow filters.

 

Now when I run the IMAQ Get Filter Names.VI it executes it returns immediaely (<1sec).

 

So I don't know if it was the broken links or ffdshow that was causing a problem with this particular VI.

 

Chris.

Message 2 of 5
(6,197 Views)

I just wanted to say thank you for this. There are a lot of threads discussing this directx error, and in all of them the response is always update directx, if that doesn't work try to repair the vision development module or NI-IMAQ, and if that doesn't work try reinstalling. I've been trying to fix this for a while and I can't imagine how long it would've taken for me to figure this out, but downloading the RadLight Filter Manager you mentioned and setting the AVI Splitter merit value to preferred fixed everything in 10 seconds.

0 Kudos
Message 3 of 5
(5,625 Views)

Thank you so much for this information, I could play my AVI files in LabVIEW.

0 Kudos
Message 4 of 5
(5,485 Views)

Hi Cris,

 

I was facing this problem with a labview application. PC in my desk works properly with vision applications, specially AVI files. The problem started when I tried to run this application in a notebook (Working at home!). I did all sort of changes and updates in software suggested before, but it didn't work out.

 

As long as I proceeded according to your suggestion I got the problem fixed, really fast.Smiley Very Happy

 

Thanks a lot for the outstanding support.

 

Luiz

_____________________ _ _ _ _ _ _

"Together we stand, divided we fall..."

Certified LabVIEW Associate Developer






0 Kudos
Message 5 of 5
(5,277 Views)