Why won't VLC media player play these MKV files?

I bought a new computer recently and I’ve been setting it up.

I have MKV files and I needed a program that would play them. I downloaded and installed VLC media player.

It generally works. But I have some MKV files that it won’t play. I get a message that tells me “Missing codec” and “This item was encoded in a format that’s not supported.” Sometimes it will play the sound but not the picture.

Do I need a different version of VLC? Do I need a different player? What’s a codec and can I get one? Is there some way I can tell the difference between the MKV files this program will play and those it won’t?

MKV is just a container file, the actual content can be any video format (i.e. any video compression type). The codec is the software that actually does the video compression/decompression, which isn’t necessarily part of the playback software (i.e it is an external software called by the playback software). I think if you open the file in VLC and go to Tools -> Codec Information, it will tell you what codec the file uses.

src4 is entirely correct. However, it’s quite rare to find a codec that VLC can’t play, especially when it is in a modern container like MKV (so it’s unlikely to be some old, esoteric format).

Assuming you have the latest version of VLC (3.0.7.1 Velinari as of this post), I would actually suspect the files have been corrupted in such a way that VLC can’t detect the codec properly. If you have any way of verifying the files or downloading a new, clean copy, I’d try that.

Or, apparently, there is a rash of fake videos out there, where the actual video content is an error message saying that you need to install a codec. These will usually mention some sort of URL, which, if you follow them, may open you up to malware.

VLC does not use external codecs. It supports all of its codecs out of the box. That’s actually one of the defining features.

Thanks for the info.
I didn’t realize that VLC contains all it’s codecs. Not externals required.

If you have Windows, install this.IIRC, that package doesn’t have h.265/HEVC, so also install this.

In addition to the VLC media/codec information window, running ffprobe in a terminal window will display technical info you can use to quickly diagnose such problems.

Thank you for the correction, I hadn’t realized this.

I’ve seen some mkvs recently with some weird H.264/AVC variant that makes my converters/editors go kablooey. But still VLC plays them.

One problem is that there’s always someone out there who does their own implementation of a codec or tries to “improve” things and incompatibility results.

Do you really need any of those just to play back, with VLC?

I can’t guarantee it will play 100% of files out of the box, but it will be interesting to discover which ones it can’t. Most legitimate files should decode smoothly.

Truth. VLC on Linux even plays back Windows Media Center .dvr-ms files, which I had given up hope of anything but WMC ever playing.

Vetinari. Versions of VLC are named after characters from the Discworld fantasy comedy etc novel series, such as Twoflower and now Vetinari.

I’ve always used the K-Lite codec pack and it comes with Media Player Classic as part of the pack. So far it plays everything unless I get a corrupted file. I only use VLC if a video stutters (hasn’t happened in a long time) but in general I really prefer MPC.

Note if the files that won’t play were not created by you be careful.

Everyone should make sure that they have updated to the latest version of VLC and codecs before trying to make things work.

Here his the CVE and note that a CVSS v3 score of 9.8 out of 10 which is really bad!

https://nvd.nist.gov/vuln/detail/CVE-2019-12874

Make sure you have VLC 3.0.7.1 or greater.

That CVE is overblown. The CVSS score is absolute nonsense. A score that high would indicate a situation where VLC could without any action by the user of the computer allow an attacker to take it over. That’s impossible in this case, as the user has to download a malicious video and open it with VLC. Furthermore, nobody has even demonstrated a working exploit of the vulnerability. It remains a theoretical vulnerability for the moment.

The bug was even fixed over a year ago. This makes itl a good example of why it’s important to keep your software up-to-date, especially if it ever interacts with the web or files that you’ve downloaded from the internet.

TL;DR: This was overhyped by the original finder of the vulnerability and the media, but definitely make sure that your VLC up-to-date.

Seconded! MPC has always worked much smoother than vlc for me.

I’ve used MPC forever–so long that I was suprised to see that it came out so recently as 2003.

BTW, if the files can be opened in MPC, it can tell you the codecs from a “properties” menu. Or you could try one of the programs listed on this page.
(Also, I realized why I thought I had been using MPC for so long–I remember that I used to always migrate the Windows Media Player that MPC is the “classic” of from one Windows version to the next even after Microsoft stopped supplying it–so I’ve been using something that looks like MPC since at least Windows 95, maybe even the Windows 3.1 version.)
(ETA: yep, been using the look since 1991)

My thanks to everyone for your explanations and advice, even if some of it was above my level of understanding.