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

63 views
Skip to first unread message

George Lauder

unread,
Jul 27, 2026, 3:47:15 PMJul 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 PMJul 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 AMJul 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 PMJul 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 PMJul 28
to PIVlab
Thanks ... we will do tests with individual frames.
Best wishes,
George

qingluan liu

unread,
Aug 24, 2026, 5:02:48 AMAug 24
to PIVlab

Dear William,

Hello. I still really need the AVI import function, because my analysis involves more than a thousand samples, and each sample contains only 5 frames.

The import windows for images and videos in PIVlab are very different. When importing videos, I only need to type the video number, for example “999”, and press Enter. However, if I convert all videos into separate image frames, I would need to create thousands of folders, and I would no longer be able to quickly import the data simply by typing “999” and pressing Enter.

In addition, PIVlab does not handle multiple displays very well on my computer. The video import dialog used to appear automatically in the center of the main screen, whereas the image import dialog always appears at the bottom of another screen. Each time, I have to drag it back to the center of my view and then use the mouse to select the image group manually. This greatly slows down my workflow.

For these reasons, I still hope that the previous AVI import function can be restored.

Thank you very much.

Best regards,
Isidro Liu

William

unread,
Aug 31, 2026, 3:17:40 AM (12 days ago) Aug 31
to PIVlab
Hi, for large amounts of data, I would recommend to use the automated script examples in the folder "example_scripts". In combination with an on the fly conversion of your videos, this should save you a lot of time.

William

unread,
Aug 31, 2026, 3:19:06 AM (12 days ago) Aug 31
to PIVlab
... And could you show me how the GUI looks like and where the image import dialogue is positioned? This should be easy to fix if I see the problem.

qingluan liu schrieb am Montag, 24. August 2026 um 11:02:48 UTC+2:
Reply all
Reply to author
Forward
0 new messages