LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

recorded avi is played too fast

I am actually using Labview 8.6 with NI Vision Acquisition Software and USB camera. I made an application, that simply captures the images from the camera and write them to avi file. The issue is that when I want to play recorded movie, it goes like fast forward during play.

Example: I record 10s movie and when I play it, the length is shortened to 5s and it goes like fast-forward.

Anyone had similar issue?? Thank you in advance for your help!!

0 Kudos
Message 1 of 10
(5,428 Views)

Hi

 

Can you post the code you used to do save your AVI?

I did create some AVI file in a project a few years ago and I don't remember having such troubles. Maybe some settings aren't properly set 😮

 

 


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 10
(5,397 Views)

In attachement I post a labview file and a picture of the code. If you could look on that, that would be great!! Cheers

Download All
0 Kudos
Message 3 of 10
(5,384 Views)

In attachement I post a labview file and a picture of the code. If you could look on that, that would be great!! Cheers

Download All
0 Kudos
Message 4 of 10
(5,384 Views)

Make sure that the value you set in "frames per seconds" for the AVI and the frame rate you set in the acquistion express VI are the same.

Other than that, i don't know... Which filter are you using?


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 10
(5,373 Views)

I checked it before. I set the same speed for created avi as the camera is recording (example 30fps). The filter which I am using also doesn't matter. I can leave it blank (without the compression) and effect is all the time the same = Recorded movie is shorter that it should be and goes fast forward.

0 Kudos
Message 6 of 10
(5,365 Views)

Hi Chaded,

 

I've had a look at your code and set it up with a camera at my end. It seems that although the fps is set within the express VI, it is not always operating at that rate. This makes it difficult to synchronise the two parts of your code. So what we can do is create a producer consumer architecture that will solve this issue. Iv attached the standard Producer/Consumer to this post so you can build onto that.

 

To explain the concept of a Producer/Consumer first. It works because it has two loops, which can run at different rates. The aptly named producer loop "produces" the data, and places this data into a queue. This is then "consumed" or "processed" within the consumer loop.

 

So specific to your application. You will need to build your image acquisition into the producer loop, running at X fps, then in the consumer loop you will need to set up the build .avi functionality as you have in your previous example again running at the same X fps.

 

Post back if you have any more questions.

 

 

 

Richard S
Applications Engineer
Certified LabVIEW Associate Developer
National Instruments UK&Ireland
Message 7 of 10
(5,307 Views)

Hi Richard,

 

Thank you very much for your response, which seems to be helpful. Could you please save and upload your VI file, that it would be readable under Labview 8.5. Thank you very much for that. Cheers.

 

Chaded

0 Kudos
Message 8 of 10
(5,276 Views)

Hi Chaded,

 

LV 8.5:

 

Rich.

Richard S
Applications Engineer
Certified LabVIEW Associate Developer
National Instruments UK&Ireland
0 Kudos
Message 9 of 10
(5,265 Views)

Hi,

I have the same problem on my VI: when I read the avi file with VLC, it's too fast and the total duration of the video is inferior of the real one. I use a USB camera set at 30 fps in M&A.

My second problem is to read the datas + the videos with Labview. I am able to read the video but not the datas. 

0 Kudos
Message 10 of 10
(4,855 Views)