How can I read an .avi file on Windows?
4 views (last 30 days)
Maximilian Nentwich on 14 Nov 2017
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.
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.)