08-13-2010 05:21 PM
Hello,
My vi captures frames from the camera, now when I try to record an avi file for future reference the avi frames per second and the FPS of my main software don't match which cause black frames in the avi. I've been wondering what is the best approach to capture an avi while the main software FPS changes? Is it possible to remove frames from an avi or is it possible to just record an avi of just the relevant frames?
Thank you,
Solved! Go to Solution.
08-16-2010 09:13 AM
Hello,
Have you taken a look at the help file on the AVI functions? Here is an excerpt: "Note Frame Per Second indicates the desired playback rate of the AVI you create. The AVI may play at a slower rate depending on the performance of the system on which it plays." If you have a mismatch, I would recommend altering the settings of your software and camera in order to get them to match. If you are wanting to keep your current FPS, you may want to take a look at a producer/consumer architecture for your images. Your producer loop would acquire images and your consumer loop would record the frames into an AVI file. Here is an example on such an architecture with images: http://zone.ni.com/devzone/cda/epd/p/id/5859 .
-Zach
08-16-2010 12:13 PM
Hello Zach,
In my main vi I do particle analysis and other calculations, when one begins to "record" an avi he/she need to provide FPS of acquisition. The acquisition FPS and the main loop of particle analysis FPS have different FPS. While the avi FPS is static, the FPS of the main loop is somewhat dynamic. Hence, I'm pretty sure it has nothing to do with playback settings as I looked on the frames of captured avi and it wasn't synced with the main loop/camera because it was mainly black frames. I'd like to "record" only what I see on the image display which is only the particles....
I'll try to modify my vi according to producer/consumer approach, but I'm not sure that it is what I'm referring to.
Thank you,
08-16-2010 12:13 PM
Hello Zach,
In my main vi I do particle analysis and other calculations, when one begins to "record" an avi he/she need to provide FPS of acquisition. The acquisition FPS and the main loop of particle analysis FPS have different FPS. While the avi FPS is static, the FPS of the main loop is somewhat dynamic. Hence, I'm pretty sure it has nothing to do with playback settings as I looked on the frames of captured avi and it wasn't synced with the main loop/camera because it was mainly black frames. I'd like to "record" only what I see on the image display which is only the particles....
I'll try to modify my vi according to producer/consumer approach, but I'm not sure that it is what I'm referring to.
Thank you,
08-16-2010 07:22 PM
Hi again Zach,
The example in the article isn't available to download (I think that the link on the page is broken), can you please upload it to the thread?
Thank you,
08-16-2010 07:46 PM
Never mind, I downloaded it from ni.com using example finder. So I'm going to try it now:
first loop get image and "record avi"
Second loop particle analysis and other calculations....
Let's see how it'll go....
08-16-2010 10:23 PM
Thank you, it works much better now.