How can I read an .avi file on Windows?

1 view (last 30 days)
Hi,
I was trying to use VideoReader to open an .avi file on Windows. I either get 'Unable to read the file.' or can read the file but no frames. Since I have been able to use the same code on Linux a few weeks ago I guess something with Windows might be the issue. The file doesn't play on Windows media player, but does play on VLC.
Does anyone have an idea how it might be possible to use VideoReader in this case?
I can convert the file to .mpg I'm sure, but I do not want anything to change in the video, so I would only like to do this as a last resort.
Thanks, Max

Accepted Answer

Walter Roberson
Walter Roberson on 15 Nov 2017
On Windows, the reading code uses Windows Media Viewer, so if you do not happen to have the appropriate codecs installed for that particular encoding then you will not be able to read it that way.
You might be able to find and install the right codec, but you might have to resort to something like getting VLC to transcode into individual files and read those.
If the codec happens to be Indeo3 or Indeo5 then you will not be able to find a WMV driver for it: the people who created Indeo3 and Indeo5 do not want those codecs to survive (those codecs used 32 bit offsets and so cannot be used for large movies.)

More Answers (1)

Maximilian Nentwich
Maximilian Nentwich on 15 Nov 2017
Thanks for the answer! Would you know how to find out which codec was used, if it was Indeo3 or Indeo5? Otherwise, I will transcode the video.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!