11-10-2017 08:47 AM - edited 11-10-2017 08:49 AM
Hello All!
I am trying to read and write an avi file with 'Read Write AVI with Data.vi ' i.e acquire image, and data and write to the AVI File. This data is saved with the image in an AVI so when the AVI image is read out in the next loop, the same data it was written with can also be retrieved.
When I run it, an original video file of time 31s gets converted into the new AVI file created by IMAQ AVI Createwhich runs only for 5s. (The original no of frames is 900 while the same avi file shows the no of frames as 166 ) Somehow the AVI file gets fixed to the following Terms:
1. No of Frames: 166
2. Total Time : 5s
Does the AVI file get compressed when using IMAQ AVI Create? Why is it Happening? Why the total no of Frames are fixed?
Solved! Go to Solution.
11-10-2017 08:39 PM
OK, you need to attach the 31s Video file (we know nothing about it), and the VI you are trying to use to create the AVI file. You may be doing something wrong, and without seeing what you are doing, it is a real challenge to tell you what wire or what function or what structure or what ... is not quite correct.
Bob "Attach Code + Data" Schor
11-11-2017 12:14 AM
"Compressed" is probably the wrong word because virtually all video formats are compressed. If you look at the result, does it cover the same time range just with fewer frames or do you get only the first or last 5 seconds of video (truncation).
From your description we cannot really tell what you are doing. Can you show us some code?
11-13-2017 04:47 AM - edited 11-13-2017 04:51 AM
The VI is attached below. I cannot understand why the no of frames is fixed to 166 to any video file i run. It doesn't matter even if the no of frames is lesser than 166.E.g if the original no of frames is 100,the video still runs till 166 frames and completes in the same total time of 5s i.e the video runs again till it completes 166 Frames in total.
11-14-2017 05:31 AM - edited 11-14-2017 05:31 AM
It was a trivial error. I connected the count 'N' terminal of the For Loop to the total number of frames so that it runs only for the 'no of frames' avaiable for a particular video. Also, the problem was with the waveform array having a constant no of columnns as 166 due to which the maximum total no of frames was limited to 166; which I have changed to 2000 to accomodate more no of frames.