Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

problem using "open AVI" on ffdshow encoded avi files

Hello,
We have been using ffdshow to encode video files, using wmv9 encoder.  The codec string used when creating the AVI is "ffdshow video encoder".  The setup seems to have been working fine, we can play back the video in windows media player no problem.  But we now get an error on "AVI Open".  This worked prior to installing ffdshow (we were using "microsoft video 1" codec prior), but trying an avi open now completely crashes labview, to a point where we have to kill the labview task.  This is just using a test vi that merely opens/closes the avi reference. 
 
Also, when opening a video previously encoded to microsoft video 1, it delivers an error immediately on opening the AVI.  The error is
 
-1074396009
An internal directx error has occurred.
Try installing the latest version.
 
Which we did, and did not seem to help. 
 
Also, there are a couple identical machines which we have not yet installed ffdshow on, where AVI open still works.
 
Using ffdshow has so far proven to really reduce our file sizes by allowing compression to wmv, we hope to continue using it for this purpose if at all possible.
So my question is, has anyone else had this problem?  Are there settings in ffdshow which I should be aware of, particularly in the "decode" tab, which will prevent labviews "AVI open" from working?
 
Thanks
David Jenkinson


Message Edited by david_jenkinson on 03-04-2008 06:39 PM
0 Kudos
Message 1 of 17
(10,352 Views)
Hi David,
LabVIEW does not have inherent support for the WMV9 codec, only certain AVI formats can be read back in. This is only hinted at in the detailed help for the AVI Open VI, which says "Note: The file extension must be .avi." So anything you write to WMV9 will not be able to be opened again in LabVIEW. But I see you are also having problems also opening videos encoded in Microsoft Video 1 which used to open fine.

I'm not sure I completely understand what's going on here. If you are trying to move all your files from Microsoft Video 1 to WMV9, you may end up needing to use a 3rd party program like VirtualDub to do it if you cannot get around this crash and want to keep using ffdshow to write your files (though again, they will not be accessible again in LabVIEW after that).

I wonder what happens if you uninstall ffdshow and whether that will restore your AVI Open functionality on the videos previously encoded in Microsoft Video 1. Also, was there any extra data encoded into your videos does in MS Video 1 ("AVI with data"), or were they simply just the images written out to AVI?
0 Kudos
Message 2 of 17
(10,334 Views)
Hi Vijay,
Yes, I can uninstall FFDshow, and open all avis, even ones encoded with ffdshow, without directx errors.  The ones that open encoded with ffdshow show the codec used is "WMVideo Decoder DMO" (using IMAQ Get Info).  Others encoded previously with "MS Video 1" prior to installing ffdshow, show "unknown" for some reason.  But MS media player opens both fine.
 
Yes, there is extra data saved with each frame of the AVI we are trying to post process, consisting of labview tick count.  There is no "AVI data", as in one piece of data associated with the whole AVI, there is data in each frame.
 
It is important that we be able to open the avi's with labview after we encode them, because we post process them in one of our test applications.  When you said "only certain AVI formats can be read back in", do you know what those formats are?  We do want to preserve writing with ffdshow if possible (in which there are many different codec choices), because of the file size savings.  Our videos can be long on occasion.
 
Thanks
Dave
Message 3 of 17
(10,324 Views)
Hi Dave,
I did some extensive testing to recreate the issue using the ffdshow 12/24/2007 beta. I was able to reproduce the issue and filed it as a Corrective Action Request (CAR), ID #98847. Whenever the program attempts to write or read an AVI, ffdshow should pop up a dialog box asking whether to load it for that instance of running the program or not. If you do load it, you'll be able to create and write your AVI files with no problems (including ffdshow settings for DivX6 and WMV9). And if it's not loaded, you'll be able to read back in those same files you were writing in whatever codec you chose. However, if it's loaded, you won't be able to open any existing AVIs using IMAQ AVI Open until you close and reopen LabVIEW and choose not to load ffdshow that time..

