Windows Media Player cannot play the file and shows the "player might not support the file type or might not support the codec" error when the file's container, video stream, or audio stream falls outside what the installed player build can decode. The single most common trigger on modern Windows is an MKV file carrying H.265/HEVC video or a Matroska container with an unusual audio track, because the built-in player handles MP4, WMV, AVI, and WAV reliably but needs a separate codec package or an app upgrade for those formats. Two fast diagnostics separate the cases: check the file extension first, then open the same file in a player that bundles its own codecs. If the other player runs it, the problem is a missing codec on your machine, not a corrupt file.
Check the File Extension Before Anything Else
Right-click the file, choose Properties, and read the exact extension on the General tab. The player error is deliberately vague because Windows Media Player reports one message for several different failures, so the extension is the first fact you need. MP4, M4V, WMV, AVI, WMA, and WAV play in a default Windows 10 or Windows 11 installation. MKV, FLV, WEBM, MOV in some variants, and files carrying an HEVC or AV1 stream sit outside that default set. Write the extension down before touching any settings, because every later fix depends on it.
The file type column matters as much as the extension. A video file whose Properties dialog shows "Matroska Video File" is the MKV container, and Windows Media Player has never shipped with native Matroska demuxing on consumer Windows builds. An MP4 file is safe by default only if its video and audio streams are H.264 and AAC, the two codecs Microsoft bundles as part of the base platform. A file with an .mp4 extension can still fail when someone has placed HEVC video inside it. Extension tells you the container, not the codec.
Audio-only failures take the same path. Files carrying FLAC, Opus, or DTS audio inside an otherwise ordinary container will trip the same message because the audio stream needs its own decoder. Windows Media Player on Windows 10 and 11 plays FLAC and ALAC natively through the platform media stack, which surprises people who remember older versions failing on FLAC. Check the audio codec in the file's own properties panel before assuming the video is at fault. If the video plays in another app but the sound does not, the audio decoder is the missing piece.
Use the free MediaInfo utility when the file's built-in properties are unhelpful. MediaInfo reads the container and reports the exact video codec, audio codec, bit depth, and frame rate in plain text, and its report turns a guess into a fact. Record the video codec string exactly as shown, then compare it against the list in the next section. This step takes about thirty seconds and prevents you from installing a codec pack for a file that actually needs a container-level fix.
Which Formats the Built-In Player Decodes by Default
A default Windows 11 installation of Windows Media Player decodes H.264 video in MP4 and MOV containers, WMV and VC-1 video in ASF containers, MP3 and AAC audio, FLAC and ALAC lossless audio, and WAV PCM. That list covers the overwhelming majority of files people download, rip, or receive by email. It does not cover HEVC video, AV1 video, MKV containers, DTS audio, or TrueHD audio unless the machine's hardware and Microsoft's paid extensions are present. Knowing this boundary is the fastest way to decide whether the file or the player needs to change.
| File situation | Default Windows Media Player | What fixes it |
|---|---|---|
| MP4 with H.264 video and AAC audio | Plays | Nothing — file is inside the default codec set |
| MKV with H.264 video and AAC audio | Fails — no native MKV support | Install the HEVC/MKV-capable extension or use a third-party player |
| MP4 with HEVC (H.265) video | Fails unless the HEVC extension is installed | Microsoft HEVC Video Extensions from the Store |
| MP4 with AV1 video | Plays only with the AV1 extension installed | AV1 Video Extension from the Store |
| AVI with MPEG-4 Part 2 video | Usually plays; some variants fail | Codec package or conversion |
| FLAC or ALAC audio | Plays natively on Windows 10 and 11 | Nothing — the platform decoder handles it |
| MKV with DTS or TrueHD audio | Fails twice — container and audio codec | Player with built-in DTS/TrueHD decoding or audio conversion |
Two rows in that table produce most of the error reports. HEVC video inside an MP4 is now common because phones and action cameras default to it for efficiency, and those files land on a Windows machine that lacks the decoder. MKV is common because most video distribution outside paid stores uses it. Neither case means the file is broken. Both mean the player needs help it does not ship with.
Version differences narrow the same problem differently. Windows Media Player 12, which ships with Windows 7 and with the legacy component in Windows 10 and 11, handles more formats than the older Windows Media Player 11 on Windows Vista because the underlying media foundation stack grew codec support. On Windows 10 and 11 the modern Media Player app replaced Windows Media Player as the default in 2022, and the app has a wider default set than the legacy desktop component. If you are still opening files in the legacy wmplayer.exe, the same file may play in the modern app with no codec installation at all.
Install the Missing Codec the Microsoft-Sanctioned Way
Microsoft publishes official codec packages in the Microsoft Store, and these are the safest installation path because they update through Windows Update and never modify system-wide decoder registrations. The HEVC Video Extensions package is the relevant one for H.265 files, and the AV1 Video Extension covers AV1 files. Search the Store for the exact package name, install it, then double-click the file again. Windows Media Player detects installed Media Foundation decoders automatically, so no restart of the player is needed.
Microsoft's HEVC Video Extensions package used to carry a small price in the Store, and the price has changed over time and by region. The free path exists: the "HEVC Video Extensions from Device Manufacturer" package is free but Microsoft states it is intended only for devices whose manufacturer pre-installed it, and installing it on other hardware can fail or violate the listing's terms. Confirm the current price and the device-manufacturer restriction on the Store listing before assuming either package is free. Do not treat the price as fixed; verify it in the Store at the time you install.
1: Open the Microsoft Store app from the Start menu. 2: Search for "HEVC Video Extensions" and select the package published by Microsoft Corporation. 3: Read the price and the device-manufacturer note on the listing, then click Get or Buy. 4: Wait for the install to complete, then reopen the failing file in Windows Media Player. 5: If the file still fails, repeat the search for "AV1 Video Extension" and install that package as well.
If the Store package installs but the file still refuses to play, the container is the remaining suspect. The HEVC extension decodes the video stream inside a recognised container, and it does not teach the player to open an MKV file. That distinction explains a frequent failure case: someone buys the HEVC extension for an MKV file and the error persists, because the extension addressed the video codec while the container problem remained. Run MediaInfo again after the install to confirm the video codec is now decodable, then address the container separately.
Use a Player That Ships Its Own Codecs as the Fast Diagnostic
Installing VLC media player or the K-Lite Codec Pack's bundled MPC-HC gives you a second opinion in under five minutes, and the result tells you which repair path to take. VLC bundles its own decoders for HEVC, AV1, VP9, MKV, DTS, TrueHD, and almost everything else, so a file that plays in VLC is a file your Windows Media Player installation simply cannot decode. That is not a reason to switch players permanently. It is a diagnostic that isolates the fault.
The diagnostic has a clean decision rule. If VLC plays the file with sound and picture, install the matching Microsoft codec package or convert the file. If VLC plays the picture but not the sound, the audio codec is the specific gap and conversion to AAC is usually quicker than hunting a decoder. If VLC also fails, the file itself is damaged or incomplete, and no codec installation will help. Re-download or re-copy the file from its source before spending more time on the player. One extra check catches most of the remaining cases: play a known-good MP4 in Windows Media Player to confirm the player itself is working, because a corrupted player installation produces similar errors across every file.
K-Lite Codec Pack is a different kind of tool. It installs a bundle of third-party decoders plus the MPC-HC player, and it can register those decoders so Windows Media Player can use them. The trade-off is real: codec packs modify system decoder registrations and have historically caused conflicts after Windows feature updates, and a bad decoder registration can break playback in other apps. Install it only if you accept that risk and keep a System Restore point from before the installation. For a single stubborn file, converting the file is lower risk than modifying the system.
The third-party player route also covers hardware decoding. VLC and MPC-HC can use the GPU's HEVC and AV1 decoders directly, which matters on older laptops where software decoding of 4K HEVC drops frames. Windows Media Player can use hardware decoding too, but only after the codec is registered. If you watch 4K HEVC regularly, a player with built-in hardware decoding is the lower-maintenance choice, and it removes the recurring codec question entirely.
Convert the File When Installing a Codec Is Not an Option
Conversion sidesteps the codec question by producing a file in a format the default player already handles. The target is MP4 with H.264 video and AAC audio, which every Windows 10 and Windows 11 installation plays without additions. HandBrake is free, runs on Windows, and reads MKV, HEVC, and most other containers, so it converts the exact files that trigger the error. Set the output container to MP4 and the video codec to H.264, then start the encode.
Conversion costs time proportional to the file. A two-hour 1080p film re-encoded at the H.264 preset "Fast" on a mid-range four-core laptop typically takes between 40 minutes and 90 minutes, and hardware encoding through the GPU can cut that to roughly 10 to 25 minutes on a machine with a recent Intel, AMD, or NVIDIA encoder. A short phone clip converts in seconds. The arithmetic matters when you have a folder of files: converting twenty two-hour films at 60 minutes each is twenty hours of machine time, which is usually the point where installing a codec or switching players wins.
1: Install HandBrake from its official site and open it. 2: Drag the failing file onto the Source button. 3: Set the Format dropdown to MP4 and the Video Codec dropdown to H.264. 4: Leave the quality slider at its default, or set a constant quality value around 22 for a good size-to-quality balance. 5: Choose a destination folder and click Start Encode. 6: Play the finished MP4 in Windows Media Player to confirm it opens.
Conversion loses nothing visible at sensible quality settings, but it does re-encode, which means generation loss if you repeat it and a longer file if you pick a high quality value. Keep the original file until the converted version plays correctly. If the source is a DRM-protected file from a paid store, conversion is not an option: the file is encrypted by design, Windows Media Player needs the store's own playback component, and no codec or converter will open it. That case is a licence issue, not a codec issue.
A subset of files fails because the container is technically valid but the file is truncated. A partial download of an MKV from a browser often leaves the header intact and the payload incomplete, and the player reports a codec error because it cannot find the stream it expects. Check the file size against the size reported by the source. If the file is shorter than expected, re-download it before converting or installing anything.
Repair the Player When Every File Fails
When several different files that used to play now throw the same error, the player installation is the suspect rather than the codecs. Windows Media Player depends on the Windows Media Foundation platform, and a damaged or partially unregistered Media Foundation component breaks playback across formats. The first repair step is the built-in troubleshooter, which Microsoft ships inside Windows Settings and which checks the media playback stack without any downloads.
1: Open Settings, then System, then Troubleshoot, then Other troubleshooters. 2: Find "Video Playback" in the list and click Run. 3: Follow the prompts and let the troubleshooter finish, then retry the file. 4: If the troubleshooter reports no fault, open Settings, then Apps, then Installed apps, find Windows Media Player, and choose Advanced options. 5: Click Repair first, then Reset if Repair does not fix playback.
Repair re-registers the player's components without touching your files or settings. Reset returns the player to its default configuration and clears its library and preferences, which fixes corruption in the player's own database but also removes any customised library view. Neither option reinstalls the shared Media Foundation stack, so if both fail and every file still errors, run the System File Checker from an elevated Command Prompt with the command sfc /scannow. That command repairs damaged Windows system files, including the media components, and it takes roughly 5 to 15 minutes depending on disk speed.
A common edge case looks like a player fault but is not. Files stored on a network share or an external drive that has gone to sleep produce the same error because the player cannot read the bytes, not because it cannot decode them. Copy the file to the local drive and retry before repairing anything. The same applies to files in a folder synced by a cloud client that has not finished downloading: the placeholder file is a few kilobytes and the decode fails instantly.
Separate a Codec Problem From a Corrupt File
The error message covers two completely different faults, and the repair differs depending on which one you have. A codec fault means the file's structure is sound and the decoder is missing. A corruption fault means the decoder is present but the bytes are not. The distinguishing test is cheap: play the file in a second player that bundles codecs, as described earlier, and watch what happens. A codec fault produces clean playback elsewhere. A corruption fault produces the same error or visible artefacts in every player.
Look for the physical signs of corruption when the second player also fails. The file may play for ten seconds and stop, which points to a truncated download. The video may show grey blocks or frozen frames, which points to a damaged stream. The audio may drift out of sync, which points to a broken index. None of these are codec problems, and installing codec packs for them wastes hours. Delete the file, re-copy it from the source, and test the fresh copy.
Files copied from a failing hard drive or a dying USB stick deserve special suspicion. A copy that reported success can still contain bad sectors, and the player sees a stream it cannot parse. Run a checksum comparison against the original if you have both copies, or copy the file again from a different cable and port. Storage faults produce intermittent symptoms that mimic codec faults, and the tell is that different files fail on different days.
One more corruption variant involves video files produced by screen recorders and streaming capture tools that were interrupted mid-write. These files have a valid header and an incomplete index, and some players can rebuild the index on open while Windows Media Player cannot. A repair tool designed for the container, such as a dedicated MP4 or MKV repair utility, can rebuild the index and make the file playable. That repair is worth trying before discarding footage you cannot re-record.
Set the Right Default App and File Association
A file that opens in the wrong program produces the same error even when Windows Media Player is not at fault. If double-clicking an MKV launches the legacy Windows Media Player when the modern Media Player app is installed and capable, the association is pointing at the weaker program. Fixing the association is faster than any codec installation and costs nothing. This is a frequent cause of confusion after a Windows feature update resets default apps.
1: Open Settings, then Apps, then Default apps. 2: Type the file extension, such as .mkv, into the search box on that page. 3: Select the current default app shown for that extension. 4: Choose Windows Media Player or the modern Media Player app from the list, then confirm.
The modern Media Player app and the legacy Windows Media Player share a name but not a codec set. On Windows 11 the modern app is the default for many extensions, and it decodes more formats out of the box. If you have been launching files from an old shortcut or the Start menu entry for the legacy player, you may be testing the weaker program. Open the file through File Explorer with the association fixed, then judge whether the error persists.
File associations can also be hijacked by installer programs that claim extensions without asking. A video converter or a screen recorder installed months ago may have taken .mp4 or .mkv and now opens files in a broken or trial-expired program. Check the association for the failing extension and reset it to the intended player. The error text is Windows Media Player's, so if you see it while a different program is supposedly opening the file, the association is routing you to wmplayer.exe unexpectedly.
Match the Fix to the File You Actually Have
Work backwards from the file rather than forwards from the error. The error string is identical for five different causes, and matching the fix to the file saves the most time. Use the extension and the MediaInfo report to place the file in one of the categories below, then apply only the matching repair. This decision path resolves the majority of cases without installing anything system-wide.
| File you have | Likely cause | First fix to try | Fallback |
|---|---|---|---|
| MKV, any codecs | No native container support | Play in VLC to confirm, then convert to MP4 in HandBrake | Third-party player as permanent default |
| MP4 with HEVC video | Missing HEVC decoder | Install Microsoft HEVC Video Extensions | Convert to H.264 in HandBrake |
| MP4 with AV1 video | Missing AV1 decoder | Install AV1 Video Extension | Convert to H.264 |
| AVI with unusual video | Legacy codec not registered | Play in VLC to confirm | Convert to MP4 |
| Any file, every player fails | Corrupt or truncated file | Re-download or re-copy the file | Container repair tool |
| Any file, only Windows Media Player fails | Player installation fault | Run Video Playback troubleshooter, then Repair | sfc /scannow |
| DRM-protected store download | Encrypted by design | Open in the store's own player | No conversion possible |
The two rows people skip are the last two. DRM-protected files from paid stores cannot be fixed by any codec, because the encryption is intentional and the store controls playback. Player installation faults are the other skipped row, and they explain the frustrating case where a file that played last month now errors with no change to the file. Check the file against the table before installing a codec pack, because the pack solves one row and complicates the rest.
Timing matters for one category. If the error appeared right after a Windows feature update, the update may have reset file associations or replaced a codec registration. Check the update history in Windows Settings and note the install date, then compare it with when the errors started. A match points to the association or registration fix rather than the file. Re-register the codec package by uninstalling and reinstalling it from the Store, which restores the registration the update removed.
FAQ
Why does an MKV file fail even after I install the HEVC extension?
The HEVC extension supplies a video decoder, not a Matroska container reader, so Windows Media Player still cannot open the MKV wrapper. MKV support requires either a third-party player with built-in demuxing or conversion to MP4. The extension only helps when the same HEVC video sits inside an MP4. Confirm the container with MediaInfo before buying or installing anything.
Does Windows Media Player play FLAC files without extra software?
Yes, on Windows 10 and Windows 11 the platform media stack decodes FLAC and ALAC natively, so FLAC files open in Windows Media Player with no add-on. Older Windows versions and some legacy builds fail on FLAC. If a FLAC file errors on a current Windows machine, suspect a corrupt file rather than a missing codec.
Is the HEVC Video Extensions package always paid?
No. Microsoft publishes two listings: a paid HEVC Video Extensions package and a free "from Device Manufacturer" package that Microsoft restricts to devices whose maker pre-installed it. The paid listing's price varies by region and has changed over time. Check the current Store listing for both the price and the device restriction before installing.
Can I fix the error by changing the file extension?
No, and renaming an MKV to .mp4 makes playback worse because the player then trusts a container header that does not match the bytes. Extension changes never add a decoder. Use conversion through HandBrake when you need the file in a supported container, and leave the original untouched until the converted copy plays.
How long does converting a two-hour film to MP4 take?
On a mid-range four-core laptop, HandBrake re-encoding a two-hour 1080p film to H.264 at the Fast preset takes roughly 40 to 90 minutes. GPU hardware encoding on a recent Intel, AMD, or NVIDIA chip cuts that to about 10 to 25 minutes. File length, resolution, and preset are the three variables that set the time.
Why does the same file play in VLC but not Windows Media Player?
VLC bundles its own decoders for HEVC, AV1, MKV, DTS, and most other formats, while Windows Media Player relies on codecs registered in Windows. A file that plays in VLC and fails in Windows Media Player has a codec or container gap on your machine, not a damaged file. Install the matching Microsoft extension or convert the file.
Does resetting Windows Media Player delete my music library?
Reset returns the player to default settings and clears its library database and preferences, and it does not delete the media files themselves from disk. Repair is the gentler option and re-registers components without clearing the library. Try Repair before Reset, and note that neither option reinstalls the shared Media Foundation components.
What should I do if every video file now shows the same error?
Run the Video Playback troubleshooter in Windows Settings first, then Repair and Reset on the player, then sfc /scannow from an elevated Command Prompt to repair system media files. If all three fail, check whether the files sit on a sleeping external drive or an incomplete cloud sync, because unreadable storage produces the same message as a missing codec.