Windows Media Player should play AVI files by default. The emphasis here is on the word 'should' because sometimes it flat-out refuses and throws up an error. It is possible to fix this by updating it to the latest version or installing a third-party codec pack, which we'll explain later.
But first, the quickest and easiest fix is simply to install the free VLC media player which will play virtually every type of video file. If you’re not bothered about using Windows Media Player, installing VLC is a good idea because it doesn’t require separate codecs to be installed: it comes with everything you need to play AVI, MKV, MP4, WMV, MPEG-2 and more, and can also stream video from the web.
AVI files won't play in Windows 10
In Windows 10, AVI files open with the Films & TV app, not Windows Media Player. This doesn't support AVI files and you'll see the error below if you try to play one.
However, Windows Media Player is still present in Windows 10 and you can search for it in the Start menu. Just drag-and-drop your AVI file onto the Windows Media Player title bar (or any area where you don't see a circle with a line through it) and it should open and play.
Even so, it's still worth installing VLC just in case you need to play other types of video that Windows Media Player and the Movies & TV app won't open.
How to fix AVI playback errors in Windows Media Player
There are two fairly common reasons why AVI videos stop playing in Windows Media Player (WMP). First is that AVI files are no longer associated with the app.
To fix this, open WMP and press Alt to show the menu. From the Tools menu choose Options…
In the window that opens, click the File Types tab (note that this doesn’t exist in WMP 12, only in previous versions). Check that Windows video file (.avi) is ticked and, if it isn’t, tick it and click OK.
Another thing to try is updating to the latest version of WMP. Within WMP, press Alt to show the menu if you can’t see it and choose Help, Check for updates… and follow the onscreen instructions.
If this still doesn’t fix the problem you can try installing the K-Lite Codec pack, which includes all the popular video codecs for playing a variety of video formats. Download the Basic pack from codecguide.com.