Unable to import an .avi PIV movie in the newest version

23 views
Skip to first unread message

George Lauder

unread,
Jul 27, 2026, 3:47:15 PM (4 days ago) Jul 27
to PIVlab
In version 3.12 we were able to import an .avi PIV movie but this does not seem to work in the new version 3.14.  The option to upload a movie seems to be missing.
Thanks for your assistance!

William

unread,
Jul 27, 2026, 4:01:39 PM (4 days ago) Jul 27
to PIVlab
Dear George, I feel honored to read your comment here :) I have removed the possibility to work directly with video files for the following reasons:
*Some people use highly compressed mobile phone videos with awful quality, and that generates a lot of support work.
*Parallel processing does in principle not work with video files (AFAIK), as this would require to open one video file multiple times and extract the desired frames.
*Video files introduce codec and compatibility problems that image sequences avoid. Matlab cannot read all video formats.
*Video import is more prone to software bugs than loading image sequences, as this requires two separate paths in the software
*Image sequences are easier to inspect, verify, and troubleshoot.
*Converting videos to image sequences is simple and avoids many common support issues.

If your workflow allows this, please just use
v = VideoReader('video.avi');
k = 1;
while hasFrame(v)
    imwrite(readFrame(v), sprintf('img_%04d.tif',k));
    k = k + 1;
end

Why do you prefer avi files over separate images? Maybe consider using multi-tiffs (supported in PIVlab) if it is important for your to have a set of images in a single file.
Cheers,
William

George Lauder

unread,
Jul 28, 2026, 11:54:26 AM (3 days ago) Jul 28
to PIVlab
Hi William,
    Thanks so much for your very quick and helpful reply! 
We obtain our PIV images using high-speed cameras and all our data is in the form of uncompressed .avi files.  We have literally thousands of files like this, and for each experiment we may generate between 20 and 50 movies, each of which might have 15,000-20,000 frames. It's just impractical for us to then write out each frame separately to be able to do a piv analysis. I think that most biologists take this same approach as we all use high-speed cameras to obtain piv data.
   I'm not sure what we will do in the future given that PIVLab won't import movie files directly now, but we'll certainly continue using the older version as we really like it and greatly facilitates subsequent analyses in Matlab.  Thanks for all your excellent work on developing and maintaining piv software.
Best wishes,
George

William

unread,
Jul 28, 2026, 3:01:43 PM (3 days ago) Jul 28
to PIVlab
Dear George, thanks for your feedback! In my workflow, there is hardly a difference between using a folder that contains thousands of frames, or a file that contains thousands of frames. All file operations stay the same, I don't really think that there is more clutter with image files in folders. For several file operations, I even think that using seperate image files has advantages (corrupted files / copy-paste resumes etc). The huge advantage of using separate image files is an enormous speed up in PIVlab due to parallel processing. If you have a good desktop computer, then analyses / background subtraction etc can be faster by a factor of 10 easily. I would really recommend to give this a try.
The latest release has a lot of interesting additional features too.
All the best,
William

George Lauder

unread,
Jul 28, 2026, 4:07:05 PM (3 days ago) Jul 28
to PIVlab
Thanks ... we will do tests with individual frames.
Best wishes,
George
Reply all
Reply to author
Forward
0 new messages