Can MKV Files Have Hardcoded and Softcoded Subtitles?
Yes, an MKV (Matroska) video file can simultaneously contain both hardcoded and softcoded subtitles. This article explains how this coexistence works, the structural differences between these two subtitle formats within an MKV container, and how media players handle them during playback.
How Hardcoded and Softcoded Subtitles Coexist
To understand how an MKV file can hold both types of subtitles, it helps to understand how they are stored.
- Hardcoded subtitles (also known as “burned-in” or “hard” subs) are merged directly into the video frames during the video encoding process. They are part of the actual image data.
- Softcoded subtitles (or “soft” subs) are stored as separate, independent data tracks within the MKV container. These can be text-based formats (like SRT or ASS) or image-based formats (like PGS).
Because hardcoded subtitles are embedded into the video stream itself, the MKV container treats them simply as video. It does not recognize them as subtitle data. Therefore, you can easily mux (combine) one or more softcoded subtitle tracks into the same MKV file alongside that video stream.
Playback Behavior and Overlapping
When you play an MKV file containing both types of subtitles, the media player handles them in specific ways:
- Soft Subtitles Disabled: If you turn off subtitles in your media player, you will still see the hardcoded subtitles because they are physically part of the video.
- Soft Subtitles Enabled: If you enable a softcoded subtitle track, the player will render those subtitles on top of the video.
If both are active in the same language, they will overlay each other, often resulting in unreadable, overlapping text. However, if they are in different languages or serve different purposes, this setup can be highly functional.
Practical Use Cases
Having both subtitle types in a single MKV file is common in several scenarios:
- Forced Subtitles + Full Translation: A movie might have hardcoded “forced” subtitles to translate occasional foreign dialogue (e.g., an alien language in a sci-fi film). The MKV file can also include softcoded subtitle tracks for the entire movie’s dialogue in various languages.
- Multi-Language Accessibility: A video might have hardcoded subtitles in the creator’s native language for permanent accessibility, while softcoded tracks are added later to cater to international audiences.
- Karaoke or Commentary: Hardcoded text can be used for styling-heavy elements like karaoke lyrics, while softcoded tracks are reserved for standard dialogue translation or director commentaries.