Can You Store AV1 Video in MKV Files?
Yes, it is entirely possible and highly common to store AV1 video inside an MKV (Matroska) container. This article explores the compatibility between the AV1 video codec and the MKV container, explains why MKV is an ideal choice for housing AV1 streams, and outlines the standard tools you can use to combine or convert these files.
AV1 and MKV Compatibility
The AV1 video codec, developed by the Alliance for Open Media, is fully supported by the Matroska (MKV) container format. Matroska is designed to be highly extensible, meaning it can support virtually any video, audio, or subtitle codec. The official specification for mapping AV1 into Matroska was finalized shortly after the release of the AV1 codec, ensuring seamless compatibility and standard-compliant playback.
Why Use MKV for AV1?
While other containers like MP4 and WebM also support AV1, MKV offers several distinct advantages: * Broad Track Support: MKV can hold advanced audio formats (like FLAC, TrueHD, and DTS-HD) and multiple subtitle tracks (such as SRT, ASS, and PGS) alongside the AV1 video stream. * Open Source Ecosystem: Both AV1 and MKV are open-source and royalty-free, making them a perfect pairing for open-media standards. * Robust Features: MKV supports rich metadata, chapter markers, and multiple video/audio angles, which is ideal for high-definition movie archiving.
How to Put AV1 into an MKV Container
If you have a raw AV1 video stream, or an AV1 video currently stored in another container (like MP4) that you want to move into an MKV file, you can use several free tools:
- MKVToolNix: This is the standard graphical tool for multiplexing (muxing) files into MKV. You simply drag and drop your AV1 video file and any accompanying audio or subtitle files into the software, then click “Start multiplexing” to create the MKV file instantly without re-encoding.
- FFmpeg: For command-line users, FFmpeg can remux
AV1 into MKV without re-encoding the video, preserving the original
quality. Use the following command:
ffmpeg -i input_av1.mp4 -c copy output.mkv - HandBrake: If you need to transcode a video from a different format (like H.264 or HEVC) into AV1 and save it as an MKV, HandBrake supports AV1 encoding with MKV as the output container.
Most modern media players, including VLC, MPC-HC, and MPV, as well as modern operating systems, will play AV1-encoded videos stored inside MKV files without any additional configuration.