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.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

opening avi with 'motion jpeg' codec

Solved!
Go to solution

I am trying to open avi files stored on a sd card from a casio exilim camera, Prism video converter tells me it uses a 'motion jpeg' codec. The 'open avi' VI crashes when I try to open the file in labview ( illegal avi session). Any ideas?? I'm using LV 2011.

0 Kudos
Message 1 of 11
(6,024 Views)

Hey al capem,

I'm not sure I understand what you are asking.  A motion jpeg or M-JPEG isn't the same as an AVI file.  Are you trying to open a motion jpeg with the "open avi" function?

0 Kudos
Message 2 of 11
(6,015 Views)

The file is saved as an avi file by the camera. When I open it with 'prism video converter' it says that the codec is 'motion jpeg'. The file however definately has a .avi file extension. It is my understanding that the new breed of Hard Drive and SD card cameras are using this new format as my commercial motion analysis software has to be upgraded to load these new avi's. FYI the camera is a casio exilim fh100 and is used because of it's excellent high speed video capability. I am currently having to use 'prism video coverter' to convert the avi to a Digital Video 1 format so that labview can open the file. I would much prefer not to have to take this extra step.

0 Kudos
Message 3 of 11
(6,013 Views)

I've been looking into this a little more, and I am getting some conflicting information on my end.

 

If you use the Get Filter Name vi, do you see the codec that your camera is using in that list?  Is it the generic MJPEG codec that comes with Windows?  I also have that codec installed, and am getting some strange behavior as well.

 

I've gotten in touch with our PSE for the IMAQdx, and I'm waiting to hear back from him about what the cause of this issue might be.  This is especially peculiar because you can open this file with another program using the same codec.  I'm going to need a little time to pin this down, but I'll keep you up to date, and I'll check in no later than Monday.

 

Thanks for being patient.

0 Kudos
Message 4 of 11
(6,001 Views)

Hi Ben,

All of the avi VI's draw a blank with an 'invalid avi session' error. The codec doesn't appear on the list from the 'get names' vi. I also downloaded a new motion jpeg avi codec and installed it but it made no difference.

Thanks for your help.

0 Kudos
Message 5 of 11
(5,999 Views)

Hi al capem,

I have a few follow up questions for you.  First, are you using 64-bit LabVIEW?  Secondly, you mentioned that when you use the "Get Filter Names" that the codec you are using is not included on that list.  What names do you see on that list?  It sounds like from what you said that you know specifically what codec that you should be using to decode this file.  What codec is that?  Also, could you post a short one second or so video in that file format and post to the forum so we can take a look at it?

 

It looks to me like either the codec you are using isn't being recognized by LabVIEW either because it isn't compatible or because for some reason LabVIEW isn't seeing that the codec is installed.  One final question, do you have a choice on your camera to use a different codec or is that a hardware issue on your camera?

0 Kudos
Message 6 of 11
(5,983 Views)

Hi Ben,

The labview is 32bit 2011. As I have said before the codec is 'Motion JPEG' (see attachment). Please google 'Motion JPEG avi codec' to see that a number of manufacturers have resurrected this codec for use with video capable still cameras. The file runs on media player, VLC, movie maker etc.

See attachment for filter names. You will see that I have downloaded and installed a couple of codecs to try and get this going.

I have no control over the way the camera saves files. I have asked casio to provide information on their codec and to tell me where to get it.

Cheers

Greg

Download All
0 Kudos
Message 7 of 11
(5,978 Views)

Hey Greg,

I was able to open the AVI file you posted without any errors using the Read AVI Example.vi from the Example Finder.  Is the .avi file you sent directly from your camera or did you run this .avi file through your other software and encode this file with a different codec?

 

My codec list is much shorter than yours, but does include the generic "MJPEG Compressor" codec that you also have on your list.  I'm not totally sure why you are having problems opening this file with your software.  Can you try to open the file using the example above and let us know if you are still getting that error?

0 Kudos
Message 8 of 11
(5,957 Views)

Hi Ben,

 Sorry still  no go. Please fine screen dump of error message attached. I have checked that my XP SP3 is up to date. I also tried to open one of the demo avi's 'Flame' without success. This was running the example not my code.

 

Cheers

Greg 

0 Kudos
Message 9 of 11
(5,950 Views)
Solution
Accepted by topic author al capern

Hi Ben,

Success at last.

It turns out that the problem is with the universities MOE. I installed Vs11 on a stand alone PC also running XP SP3 and the avi example worked first go. I don't know what our IT dudes have done when they built the MOE but at least I can use my stand alone to write my vision software. Thanks heaps for your help.

Cheers

Greg

0 Kudos
Message 10 of 11
(5,948 Views)