Subtitles

Because Matroska is a general container format, we try to avoid specifying the formats to store in it. This type of work is really outside of the scope of a container-only format. However, because the use of subtitles in A/V containers has been so limited (with the exception of DVD) we are taking the time to specify how to store some of the more common subtitle formats in Matroska. This is being done to help facilitate their growth. Otherwise, incompatabilities could prevent the standardization and use of subtitle storage.

This page is not meant to be a complete listing of all subtitle formats that will be used in Matroska, it is only meant to be a guide for the more common, current formats. It is possible that we will add future formats to this page as they are created, but it is not likely as any other new subtitle format designer should have their own specifications. Any specification listed here should be strictly adhered to or it should not use the corresponding Codec ID.

Here is a list of pointers for storing subtitles in Matroska:

  • Any Matroska file containing only subtitles should use the extension ".mks".
  • As a general rule of thumb for all codecs, information that is global to an entire stream should be stored in the CodecPrivate element.
  • Start and stop timecodes that are used in a timecodes native storage format should be removed when being placed in Matroska as they could interfere if the file is edited afterwards. Instead, the Blocks timecode and Duration should be used to say when the timecode should be displayed.
  • Because a "subtitle" stream is actually just an overlay stream, anything with a transparency layer could be use, including video.