Format at a glance
- Full name
- Matroska Video Container
- File extensions
- .mkv
- MIME types
- video/x-matroska
- Category
- Video
- Compression
- Depends on the contained codec
- Transparency
- Not applicable
- Animation
- Not applicable
- Properties
- Multiple media tracks, Subtitles, Chapters
Suitable tools
What is this format?
Matroska is an open, extensible container format. The .mkv extension is commonly used when a Matroska file contains video; .mka is commonly used for audio-only Matroska.
A player must understand both the Matroska structure and every selected codec. Two MKV files can therefore behave differently even though their filename extensions are identical.
What is it used for?
- Video archives with multiple audio languages
- Subtitled films and series
- High-quality video with lossless audio
- Remuxing several synchronized media tracks without re-encoding them
Which programs can open it?
- VLC media player
- mpv
- Kodi
- FFmpeg and compatible media applications
Support across devices and browsers
VLC and mpv are dependable; system-player support depends on installed codecs.
VLC, mpv or IINA are commonly used because QuickTime support is limited.
VLC, mpv and GStreamer-based players usually support Matroska with available codecs.
VLC and compatible media players open many MKV combinations.
Third-party players such as VLC are normally required.
Native HTML video playback for MKV is inconsistent and depends on both container and codec support.
Advantages
- Can hold many synchronized video, audio and subtitle tracks
- Supports chapters, attachments and rich metadata
- Flexible choice of open and proprietary codecs
Disadvantages
- Not every player supports Matroska natively
- Codec support cannot be inferred from the .mkv extension
- Large multi-track files can consume significant memory during browser processing
Comparison with alternatives
MP4 has stronger device and browser compatibility; MKV is more flexible for multiple tracks and subtitles.
MOV is central to Apple and professional workflows; MKV is open and commonly used for distribution and archives.
WebM uses a narrower web-focused codec set; Matroska accepts a much broader range.
LocalFileLab support
The container is passed to FFmpeg/WASM, but the bundled decoder set is not enumerated per codec in the repository.
The codec table below lists the encoders actually configured for MKV output.
MKV is transcoded locally; it is not a simple container-only size reduction.
Browser playback depends on the contained codecs and native Matroska support.
Basic metadata mapping is configurable, but full preservation of attachments, chapters and stream metadata is not verified.
Container and codecs
The LocalFileLab statements below come from the FFmpeg/WASM and WebCodecs paths actually configured in the repository. Decoders or tracks not explicitly evidenced in code are marked unverified.
- Container
- Matroska / MKV
- Typical video codecs
- H.264 / AVC, H.265 / HEVC, VP9, AV1, MPEG-4 Part 2
- Typical audio codecs
- AAC, MP3, Opus, Vorbis, FLAC, AC-3, E-AC-3
| Codec | Type | Input | Output | Notes |
|---|---|---|---|---|
| H.264 / AVC | Video | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| H.265 / HEVC | Video | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. Playback may require a matching browser or system codec. |
| VP9 | Video | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| AV1 | Video | Unverified | Not supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. This codec is not offered as an output for this container. |
| MPEG-4 Part 2 | Video | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| AAC | Audio | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| MP3 | Audio | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| Opus | Audio | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| Vorbis | Audio | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| FLAC | Audio | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| AC-3 | Audio | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| E-AC-3 | Audio | Unverified | Supported | The project does not enumerate the FFmpeg/WASM input decoder per codec. A concrete FFmpeg/WASM encoder is configured in the repository. |
| Text and subtitle tracks | Subtitle | Unverified | Not supported | This track is not mapped explicitly during export. |
Tracks and metadata
- Subtitle tracks
- Unverified
- Multiple audio tracks
- Not supported
- Chapters
- Unverified
- Metadata
- Configurable
Known combinations
A concrete FFmpeg/WASM encoder is configured in the repository.
A concrete FFmpeg/WASM encoder is configured in the repository. Playback may require a matching browser or system codec.
A concrete FFmpeg/WASM encoder is configured in the repository.
This codec is not offered as an output for this container.
Related formats
Frequently asked questions
Is MKV a video codec?
No. MKV is a container. The video might use H.264, HEVC, VP9 or another codec, and the audio uses its own codec.
Why does one MKV play while another does not?
They can contain different codecs, profiles, bit depths or track types. The player may support the container but not a selected stream.
Does LocalFileLab preserve all MKV tracks?
No guarantee is made. The current paths process primary video and audio; multiple audio tracks, subtitles, attachments and chapters are not explicitly mapped.