From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is AVI file getting compressed ?

Solved!
Go to solution

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?

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

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

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

"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?

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

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.

0 Kudos
Message 4 of 5
(2,393 Views)
Solution
Accepted by topic author enthusiast4

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.

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