09-12-2019 04:04 AM
Hi,
I am using Labview 2015 and I need to save videos> 2GB in my experiments. We have made a loop in which it creates another file as soon as the labview reaches to its 2 GB capacity. Labview starts saving another AVI file with a new name. The problem is that I have missing data in between. I need videos of 20 min and almost 5 min of my recordings are missing. Does anyone know a solution to this problem?
I have a 32GB Ram and 64bit operating system.
Thank you so much in advance,
Niki
09-14-2019 03:39 PM
Am I correct that the problem you are having is a limitation on the maximum file size for an AVI created "all at once"? I confess that the AVI's I've recorded are of "short" behaviors (5-10 seconds), so although I may record for 2 hours, I only save the "interesting behaviors" by creating a separate AVI for each one.
AVI files have an inherent limitation of 2 GB, and LabVIEW adheres to this limit. However, there's no issue in creating multiple AVI files that record successive frames. For (a simple) example, suppose a Frame took 1 MB, you were recording 10 frames/sec, so in 100 seconds you would record 1 GB. You could record Frames 0-99 in "Block 0.avi", Frames 100-199 in "Block 1.avi", ... and Frames 1000-1017 (a "short" file) in "Block 10.avi". I assume there is some non-LabVIEW routine that can "stitch" these AVIs together into some form of video that you can view, and it would (I hope) be a seamless view.
How hard is it to do this? It is actually quite easy, using a Producer/Consumer Design. I'll "hand-wave" you through it ...
All of the "Magic" happens in the Consumer (which I called "Video" in my routine). Here's what happens in response to the various Messages:
I've not actually implemented this scheme, but I'm quite sure it will work, as long as the Camera isn't shoving too many pixels down the I/O channel's throat. Do test by taking a video of a stopwatch -- if you can get two or three sub-AVI's worth with no frame drops, you're golden.
Let me know how it works.
Bob Schor