One of these will definitely do the trick
How to Fix Windows Media Player Cannot Play the File
Microsoft hasn’t updated Windows Media Player in a while, but it’s still here in Windows 10 and it’s as fast, fluid, and snappy as ever. It’s not without its problems, though. Sometimes you’ll encounter the error “Windows Media Player can’t play the file” when you try to play an audio or video file.
Most often, this happens when Windows Media Player does not have the codecs required to decode specific media file types. Several other reasons, such as outdated codecs and outdated hardware drivers, can also cause problems. The troubleshooting tips that follow should help you fix the "Windows Media Player cannot play the file" error.
Windows Media Player supports a wide variety of audio and video formats, but eventually you'll come across a file type that isn't supported. You can fix that by configuring the program to automatically download the relevant codecs.