01-20-2019 11:52 AM
Hi,
I am trying to write a VI to control the fps of a video. I have attached just the bare bones of the main program. When I try to run the program with a 420 MB 60 fps .avi file, the while loop is executing only 45 times per second but when I try a 550 MB 30 fps file, the same while loop is executing 70 times per second. I would prefer to have higher execution rates with 60fps video.
I have a 60 Hz monitor, would that cause the above discrepancy?
Also I would like to know whether the while loop execution speed could be increased programmatically or using a better hardware could increase the execution rate. I run a i5-3210 M processor with 4GB RAM.
Thank you
01-20-2019 12:06 PM
Hi Elancheran,
you could try to decode the AVI file before displaying the frames in the display to speed the loop iteration…
I have a 60 Hz monitor, would that cause the above discrepancy?
How should the monitor limit the update rate in LabVIEW?
What is that ElapsedTime good for? It will NOT help you to set the iteration time: right now it is only determined by that IMAQ function in the loop (and the image indicator)!
01-20-2019 07:42 PM
Dear GerdW,
Thank you for your reply.
I am using elapsed time to just time the loop to execute for one second so I could see how many frames are read in one second.
I realized monitor update speed doesn't impede the execution of program but I was just wondering why similar sized files have different execution rate.
Thanks
Elancheran
01-20-2019 10:34 PM
01-21-2019 01:17 AM
Hi Elancheran,
I was just wondering why similar sized files have different execution rate.
Same file size doesn't mean same execution speed!
- different image frame sizes
- different number of frames
- different image encoding (?)
- …
01-21-2019 01:28 AM
Hi GerdW
I forgot to mention that both the videos are the shot in the same camera with CBR pixel distribution. So I am not sure whether the frame sizes and encoding would differ much.
And the fps is different as I mentioned in the question . One video is 60 FPS and the other is 30 FPS.
Would Avi read take more time to read a 60 fps video than a 30 FPS video?
I am pretty new to the image processing side, so please forgive me if I ask any dumb questions
Thanks
Elancheran
01-21-2019 01:47 AM
Hi Elancheran,
Would Avi read take more time to read a 60 fps video than a 30 FPS video?
Reading 60 frames will take about twice the time of reading 30 frames (when all other parameters like frame/image size and encoding are the same)…
01-21-2019 08:21 AM
Dear GerdW,
Perhaps I have reached the pinnacle of my disclaimer about asking dumb questions with the previous one.
To give you a better context, I have attached the full program. As you could see I am trying to adjust the playback speed of the video according to the speed data I receive from the speedometer. I am able to achieve it with a 30fps video as it executes 80 frames/ per second in the while loop I am able to slow down or speed up the video accordingly using a wait function, but with less frames per second, I run into issue of poor quality. Using a 60 fps video would be ideal for my problem but because of the fact that it executes only 35 frames/per second in the while loop I am unable to speed up the video when the speedometer value is high. Could you suggest a solution or an alternate approach for it.
Thanks
Elancheran