Windows Media Player Codec Error: How to Fix It
In this article
A Windows Media Player codec error means the player is missing the specific decoder needed to play your file's audio or video format. The quickest fix is to install a reputable codec pack such as K-Lite Basic, or to use a player like VLC that has built-in codecs. Before you install anything, confirm the file actually plays elsewhere and that your Windows and Media Player are up to date, because a corrupted download or an outdated player can produce the same error message.
What You'll Need
- A Windows PC with Windows Media Player installed (the steps below refer to the classic desktop version; labels can differ slightly by Windows version and region).
- The file that triggers the error, so you can test each fix.
- Administrator rights on the PC, because installing codecs and running troubleshooters requires them.
- An internet connection to download official updates or a trusted codec pack.
- Optional but useful: VLC Media Player from the official VideoLAN site, as a fallback player that handles most formats without extra codecs.
Step-by-Step
- Identify the file format. Right-click the file, choose Properties, and look at the file type (for example .mkv, .mp4, .avi, .flac). This tells you whether the issue is a common format Media Player should handle or an uncommon one that needs a codec.
- Test the file in another player. If VLC or the Movies & TV app plays it fine, the file is not corrupt and the problem is Media Player's codec support. If no player opens it, the download may be incomplete or damaged, so re-download it from the original source.
- Run the built-in troubleshooters. Open Settings > System > Troubleshoot > Other troubleshooters (on older builds, Settings > Update & Security > Troubleshoot) and run the Windows Media Player troubleshooter if it is listed. Also run the Video Playback troubleshooter. Restart the PC afterwards and try the file again.
- Update Windows and Media Player. Go to Settings > Windows Update and install all pending updates. Then open the Microsoft Store, go to Library, and click Get updates to refresh the Media Player app if you are using the Store version. Updates often include new or corrected codecs.
- Re-register the player's core files. Open Command Prompt as administrator and run the command
regsvr32 wmp.dll. This re-registers the Media Player DLL and can clear errors caused by a damaged registration. Restart the PC before testing. - Install a trusted codec pack. Download the K-Lite Codec Pack Basic from the official CodecGuide site. During setup, keep the default options and choose the "Normal" install profile unless you have a reason to change it. Avoid bundling offers by unticking any extra software the installer suggests. Restart the PC, then open the file in Media Player.
- Reset Media Player's library if the error persists. Close Media Player, then open Settings > Apps > Installed apps, find Windows Media Player, and choose Advanced options > Reset. This clears the player's database and settings; your media files are not deleted, but playlists and library customisations are lost. Reopen the player and let it rebuild the library.
- Use a player with built-in codecs as a permanent alternative. If a particular format keeps failing, install VLC from the official VideoLAN website. VLC includes its own decoders and plays almost any file without system-wide codec changes, which avoids the risk of codec conflicts.
Common Mistakes
- Downloading codec packs from unknown sites. Many unofficial packs bundle adware or malware. Stick to well-known sources such as CodecGuide or the official VideoLAN site.
- Installing several codec packs at once. Overlapping packs can conflict and cause new playback errors. Remove old packs before adding a new one.
- Skipping the file test. If the file is corrupt, no codec will fix it. Always confirm the file plays elsewhere first.
- Resetting the library without a backup. A reset wipes playlists and library settings. Export playlists first if they matter to you.
- Ignoring Windows updates. Some codec fixes arrive through Windows Update, so skipping updates can leave the error in place.
Tips
- Prefer the Movies & TV app or VLC for formats Media Player handles poorly, such as MKV with certain subtitle tracks.
- Keep one codec pack installed rather than layering several; the K-Lite Basic pack covers most common formats.
- When downloading media, choose formats like MP4 with H.264 video and AAC audio for the widest compatibility.
- If you use the Store version of Media Player, update it through the Microsoft Store rather than downloading installers from third-party sites.
- Note the exact error message; it often names the missing codec, which makes searching for the right fix much faster.
Troubleshooting
If the error appears only for one file, the file is likely damaged or uses an unusual encoding; re-download it or convert it with a trusted converter. If it appears for every file, the player installation itself may be damaged: uninstall Media Player through Settings > Apps > Installed apps, restart, and reinstall it from the Microsoft Store or Windows Features. If audio plays but video does not (or the reverse), the missing codec is specific to that stream, so install a codec pack that covers it or switch to VLC. If the error mentions a specific codec name, search for that name plus "Windows Media Player" to find the official decoder. When nothing works, a system file check can help: open Command Prompt as administrator and run sfc /scannow, then restart. As a last resort, create a new user account and test playback there; if it works, the original profile's settings are the cause, and you can migrate your files to the new account.
Frequently Asked Questions
Do I need to pay for codecs?
No. Windows includes common codecs, and free packs like K-Lite Basic and players like VLC cover most formats at no cost.
Is it safe to install a codec pack?
Yes, if you download from the official publisher's site and decline any bundled extras during setup. Avoid unknown download portals.
Why does the error appear only in Windows Media Player?
Media Player relies on system codecs, while players like VLC include their own. A format VLC supports may still be missing from Windows.
Will resetting Media Player delete my music and videos?
No. A reset clears the player's library database and settings, not your media files, but playlists and customisations are lost.
Can I fix the error without installing anything?
Sometimes. Running the built-in troubleshooters, updating Windows, and re-registering wmp.dll resolve some cases. If not, a codec pack or VLC is the practical route.
Does the Movies & TV app avoid codec errors?
It handles many common formats, but it is not a universal player. For uncommon formats, VLC remains the most reliable fallback.