Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

grab and save to avi

Hi,

I have two basic questions regarding the grab and avi saving.

1. I edited the grab and save to avi function from the example finder but cannot play the saved avi properly. It shows the 0xc00d5212 error. If I use the VLC to play, it shows the following error message 'Broken or missing avi index'. Even after choosing the temporary fix function in VLC, the video shows nothing. Does anyone know how to fix this problem?

2. I want to save a fixed number of frames (eg.100 frames) to each avi and have no idea how to pass the frame count in property node to other vi.

2. if i need to save several avi before I hit stop button. How do I loop it?

 

ANY suggestions would be deeply appreciated!!

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

Hey Penny001,

 

1. By "the video shows nothing", do you mean that it shows a black screen? If so, check out this document: AVI Files Result in a Black Screen When Viewed.

2. If you are looking for the frame count property, you can find it by right clicking on the blue reference wire and selecting: Create >> Property for IMAQ Class >> Status Information >> Frame Count. This will output an integer value that you can use elsewhere.

3. This last part is going to be a bit trickier. There are a few possibilities but it depends on what you are trying to do. Do you want to prompt the user for each file? If so, you are going to miss frames while the dialog box is open. Or, you can try to programmatically determine the filename for each new file.

 

Regards,

alyssa.h

National Instruments

 

0 Kudos
Message 2 of 5
(2,743 Views)

Thank you very much for the reply.

I read the link for 1. I tried to compress the avi file but it still does work.

When I play the video using windows 10 defalut player, It shows the 0xc00d5212 error. If I use the VLC media player to play, it shows the following error message 'Broken or missing avi index'.

 

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

2. If you are looking for the frame count property, you can find it by right clicking on the blue reference wire and selecting: Create >> Property for IMAQ Class >> Status Information >> Frame Count. This will output an integer value that you can use elsewhere.----I understand where to find the frame count property but have no idea which vi should this property be sent to. Sorry for the bad expression.

3. This last part is going to be a bit trickier. There are a few possibilities but it depends on what you are trying to do. Do you want to prompt the user for each file? If so, you are going to miss frames while the dialog box is open. Or, you can try to programmatically determine the filename for each new file.-- I am a little confuse by 'prompt the user for each file'? Would you please explain a little bit more.  What I am trying to do is: I may need to grab several videos for each time. I just want those several video to be stored in one video, instead of only one video will be stored after I click the stop button.

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

Update. I solved black screen problem by create a constant 1 instead of reading codec from IMAQ AVI2 Get Codec Names VI. I use Labview 2015 version. I have no idea whether there's some bug in this version that the above mentioned VI cannot get the codec.

 

0 Kudos
Message 5 of 5
(2,728 Views)