At this time, I can't see a good way around the problem except to disable ffdshow when reading AVIs in LabVIEW and enable it when writing them. If you've already set the program to remember the preferences to always load or not load ffdshow, you'll have to remove LabVIEW.exe from the associated whitelist or blacklist registry keys. Search through the registry for any keys named ffdshow, and look within them for values named 'whitelist' and 'blacklist' and modify their data to remove the LabVIEW.exe reference. As always, take care when editing the registry and make a full backup of it before you perform any modifications.
0 Kudos
Message 4 of 17
(10,199 Views)
Hi Vijay,
Thanks for putting in the time and creating a CAR.

This is somewhat of a large problem for us in one particular test scenario.  It is an automated test using teststand/labview, which both encodes, and decodes as part of our sequence, so I can't see how loading and unloading labview in the middle of it would be possible.  I do actually have labview.exe configured as "allowed" in ffdshow, to avoid the popups since it is an automated test. 

I am a little confused by "And if it's not loaded, you'll be able to read back in those same files you were writing in whatever codec you chose".  So even if I had used "ffdshow video encoder" as the codec string name passed to "open AVI" when creating the AVI, I can read it back when ffdshow is unloaded?

I guess right off the bat I'm not sure of a  proper workaround for this in the near term.  Do you see this issue being addressed sooner or later?  Would this fix be  perhaps in a patch, or the next major version of labview? 

I wonder if there is a codec package out there, other than ffdshow, that will allow itself to be loaded while letting AVI Open work.  I have researched, and other packages have actually pointed to ffdshow as well.  Our main concern originally was file size savings, but that cannot now be our only criteria for choosing which codec to use. 

Thanks
David Jenkinson


0 Kudos
Message 5 of 17
(10,155 Views)
Hi David,
You understood me correctly - my findings were that when ffdshow was not loaded into LabVIEW, I could open any AVIs I had encoded through LabVIEW... even the ones I had previously used ffdshow to encode when it was loaded (configured ffdshow to encode in DivX6 ro WMV9, and then in LabVIEW passed "ffdshow" to the compression type string in IMAQ Create AVI).

As for a codec pack which does not use ffdshow, I am unfortunately not familiar enough with the state of the industry on that. Most codec packs I have seen also used ffdshow as well.
0 Kudos
Message 6 of 17
(10,144 Views)
Thanks Vijay,
Do you have any idea as to the possible timeframe of a fix against the CAR you generated?

Regards,
David Jenkinson
0 Kudos
Message 7 of 17
(10,143 Views)
Hi David,
Unfortunately, it is our policy not to disclose when CARs will be fixed or features will be added in new products until they are released or are otherwise officially announced. This is due to various reasons, primarily the uncertainty in availability of development time, priority, and resources - and sometimes a CAR fix or feature addition will be implemented in a pre-release version but has to be taken out later due to last minute problems with testing or if a more important change disrupts its functionality. I can tell you for sure that R&D is certainly aware of the issue because one of the developers specifically asked me to create the CAR for the issue once you posted about it.

You can contact us periodically with that CAR ID number to see if it we can make any definite statements on its status, or whether you can be added to beta test releases of newer IMAQ software that may have implemented a fix. One thing we can definitely disclose to you is if we have any workarounds for the problem. I don't have any workarounds for you at this time, but R&D may find some as they work further on the problem. Past that, I can't really comment for R&D or the Applications Engineering department.


Message Edited by VGA CD-ROM on 03-27-2008 01:51 PM
0 Kudos
Message 8 of 17
(10,124 Views)
Vijay,
Ok fair enough.  Yes please keep me posted as to a possible workaround or any test fixes.  I'd be happy to try them out.

Regards,
David Jenkinson.
0 Kudos
Message 9 of 17
(10,102 Views)
Hi David,
I don't know of a way to get a forums users added to the user contact list for a CAR, but if you open up an email or phone support request with us at www.ni.com/ask , we can get you added to the list of users who we've reported as experiencing the issue. If R&D wants go back through and notify users related to the CAR about any updates to the status, that would be the first place they would look. In the meantime, the only other good way to find out the status of any known workarounds is to periodically contact NI and ask about the CAR status, I'm afraid.
0 Kudos
Message 10 of 17
(10,060 Views)