draft-ietf-cellar-codec-00.txt   draft-ietf-cellar-codec-01.txt 
cellar S. Lhomme cellar S. Lhomme
Internet-Draft Internet-Draft
Intended status: Standards Track M. Bunkus Intended status: Standards Track M. Bunkus
Expires: January 18, 2019 Expires: July 13, 2019
D. Rice D. Rice
July 17, 2018 January 9, 2019
Matroska Codec Matroska Codec
draft-ietf-cellar-codec-00 draft-ietf-cellar-codec-01
Abstract Abstract
This document defines the Matroska codec mappings, including the This document defines the Matroska codec mappings, including the
codec ID, layout of data in a "Block Element" and in an optional codec ID, layout of data in a "Block Element" and in an optional
"CodecPrivate Element". "CodecPrivate Element".
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
skipping to change at page 1, line 34 skipping to change at page 1, line 34
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 18, 2019. This Internet-Draft will expire on July 13, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Status of this document . . . . . . . . . . . . . . . . . . . 4 2. Status of this document . . . . . . . . . . . . . . . . . . . 4
3. Security Considerations . . . . . . . . . . . . . . . . . . . 4 3. Security Considerations . . . . . . . . . . . . . . . . . . . 5
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5
5. Notations and Conventions . . . . . . . . . . . . . . . . . . 4 5. Notations and Conventions . . . . . . . . . . . . . . . . . . 5
6. Codec Mappings . . . . . . . . . . . . . . . . . . . . . . . 5 6. Codec Mappings . . . . . . . . . . . . . . . . . . . . . . . 5
6.1. Defining Matroska Codec Support . . . . . . . . . . . . . 5 6.1. Defining Matroska Codec Support . . . . . . . . . . . . . 5
6.1.1. Codec ID . . . . . . . . . . . . . . . . . . . . . . 5 6.1.1. Codec ID . . . . . . . . . . . . . . . . . . . . . . 5
6.1.2. Codec Name . . . . . . . . . . . . . . . . . . . . . 6 6.1.2. Codec Name . . . . . . . . . . . . . . . . . . . . . 6
6.1.3. Description . . . . . . . . . . . . . . . . . . . . . 6 6.1.3. Description . . . . . . . . . . . . . . . . . . . . . 6
6.1.4. Initialisation . . . . . . . . . . . . . . . . . . . 6 6.1.4. Initialization . . . . . . . . . . . . . . . . . . . 6
6.1.5. Citation . . . . . . . . . . . . . . . . . . . . . . 6 6.1.5. Citation . . . . . . . . . . . . . . . . . . . . . . 7
6.1.6. Deprecation Date . . . . . . . . . . . . . . . . . . 7 6.1.6. Deprecation Date . . . . . . . . . . . . . . . . . . 7
6.1.7. Superseded By . . . . . . . . . . . . . . . . . . . . 7 6.1.7. Superseded By . . . . . . . . . . . . . . . . . . . . 7
6.2. Recommendations for the Creation of New Codec Mappings . 7 6.2. Recommendations for the Creation of New Codec Mappings . 7
6.3. Video Codec Mappings . . . . . . . . . . . . . . . . . . 7 6.3. Video Codec Mappings . . . . . . . . . . . . . . . . . . 8
6.3.1. V_MS/VFW/FOURCC . . . . . . . . . . . . . . . . . . . 7 6.3.1. V_MS/VFW/FOURCC . . . . . . . . . . . . . . . . . . . 8
6.3.2. V_UNCOMPRESSED . . . . . . . . . . . . . . . . . . . 8 6.3.2. V_UNCOMPRESSED . . . . . . . . . . . . . . . . . . . 8
6.3.3. V_MPEG4/ISO/SP . . . . . . . . . . . . . . . . . . . 8 6.3.3. V_MPEG4/ISO/SP . . . . . . . . . . . . . . . . . . . 8
6.3.4. V_MPEG4/ISO/ASP . . . . . . . . . . . . . . . . . . . 8 6.3.4. V_MPEG4/ISO/ASP . . . . . . . . . . . . . . . . . . . 9
6.3.5. V_MPEG4/ISO/AP . . . . . . . . . . . . . . . . . . . 9 6.3.5. V_MPEG4/ISO/AP . . . . . . . . . . . . . . . . . . . 9
6.3.6. V_MPEG4/MS/V3 . . . . . . . . . . . . . . . . . . . . 9 6.3.6. V_MPEG4/MS/V3 . . . . . . . . . . . . . . . . . . . . 9
6.3.7. V_MPEG1 . . . . . . . . . . . . . . . . . . . . . . . 9 6.3.7. V_MPEG1 . . . . . . . . . . . . . . . . . . . . . . . 9
6.3.8. V_MPEG2 . . . . . . . . . . . . . . . . . . . . . . . 9 6.3.8. V_MPEG2 . . . . . . . . . . . . . . . . . . . . . . . 10
6.3.9. V_REAL/RV10 . . . . . . . . . . . . . . . . . . . . . 10 6.3.9. V_REAL/RV10 . . . . . . . . . . . . . . . . . . . . . 10
6.3.10. V_REAL/RV20 . . . . . . . . . . . . . . . . . . . . . 10 6.3.10. V_REAL/RV20 . . . . . . . . . . . . . . . . . . . . . 10
6.3.11. V_REAL/RV30 . . . . . . . . . . . . . . . . . . . . . 10 6.3.11. V_REAL/RV30 . . . . . . . . . . . . . . . . . . . . . 11
6.3.12. V_REAL/RV40 . . . . . . . . . . . . . . . . . . . . . 10 6.3.12. V_REAL/RV40 . . . . . . . . . . . . . . . . . . . . . 11
6.3.13. V_QUICKTIME . . . . . . . . . . . . . . . . . . . . . 11 6.3.13. V_QUICKTIME . . . . . . . . . . . . . . . . . . . . . 11
6.3.14. V_THEORA . . . . . . . . . . . . . . . . . . . . . . 11 6.3.14. V_THEORA . . . . . . . . . . . . . . . . . . . . . . 11
6.3.15. V_PRORES . . . . . . . . . . . . . . . . . . . . . . 12 6.3.15. V_PRORES . . . . . . . . . . . . . . . . . . . . . . 12
6.3.16. V_VP8 . . . . . . . . . . . . . . . . . . . . . . . . 12 6.3.16. V_VP8 . . . . . . . . . . . . . . . . . . . . . . . . 12
6.3.17. V_VP9 . . . . . . . . . . . . . . . . . . . . . . . . 12 6.3.17. V_VP9 . . . . . . . . . . . . . . . . . . . . . . . . 13
6.3.18. V_FFV1 . . . . . . . . . . . . . . . . . . . . . . . 13 6.3.18. V_FFV1 . . . . . . . . . . . . . . . . . . . . . . . 13
6.4. Audio Codec Mappings . . . . . . . . . . . . . . . . . . 13 6.4. Audio Codec Mappings . . . . . . . . . . . . . . . . . . 13
6.4.1. A_MPEG/L3 . . . . . . . . . . . . . . . . . . . . . . 13 6.4.1. A_MPEG/L3 . . . . . . . . . . . . . . . . . . . . . . 13
6.4.2. A_MPEG/L2 . . . . . . . . . . . . . . . . . . . . . . 13 6.4.2. A_MPEG/L2 . . . . . . . . . . . . . . . . . . . . . . 14
6.4.3. A_MPEG/L1 . . . . . . . . . . . . . . . . . . . . . . 14 6.4.3. A_MPEG/L1 . . . . . . . . . . . . . . . . . . . . . . 14
6.4.4. A_PCM/INT/BIG . . . . . . . . . . . . . . . . . . . . 14 6.4.4. A_PCM/INT/BIG . . . . . . . . . . . . . . . . . . . . 14
6.4.5. A_PCM/INT/LIT . . . . . . . . . . . . . . . . . . . . 14 6.4.5. A_PCM/INT/LIT . . . . . . . . . . . . . . . . . . . . 14
6.4.6. A_PCM/FLOAT/IEEE . . . . . . . . . . . . . . . . . . 14 6.4.6. A_PCM/FLOAT/IEEE . . . . . . . . . . . . . . . . . . 15
6.4.7. A_MPC . . . . . . . . . . . . . . . . . . . . . . . . 15 6.4.7. A_MPC . . . . . . . . . . . . . . . . . . . . . . . . 15
6.4.8. A_AC3 . . . . . . . . . . . . . . . . . . . . . . . . 15 6.4.8. A_AC3 . . . . . . . . . . . . . . . . . . . . . . . . 15
6.4.9. A_AC3/BSID9 . . . . . . . . . . . . . . . . . . . . . 15 6.4.9. A_AC3/BSID9 . . . . . . . . . . . . . . . . . . . . . 15
6.4.10. A_AC3/BSID10 . . . . . . . . . . . . . . . . . . . . 15 6.4.10. A_AC3/BSID10 . . . . . . . . . . . . . . . . . . . . 16
6.4.11. A_ALAC . . . . . . . . . . . . . . . . . . . . . . . 16 6.4.11. A_ALAC . . . . . . . . . . . . . . . . . . . . . . . 16
6.4.12. A_DTS . . . . . . . . . . . . . . . . . . . . . . . . 16 6.4.12. A_DTS . . . . . . . . . . . . . . . . . . . . . . . . 16
6.4.13. A_DTS/EXPRESS . . . . . . . . . . . . . . . . . . . . 16 6.4.13. A_DTS/EXPRESS . . . . . . . . . . . . . . . . . . . . 17
6.4.14. A_DTS/LOSSLESS . . . . . . . . . . . . . . . . . . . 17 6.4.14. A_DTS/LOSSLESS . . . . . . . . . . . . . . . . . . . 17
6.4.15. A_VORBIS . . . . . . . . . . . . . . . . . . . . . . 17 6.4.15. A_VORBIS . . . . . . . . . . . . . . . . . . . . . . 17
6.4.16. A_FLAC . . . . . . . . . . . . . . . . . . . . . . . 17 6.4.16. A_FLAC . . . . . . . . . . . . . . . . . . . . . . . 17
6.4.17. A_REAL/14_4 . . . . . . . . . . . . . . . . . . . . . 17 6.4.17. A_REAL/14_4 . . . . . . . . . . . . . . . . . . . . . 18
6.4.18. A_REAL/28_8 . . . . . . . . . . . . . . . . . . . . . 18 6.4.18. A_REAL/28_8 . . . . . . . . . . . . . . . . . . . . . 18
6.4.19. A_REAL/COOK . . . . . . . . . . . . . . . . . . . . . 18 6.4.19. A_REAL/COOK . . . . . . . . . . . . . . . . . . . . . 18
6.4.20. A_REAL/SIPR . . . . . . . . . . . . . . . . . . . . . 18 6.4.20. A_REAL/SIPR . . . . . . . . . . . . . . . . . . . . . 18
6.4.21. A_REAL/RALF . . . . . . . . . . . . . . . . . . . . . 18 6.4.21. A_REAL/RALF . . . . . . . . . . . . . . . . . . . . . 19
6.4.22. A_REAL/ATRC . . . . . . . . . . . . . . . . . . . . . 19 6.4.22. A_REAL/ATRC . . . . . . . . . . . . . . . . . . . . . 19
6.4.23. A_MS/ACM . . . . . . . . . . . . . . . . . . . . . . 19 6.4.23. A_MS/ACM . . . . . . . . . . . . . . . . . . . . . . 19
6.4.24. A_AAC/MPEG2/MAIN . . . . . . . . . . . . . . . . . . 19 6.4.24. A_AAC/MPEG2/MAIN . . . . . . . . . . . . . . . . . . 19
6.4.25. A_AAC/MPEG2/LC . . . . . . . . . . . . . . . . . . . 19 6.4.25. A_AAC/MPEG2/LC . . . . . . . . . . . . . . . . . . . 20
6.4.26. A_AAC/MPEG2/LC/SBR . . . . . . . . . . . . . . . . . 20 6.4.26. A_AAC/MPEG2/LC/SBR . . . . . . . . . . . . . . . . . 20
6.4.27. A_AAC/MPEG2/SSR . . . . . . . . . . . . . . . . . . . 20 6.4.27. A_AAC/MPEG2/SSR . . . . . . . . . . . . . . . . . . . 20
6.4.28. A_AAC/MPEG4/MAIN . . . . . . . . . . . . . . . . . . 20 6.4.28. A_AAC/MPEG4/MAIN . . . . . . . . . . . . . . . . . . 20
6.4.29. A_AAC/MPEG4/LC . . . . . . . . . . . . . . . . . . . 20 6.4.29. A_AAC/MPEG4/LC . . . . . . . . . . . . . . . . . . . 21
6.4.30. A_AAC/MPEG4/LC/SBR . . . . . . . . . . . . . . . . . 21 6.4.30. A_AAC/MPEG4/LC/SBR . . . . . . . . . . . . . . . . . 21
6.4.31. A_AAC/MPEG4/SSR . . . . . . . . . . . . . . . . . . . 21 6.4.31. A_AAC/MPEG4/SSR . . . . . . . . . . . . . . . . . . . 21
6.4.32. A_AAC/MPEG4/LTP . . . . . . . . . . . . . . . . . . . 21 6.4.32. A_AAC/MPEG4/LTP . . . . . . . . . . . . . . . . . . . 22
6.4.33. A_QUICKTIME . . . . . . . . . . . . . . . . . . . . . 22 6.4.33. A_QUICKTIME . . . . . . . . . . . . . . . . . . . . . 22
6.4.34. A_QUICKTIME/QDMC . . . . . . . . . . . . . . . . . . 22 6.4.34. A_QUICKTIME/QDMC . . . . . . . . . . . . . . . . . . 22
6.4.35. A_QUICKTIME/QDM2 . . . . . . . . . . . . . . . . . . 22 6.4.35. A_QUICKTIME/QDM2 . . . . . . . . . . . . . . . . . . 23
6.4.36. A_TTA1 . . . . . . . . . . . . . . . . . . . . . . . 23 6.4.36. A_TTA1 . . . . . . . . . . . . . . . . . . . . . . . 23
6.4.37. A_WAVPACK4 . . . . . . . . . . . . . . . . . . . . . 23 6.4.37. A_WAVPACK4 . . . . . . . . . . . . . . . . . . . . . 23
6.5. Subtitle Codec Mappings . . . . . . . . . . . . . . . . . 23 6.5. Subtitle Codec Mappings . . . . . . . . . . . . . . . . . 23
6.5.1. S_TEXT/UTF8 . . . . . . . . . . . . . . . . . . . . . 23 6.5.1. S_TEXT/UTF8 . . . . . . . . . . . . . . . . . . . . . 24
6.5.2. S_TEXT/SSA . . . . . . . . . . . . . . . . . . . . . 23 6.5.2. S_TEXT/SSA . . . . . . . . . . . . . . . . . . . . . 24
6.5.3. S_TEXT/ASS . . . . . . . . . . . . . . . . . . . . . 24 6.5.3. S_TEXT/ASS . . . . . . . . . . . . . . . . . . . . . 24
6.5.4. S_TEXT/USF . . . . . . . . . . . . . . . . . . . . . 24 6.5.4. S_TEXT/USF . . . . . . . . . . . . . . . . . . . . . 24
6.5.5. S_TEXT/WEBVTT . . . . . . . . . . . . . . . . . . . . 24 6.5.5. S_TEXT/WEBVTT . . . . . . . . . . . . . . . . . . . . 24
6.5.6. S_IMAGE/BMP . . . . . . . . . . . . . . . . . . . . . 24 6.5.6. S_IMAGE/BMP . . . . . . . . . . . . . . . . . . . . . 25
6.5.7. S_DVBSUB . . . . . . . . . . . . . . . . . . . . . . 24 6.5.7. S_DVBSUB . . . . . . . . . . . . . . . . . . . . . . 25
6.5.8. S_VOBSUB . . . . . . . . . . . . . . . . . . . . . . 25 6.5.8. S_VOBSUB . . . . . . . . . . . . . . . . . . . . . . 25
6.5.9. S_HDMV/PGS . . . . . . . . . . . . . . . . . . . . . 25 6.5.9. S_HDMV/PGS . . . . . . . . . . . . . . . . . . . . . 26
6.5.10. S_HDMV/TEXTST . . . . . . . . . . . . . . . . . . . . 25 6.5.10. S_HDMV/TEXTST . . . . . . . . . . . . . . . . . . . . 26
6.5.11. S_KATE . . . . . . . . . . . . . . . . . . . . . . . 26 6.5.11. S_KATE . . . . . . . . . . . . . . . . . . . . . . . 26
6.6. Button Codec Mappings . . . . . . . . . . . . . . . . . . 26 6.6. Button Codec Mappings . . . . . . . . . . . . . . . . . . 26
6.6.1. B_VOBBTN . . . . . . . . . . . . . . . . . . . . . . 26 6.6.1. B_VOBBTN . . . . . . . . . . . . . . . . . . . . . . 26
7. Subtitles . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7. Subtitles . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.1. Images Subtitles . . . . . . . . . . . . . . . . . . . . 27 7.1. Images Subtitles . . . . . . . . . . . . . . . . . . . . 27
7.2. SRT Subtitles . . . . . . . . . . . . . . . . . . . . . . 30 7.2. SRT Subtitles . . . . . . . . . . . . . . . . . . . . . . 30
7.3. SSA/ASS Subtitles . . . . . . . . . . . . . . . . . . . . 30 7.3. SSA/ASS Subtitles . . . . . . . . . . . . . . . . . . . . 31
7.4. USF Subtitles . . . . . . . . . . . . . . . . . . . . . . 33 7.4. USF Subtitles . . . . . . . . . . . . . . . . . . . . . . 34
7.5. WebVTT . . . . . . . . . . . . . . . . . . . . . . . . . 33 7.5. WebVTT . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.5.1. Storage of WebVTT in Matroska . . . . . . . . . . . . 34 7.5.1. Storage of WebVTT in Matroska . . . . . . . . . . . . 35
7.5.2. Examples of transformation . . . . . . . . . . . . . 35 7.5.1.1. CodecID: codec identification . . . . . . . . . . 35
7.5.3. Storage of WebVTT in Matroska vs. WebM . . . . . . . 38 7.5.1.2. CodecPrivate: storage of global WebVTT blocks . . 35
7.6. HDMV presentation graphics subtitles . . . . . . . . . . 39 7.5.1.3. Storage of non-global WebVTT blocks . . . . . . . 35
7.6.1. Storage of HDMV presentation graphics subtitles . . . 39 7.5.1.4. Storage of Cues in Matroska blocks . . . . . . . 35
7.7. HDMV text subtitles . . . . . . . . . . . . . . . . . . . 39 7.5.1.5. BlockAdditions: storing non-global WebVTT blocks,
Cue Settings Lists and Cue identifiers . . . . . 35
7.5.2. Examples of transformation . . . . . . . . . . . . . 36
7.5.2.1. Example WebVTT file . . . . . . . . . . . . . . . 36
7.5.2.2. Example of CodecPrivate . . . . . . . . . . . . . 38
7.5.2.3. Storage of Cue 1 . . . . . . . . . . . . . . . . 38
7.5.2.4. Storage of Cue 2 . . . . . . . . . . . . . . . . 39
7.5.2.5. Storage of Cue 3 . . . . . . . . . . . . . . . . 39
7.5.2.6. Storage of Cue 4 . . . . . . . . . . . . . . . . 39
7.5.3. Storage of WebVTT in Matroska vs. WebM . . . . . . . 39
7.6. HDMV presentation graphics subtitles . . . . . . . . . . 40
7.6.1. Storage of HDMV presentation graphics subtitles . . . 40
7.6.1.1. Storage of HDMV PGS Segments in Matroska Blocks . 40
7.7. HDMV text subtitles . . . . . . . . . . . . . . . . . . . 40
7.7.1. Storage of HDMV text subtitles . . . . . . . . . . . 40 7.7.1. Storage of HDMV text subtitles . . . . . . . . . . . 40
7.8. Digital Video Broadcasting (DVB) subtitles . . . . . . . 40 7.7.1.1. Storage of HDMV TextST Dialog Presentation
7.8.1. Storage of DVB subtitles . . . . . . . . . . . . . . 41 Segments in Matroska Blocks . . . . . . . . . . . 41
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 41 7.7.1.2. Character set . . . . . . . . . . . . . . . . . . 41
8.1. Normative References . . . . . . . . . . . . . . . . . . 41 7.8. Digital Video Broadcasting (DVB) subtitles . . . . . . . 41
8.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 42 7.8.1. Storage of DVB subtitles . . . . . . . . . . . . . . 42
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 44 7.8.1.1. CodecID . . . . . . . . . . . . . . . . . . . . . 42
7.8.1.2. CodecPrivate . . . . . . . . . . . . . . . . . . 42
7.8.1.3. Storage of DVB subtitles in Matroska Blocks . . . 42
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 42
8.1. Normative References . . . . . . . . . . . . . . . . . . 42
8.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 45
1. Introduction 1. Introduction
Matroska aims to become THE standard of multimedia container formats. Matroska aims to become THE standard of multimedia container formats.
It stores interleaved and timestamped audio/video/subtitle data using It stores interleaved and timestamped audio/video/subtitle data using
various codecs. To interpret the codec data, a mapping between the various codecs. To interpret the codec data, a mapping between the
way the data is stored in Matroska and how it is understood by such a way the data is stored in Matroska and how it is understood by such a
codec is necessary. codec is necessary.
This document intends to define this mapping for many commonly used This document intends to define this mapping for many commonly used
skipping to change at page 5, line 8 skipping to change at page 5, line 23
5. Notations and Conventions 5. Notations and Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [2]. document are to be interpreted as described in RFC 2119 [2].
6. Codec Mappings 6. Codec Mappings
A "Codec Mapping" is a set of attributes to identify, name, and A "Codec Mapping" is a set of attributes to identify, name, and
contextualise the format and characteristics of encoded data that can contextualize the format and characteristics of encoded data that can
be contained within Matroska Clusters. be contained within Matroska Clusters.
Each TrackEntry used within Matroska MUST reference a defined "Codec Each TrackEntry used within Matroska MUST reference a defined "Codec
Mapping" using the "Codec ID" to identify and describe the format of Mapping" using the "Codec ID" to identify and describe the format of
the encoded data in its associated Clusters. This "Codec ID" is a the encoded data in its associated Clusters. This "Codec ID" is a
unique registered identifier that represents the encoding stored unique registered identifier that represents the encoding stored
within the Track. Certain encodings MAY also require some form of within the Track. Certain encodings MAY also require some form of
codec initialisation in order to provide its decoder with context and codec initialization in order to provide its decoder with context and
technical metadata. technical metadata.
The intention behind this list is not to list all existing audio and The intention behind this list is not to list all existing audio and
video codecs, but rather to list those codecs that are currently video codecs, but rather to list those codecs that are currently
supported in Matroska and therefore need a well defined "Codec ID" so supported in Matroska and therefore need a well defined "Codec ID" so
that all developers supporting Matroska will use the same "Codec ID". that all developers supporting Matroska will use the same "Codec ID".
If you feel we missed support for a very important codec, please tell If you feel we missed support for a very important codec, please tell
us on our development mailing list (cellar at ietf.org). us on our development mailing list (cellar at ietf.org).
6.1. Defining Matroska Codec Support 6.1. Defining Matroska Codec Support
skipping to change at page 6, line 32 skipping to change at page 6, line 47
6.1.2. Codec Name 6.1.2. Codec Name
Each encoding supported for storage in Matroska MUST have a "Codec Each encoding supported for storage in Matroska MUST have a "Codec
Name". The "Codec Name" provides a readable label for the encoding. Name". The "Codec Name" provides a readable label for the encoding.
6.1.3. Description 6.1.3. Description
An optional description for the encoding. This value is only An optional description for the encoding. This value is only
intended for human consumption. intended for human consumption.
6.1.4. Initialisation 6.1.4. Initialization
Each encoding supported for storage in Matroska MUST have a defined Each encoding supported for storage in Matroska MUST have a defined
Initialisation. The Initialisation MUST describe the storage of data Initialization. The Initialization MUST describe the storage of data
necessary to initialise the decoder, which MUST be stored within the necessary to initialize the decoder, which MUST be stored within the
"CodecPrivate Element". When the Initialisation is updated within a "CodecPrivate Element". When the Initialization is updated within a
track then that updated Initialisation data MUST be written into the track then that updated Initialization data MUST be written into the
"CodecState Element" of the first "Cluster" to require it. If the "CodecState Element" of the first "Cluster" to require it. If the
encoding does not require any form of Initialisation then "none" MUST encoding does not require any form of Initialization then "none" MUST
be used to define the Initialisation and the "CodecPrivate Element" be used to define the Initialization and the "CodecPrivate Element"
SHOULD NOT be written and MUST be ignored. Data that is defined SHOULD NOT be written and MUST be ignored. Data that is defined
Initialisation to be stored in the "CodecPrivate Element" is known as Initialization to be stored in the "CodecPrivate Element" is known as
"Private Data". "Private Data".
6.1.5. Citation 6.1.5. Citation
Documentation of the associated normative and informative references Documentation of the associated normative and informative references
for the codec is RECOMMENDED. for the codec is RECOMMENDED.
6.1.6. Deprecation Date 6.1.6. Deprecation Date
A timestamp, expressed in [RFC3339] that notes when support for the A timestamp, expressed in [RFC3339] that notes when support for the
skipping to change at page 7, line 26 skipping to change at page 7, line 38
if it has an expressed "Deprecation Date". If used, the "Superseded if it has an expressed "Deprecation Date". If used, the "Superseded
By" value MUST store the "Codec ID" of another "Codec Mapping" that By" value MUST store the "Codec ID" of another "Codec Mapping" that
has superseded the "Codec Mapping". has superseded the "Codec Mapping".
6.2. Recommendations for the Creation of New Codec Mappings 6.2. Recommendations for the Creation of New Codec Mappings
Creators of new "Codec Mappings" to be used in the context of Creators of new "Codec Mappings" to be used in the context of
Matroska: Matroska:
o SHOULD assume that all "Codec Mappings" they create might become o SHOULD assume that all "Codec Mappings" they create might become
standardised, public, commonly deployed, or usable across multiple standardized, public, commonly deployed, or usable across multiple
implementations. implementations.
o SHOULD employ meaningful values for "Codec ID" and "Codec Name" o SHOULD employ meaningful values for "Codec ID" and "Codec Name"
that they have reason to believe are currently unused. that they have reason to believe are currently unused.
o SHOULD NOT prefix their "Codec ID" with "X_" or similar o SHOULD NOT prefix their "Codec ID" with "X_" or similar
constructs. constructs.
These recommendations are based upon Section 3 of [RFC6648]. These recommendations are based upon Section 3 of [RFC6648].
skipping to change at page 7, line 51 skipping to change at page 8, line 19
Codec ID: "V_MS/VFW/FOURCC" Codec ID: "V_MS/VFW/FOURCC"
Codec Name: Microsoft (TM) Video Codec Manager (VCM) Codec Name: Microsoft (TM) Video Codec Manager (VCM)
Description: The private data contains the VCM structure Description: The private data contains the VCM structure
BITMAPINFOHEADER including the extra private bytes, as defined by BITMAPINFOHEADER including the extra private bytes, as defined by
Microsoft [3]. The data are stored in little endian format (like on Microsoft [3]. The data are stored in little endian format (like on
IA32 machines). Where is the Huffman table stored in HuffYUV, not IA32 machines). Where is the Huffman table stored in HuffYUV, not
AVISTREAMINFO ??? And the FourCC, not in AVISTREAMINFO.fccHandler ??? AVISTREAMINFO ??? And the FourCC, not in AVISTREAMINFO.fccHandler ???
Initialisation: "Private Data" contains the VCM structure Initialization: "Private Data" contains the VCM structure
BITMAPINFOHEADER including the extra private bytes, as defined by BITMAPINFOHEADER including the extra private bytes, as defined by
Microsoft in <https://msdn.microsoft.com/en- Microsoft in <https://msdn.microsoft.com/en-
us/library/windows/desktop/dd183376(v=vs.85).aspx>. us/library/windows/desktop/dd183376(v=vs.85).aspx>.
Citation: <https://msdn.microsoft.com/en-us/library/windows/desktop/ Citation: <https://msdn.microsoft.com/en-us/library/windows/desktop/
dd183376(v=vs.85).aspx> dd183376(v=vs.85).aspx>
6.3.2. V_UNCOMPRESSED 6.3.2. V_UNCOMPRESSED
Codec ID: V_UNCOMPRESSED Codec ID: V_UNCOMPRESSED
Codec Name: Video, raw uncompressed video frames Codec Name: Video, raw uncompressed video frames
Description: All details about the used colour specs and bit depth Description: All details about the used color specs and bit depth are
are to be put/read from the KaxCodecColourSpace elements. to be put/read from the KaxCodecColourSpace elements.
Initialisation: none Initialization: none
6.3.3. V_MPEG4/ISO/SP 6.3.3. V_MPEG4/ISO/SP
Codec ID: V_MPEG4/ISO/SP Codec ID: V_MPEG4/ISO/SP
Codec Name: MPEG4 ISO simple profile (DivX4) Codec Name: MPEG4 ISO simple profile (DivX4)
Description: Stream was created via improved codec API (UCI) or even Description: Stream was created via improved codec API (UCI) or even
transmuxed from AVI (no b-frames in Simple Profile), frame order is transmuxed from AVI (no b-frames in Simple Profile), frame order is
coding order. coding order.
Initialisation: none Initialization: none
6.3.4. V_MPEG4/ISO/ASP 6.3.4. V_MPEG4/ISO/ASP
Codec ID: V_MPEG4/ISO/ASP Codec ID: V_MPEG4/ISO/ASP
Codec Name: MPEG4 ISO advanced simple profile (DivX5, XviD, FFMPEG) Codec Name: MPEG4 ISO advanced simple profile (DivX5, XviD, FFMPEG)
Description: Stream was created via improved codec API (UCI) or Description: Stream was created via improved codec API (UCI) or
transmuxed from MP4, not simply transmuxed from AVI. Note there are transmuxed from MP4, not simply transmuxed from AVI. Note there are
differences how b-frames are handled in these native streams, when differences how b-frames are handled in these native streams, when
being compared to a VfW created stream, as here there are "no" dummy being compared to a VfW created stream, as here there are "no" dummy
frames inserted, the frame order is exactly the same as the coding frames inserted, the frame order is exactly the same as the coding
order, same as in MP4 streams. order, same as in MP4 streams.
Initialisation: none Initialization: none
6.3.5. V_MPEG4/ISO/AP 6.3.5. V_MPEG4/ISO/AP
Codec ID: V_MPEG4/ISO/AP Codec ID: V_MPEG4/ISO/AP
Codec Name: MPEG4 ISO advanced profile Codec Name: MPEG4 ISO advanced profile
Description: Stream was created via improved codec API (UCI) or Description: Stream was created via improved codec API (UCI) or
transmuxed from MP4, not simply transmuxed from AVI. Note there are transmuxed from MP4, not simply transmuxed from AVI. Note there are
differences how b-frames are handled in these native streams, when differences how b-frames are handled in these native streams, when
being compared to a VfW created stream, as here there are "no" dummy being compared to a VfW created stream, as here there are "no" dummy
frames inserted, the frame order is exactly the same as the coding frames inserted, the frame order is exactly the same as the coding
order, same as in MP4 streams. order, same as in MP4 streams.
Initialisation: none Initialization: none
6.3.6. V_MPEG4/MS/V3 6.3.6. V_MPEG4/MS/V3
Codec ID: V_MPEG4/MS/V3 Codec ID: V_MPEG4/MS/V3
Codec Name: Microsoft (TM) MPEG4 V3 Codec Name: Microsoft (TM) MPEG4 V3
Description: Microsoft (TM) MPEG4 V3 and derivates, means DivX3, Description: Microsoft (TM) MPEG4 V3 and derivates, means DivX3,
Angelpotion, SMR, etc.; stream was created using VfW codec or Angelpotion, SMR, etc.; stream was created using VfW codec or
transmuxed from AVI; note that V1/V2 are covered in VfW compatibility transmuxed from AVI; note that V1/V2 are covered in VfW compatibility
mode. mode.
Initialisation: none Initialization: none
6.3.7. V_MPEG1 6.3.7. V_MPEG1
Codec ID: V_MPEG1 Codec ID: V_MPEG1
Codec Name: MPEG 1 Codec Name: MPEG 1
Description: The Matroska video stream will contain a demuxed Description: The Matroska video stream will contain a demuxed
Elementary Stream (ES), where block boundaries are still to be Elementary Stream (ES), where block boundaries are still to be
defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those
files, and to compare the results with self-made implementations files, and to compare the results with self-made implementations
Initialisation: none Initialization: none
6.3.8. V_MPEG2 6.3.8. V_MPEG2
Codec ID: V_MPEG2 Codec ID: V_MPEG2
Codec Name: MPEG 2 Codec Name: MPEG 2
Description: The Matroska video stream will contain a demuxed Description: The Matroska video stream will contain a demuxed
Elementary Stream (ES), where block boundaries are still to be Elementary Stream (ES), where block boundaries are still to be
defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those defined. Its RECOMMENDED to use MPEG2MKV.exe for creating those
files, and to compare the results with self-made implementations files, and to compare the results with self-made implementations
Initialisation: none Initialization: none
6.3.9. V_REAL/RV10 6.3.9. V_REAL/RV10
Codec ID: V_REAL/RV10 Codec ID: V_REAL/RV10
Codec Name: RealVideo 1.0 aka RealVideo 5 Codec Name: RealVideo 1.0 aka RealVideo 5
Description: Individual slices from the Real container are combined Description: Individual slices from the Real container are combined
into a single frame. into a single frame.
Initialisation: The "Private Data" contains a "real_video_props_t" Initialization: The "Private Data" contains a "real_video_props_t"
structure in Big Endian byte order as found in librmff [4]. structure in Big Endian byte order as found in librmff [4].
6.3.10. V_REAL/RV20 6.3.10. V_REAL/RV20
Codec ID: V_REAL/RV20 Codec ID: V_REAL/RV20
Codec Name: RealVideo G2 and RealVideo G2+SVT Codec Name: RealVideo G2 and RealVideo G2+SVT
Description: Individual slices from the Real container are combined Description: Individual slices from the Real container are combined
into a single frame. into a single frame.
Initialisation: The "Private Data" contains a "real_video_props_t" Initialization: The "Private Data" contains a "real_video_props_t"
structure in Big Endian byte order as found in librmff [5]. structure in Big Endian byte order as found in librmff [5].
6.3.11. V_REAL/RV30 6.3.11. V_REAL/RV30
Codec ID: V_REAL/RV30 Codec ID: V_REAL/RV30
Codec Name: RealVideo 8 Codec Name: RealVideo 8
Description: Individual slices from the Real container are combined Description: Individual slices from the Real container are combined
into a single frame. into a single frame.
Initialisation: The "Private Data" contains a "real_video_props_t" Initialization: The "Private Data" contains a "real_video_props_t"
structure in Big Endian byte order as found in librmff [6]. structure in Big Endian byte order as found in librmff [6].
6.3.12. V_REAL/RV40 6.3.12. V_REAL/RV40
Codec ID: V_REAL/RV40 Codec ID: V_REAL/RV40
Codec Name: rv40 : RealVideo 9 Codec Name: rv40 : RealVideo 9
Description: Individual slices from the Real container are combined Description: Individual slices from the Real container are combined
into a single frame. into a single frame.
Initialisation: The "Private Data" contains a "real_video_props_t" Initialization: The "Private Data" contains a "real_video_props_t"
structure in Big Endian byte order as found in librmff [7]. structure in Big Endian byte order as found in librmff [7].
6.3.13. V_QUICKTIME 6.3.13. V_QUICKTIME
Codec ID: V_QUICKTIME Codec ID: V_QUICKTIME
Codec Name: Video taken from QuickTime(TM) files Codec Name: Video taken from QuickTime(TM) files
Description: Several codecs as stored in QuickTime, e.g. Sorenson or Description: Several codecs as stored in QuickTime, e.g. Sorenson or
Cinepak. Cinepak.
Initialisation: The "Private Data" contains all additional data that Initialization: The "Private Data" contains all additional data that
is stored in the 'stsd' (sample description) atom in the QuickTime is stored in the 'stsd' (sample description) atom in the QuickTime
file *after* the mandatory video descriptor structure (starting with file *after* the mandatory video descriptor structure (starting with
the size and FourCC fields). For an explanation of the QuickTime the size and FourCC fields). For an explanation of the QuickTime
file format read QuickTime File Format Specification [8]. file format read QuickTime File Format Specification [8].
6.3.14. V_THEORA 6.3.14. V_THEORA
Codec ID: V_THEORA Codec ID: V_THEORA
Codec Name: Theora Codec Name: Theora
Initialisation: The "Private Data" contains the first three Theora Initialization: The "Private Data" contains the first three Theora
packets in order. The lengths of the packets precedes them. The packets in order. The lengths of the packets precedes them. The
actual layout is: actual layout is:
o Byte 1: number of distinct packets '"#p"' minus one inside the o Byte 1: number of distinct packets '"#p"' minus one inside the
CodecPrivate block. This MUST be '2' for current (as of CodecPrivate block. This MUST be '2' for current (as of
2016-07-08) Theora headers. 2016-07-08) Theora headers.
o Bytes 2..n: lengths of the first '"#p"' packets, coded in Xiph- o Bytes 2..n: lengths of the first '"#p"' packets, coded in Xiph-
style lacing. The length of the last packet is the length of the style lacing. The length of the last packet is the length of the
CodecPrivate block minus the lengths coded in these bytes minus CodecPrivate block minus the lengths coded in these bytes minus
skipping to change at page 12, line 11 skipping to change at page 12, line 24
o Bytes n+1..: The Theora identification header, followed by the o Bytes n+1..: The Theora identification header, followed by the
commend header followed by the codec setup header. Those are commend header followed by the codec setup header. Those are
described in the Theora specs [9]. described in the Theora specs [9].
6.3.15. V_PRORES 6.3.15. V_PRORES
Codec ID: V_PRORES Codec ID: V_PRORES
Codec Name: Apple ProRes Codec Name: Apple ProRes
Initialisation: The "Private Data" contains the FourCC as found in Initialization: The "Private Data" contains the FourCC as found in
MP4 movies: MP4 movies:
o ap4x: ProRes 4444 XQ o ap4x: ProRes 4444 XQ
o ap4h: ProRes 4444 o ap4h: ProRes 4444
o apch: ProRes 422 High Quality o apch: ProRes 422 High Quality
o apcn: ProRes 422 Standard Definition o apcn: ProRes 422 Standard Definition
o apcs: ProRes 422 LT o apcs: ProRes 422 LT
o apco: ProRes 422 Proxy o apco: ProRes 422 Proxy
o aprh: ProRes RAW High Quality
o aprn: ProRes RAW Standard Definition
this page for more technical details on ProRes [10] this page for more technical details on ProRes [10]
6.3.16. V_VP8 6.3.16. V_VP8
Codec ID: V_VP8 Codec ID: V_VP8
Codec Name: VP8 Codec format Codec Name: VP8 Codec format
Description: VP8 is an open and royalty free video compression format Description: VP8 is an open and royalty free video compression format
developed by Google and created by On2 Technologies as a successor to developed by Google and created by On2 Technologies as a successor to
VP7. [RFC6386] VP7. [RFC6386]
Initialisation: none Initialization: none
6.3.17. V_VP9 6.3.17. V_VP9
Codec ID: V_VP9 Codec ID: V_VP9
Codec Name: VP9 Codec format Codec Name: VP9 Codec format
Description: VP9 is an open and royalty free video compression format Description: VP9 is an open and royalty free video compression format
developed by Google as a successor to VP8. Draft VP9 Bitstream and developed by Google as a successor to VP8. Draft VP9 Bitstream and
Decoding Process Specification [11] Decoding Process Specification [11]
Initialisation: none Initialization: none
6.3.18. V_FFV1 6.3.18. V_FFV1
Codec ID: V_FFV1 Codec ID: V_FFV1
Codec Name: FF Video Codec 1 Codec Name: FF Video Codec 1
Description: FFV1 is a lossless intra-frame video encoding format Description: FFV1 is a lossless intra-frame video encoding format
designed to efficiently compress video data in a variety of pixel designed to efficiently compress video data in a variety of pixel
formats. Compared to uncompressed video, FFV1 offers storage formats. Compared to uncompressed video, FFV1 offers storage
compression, frame fixity, and self-description, which makes FFV1 compression, frame fixity, and self-description, which makes FFV1
useful as a preservation or intermediate video format. Draft FFV1 useful as a preservation or intermediate video format. Draft FFV1
Specification [12] Specification [12]
Initialisation: For FFV1 versions 0 or 1, "Private Data" SHOULD NOT Initialization: For FFV1 versions 0 or 1, "Private Data" SHOULD NOT
be written. For FFV1 version 3 or greater, the "Private Data" MUST be written. For FFV1 version 3 or greater, the "Private Data" MUST
contain the FFV1 Configuration Record structure, as defined in contain the FFV1 Configuration Record structure, as defined in
<https://tools.ietf.org/html/draft-niedermayer-cellar-ffv1- <https://tools.ietf.org/html/draft-ietf-cellar-ffv1-04#section-4.2>,
01#section-4.1>, and no other data. and no other data.
6.4. Audio Codec Mappings 6.4. Audio Codec Mappings
6.4.1. A_MPEG/L3 6.4.1. A_MPEG/L3
Codec ID: A_MPEG/L3 Codec ID: A_MPEG/L3
Codec Name: MPEG Audio 1, 2, 2.5 Layer III Codec Name: MPEG Audio 1, 2, 2.5 Layer III
Description: The data contain everything needed for playback in the Description: The data contain everything needed for playback in the
MPEG Audio header of each frame. Corresponding ACM wFormatTag : MPEG Audio header of each frame. Corresponding ACM wFormatTag :
0x0055 0x0055
Initialization: none
Initialisation: none
6.4.2. A_MPEG/L2 6.4.2. A_MPEG/L2
Codec ID: A_MPEG/L2 Codec ID: A_MPEG/L2
Codec Name: MPEG Audio 1, 2 Layer II Codec Name: MPEG Audio 1, 2 Layer II
Description: The data contain everything needed for playback in the Description: The data contain everything needed for playback in the
MPEG Audio header of each frame. Corresponding ACM wFormatTag : MPEG Audio header of each frame. Corresponding ACM wFormatTag :
0x0050 0x0050
Initialisation: none Initialization: none
6.4.3. A_MPEG/L1 6.4.3. A_MPEG/L1
Codec ID: A_MPEG/L1 Codec ID: A_MPEG/L1
Codec Name: MPEG Audio 1, 2 Layer I Codec Name: MPEG Audio 1, 2 Layer I
Description: The data contain everything needed for playback in the Description: The data contain everything needed for playback in the
MPEG Audio header of each frame. Corresponding ACM wFormatTag : MPEG Audio header of each frame. Corresponding ACM wFormatTag :
0x0050 0x0050
Initialisation: none Initialization: none
6.4.4. A_PCM/INT/BIG 6.4.4. A_PCM/INT/BIG
Codec ID: A_PCM/INT/BIG Codec ID: A_PCM/INT/BIG
Codec Name: PCM Integer Big Endian Codec Name: PCM Integer Big Endian
Description: The audio bit depth MUST be read and set from the Description: The audio bit depth MUST be read and set from the
"BitDepth Element". Audio samples MUST be considered as signed "BitDepth Element". Audio samples MUST be considered as signed
values, except if the audio bit depth is "8" which MUST be values, except if the audio bit depth is "8" which MUST be
interpreted as unsigned values. Corresponding ACM wFormatTag : ??? interpreted as unsigned values. Corresponding ACM wFormatTag : ???
Initialisation: none Initialization: none
6.4.5. A_PCM/INT/LIT 6.4.5. A_PCM/INT/LIT
Codec ID: A_PCM/INT/LIT Codec ID: A_PCM/INT/LIT
Codec Name: PCM Integer Little Endian Codec Name: PCM Integer Little Endian
Description: The audio bit depth MUST be read and set from the Description: The audio bit depth MUST be read and set from the
"BitDepth Element". Audio samples MUST be considered as signed "BitDepth Element". Audio samples MUST be considered as signed
values, except if the audio bit depth is "8" which MUST be values, except if the audio bit depth is "8" which MUST be
interpreted as unsigned values. Corresponding ACM wFormatTag : interpreted as unsigned values. Corresponding ACM wFormatTag :
0x0001 0x0001
Initialisation: none Initialization: none
6.4.6. A_PCM/FLOAT/IEEE 6.4.6. A_PCM/FLOAT/IEEE
Codec ID: A_PCM/FLOAT/IEEE Codec ID: A_PCM/FLOAT/IEEE
Codec Name: Floating Point, IEEE compatible Codec Name: Floating Point, IEEE compatible
Description: The audio bit depth MUST be read and set from the Description: The audio bit depth MUST be read and set from the
"BitDepth Element" (32 bit in most cases). The floats are stored in "BitDepth Element" (32 bit in most cases). The floats are stored as
little endian order (most common float format). Corresponding ACM defined in [IEEE.754.1985] and in little endian order. Corresponding
wFormatTag : 0x0003 ACM wFormatTag : 0x0003
Initialisation: none Initialization: none
6.4.7. A_MPC 6.4.7. A_MPC
Codec ID: A_MPC Codec ID: A_MPC
Codec Name: MPC (musepack) SV8 Codec Name: MPC (musepack) SV8
Description: The main developer for musepack has requested that we Description: The main developer for musepack has requested that we
wait until the SV8 framing has been fully defined for musepack before wait until the SV8 framing has been fully defined for musepack before
defining how to store it in Matroska. defining how to store it in Matroska.
skipping to change at page 15, line 43 skipping to change at page 16, line 8
Codec Name: (Dolby[TM]) AC3 Codec Name: (Dolby[TM]) AC3
Description: The ac3 frame header has, similar to the mpeg-audio Description: The ac3 frame header has, similar to the mpeg-audio
header a version field. Normal ac3 is defined as bitstream id 8 (5 header a version field. Normal ac3 is defined as bitstream id 8 (5
Bits, numbers are 0-15). Everything below 8 is still compatible with Bits, numbers are 0-15). Everything below 8 is still compatible with
all decoders that handle 8 correctly. Everything higher are all decoders that handle 8 correctly. Everything higher are
additions that break decoder compatibility. For the samplerates additions that break decoder compatibility. For the samplerates
24kHz (00); 22,05kHz (01) and 16kHz (10) the BSID is 9 For the 24kHz (00); 22,05kHz (01) and 16kHz (10) the BSID is 9 For the
samplerates 12kHz (00); 11,025kHz (01) and 8kHz (10) the BSID is 10 samplerates 12kHz (00); 11,025kHz (01) and 8kHz (10) the BSID is 10
Initialisation: none Initialization: none
6.4.10. A_AC3/BSID10 6.4.10. A_AC3/BSID10
Codec ID: A_AC3/BSID10 Codec ID: A_AC3/BSID10
Codec Name: (Dolby[TM]) AC3 Codec Name: (Dolby[TM]) AC3
Description: The ac3 frame header has, similar to the mpeg-audio Description: The ac3 frame header has, similar to the mpeg-audio
header a version field. Normal ac3 is defined as bitstream id 8 (5 header a version field. Normal ac3 is defined as bitstream id 8 (5
Bits, numbers are 0-15). Everything below 8 is still compatible with Bits, numbers are 0-15). Everything below 8 is still compatible with
all decoders that handle 8 correctly. Everything higher are all decoders that handle 8 correctly. Everything higher are
additions that break decoder compatibility. For the samplerates additions that break decoder compatibility. For the samplerates
24kHz (00); 22,05kHz (01) and 16kHz (10) the BSID is 9 For the 24kHz (00); 22,05kHz (01) and 16kHz (10) the BSID is 9 For the
samplerates 12kHz (00); 11,025kHz (01) and 8kHz (10) the BSID is 10 samplerates 12kHz (00); 11,025kHz (01) and 8kHz (10) the BSID is 10
Initialisation: none Initialization: none
6.4.11. A_ALAC 6.4.11. A_ALAC
Codec ID: A_ALAC Codec ID: A_ALAC
Codec Name: ALAC (Apple Lossless Audio Codec) Codec Name: ALAC (Apple Lossless Audio Codec)
Initialisation: The "Private Data" contains ALAC's magic cookie (both Initialization: The "Private Data" contains ALAC's magic cookie (both
the codec specific configuration as well as the optional channel the codec specific configuration as well as the optional channel
layout information). Its format is described in ALAC's official layout information). Its format is described in ALAC's official
source code [13]. source code [13].
6.4.12. A_DTS 6.4.12. A_DTS
Codec ID: A_DTS Codec ID: A_DTS
Codec Name: Digital Theatre System Codec Name: Digital Theatre System
Description: Supports DTS, DTS-ES, DTS-96/26, DTS-HD High Resolution Description: Supports DTS, DTS-ES, DTS-96/26, DTS-HD High Resolution
Audio and DTS-HD Master Audio. The private data is void. Audio and DTS-HD Master Audio. The private data is void.
Corresponding ACM wFormatTag : 0x2001 Corresponding ACM wFormatTag : 0x2001
Initialisation: none Initialization: none
6.4.13. A_DTS/EXPRESS 6.4.13. A_DTS/EXPRESS
Codec ID: A_DTS/EXPRESS Codec ID: A_DTS/EXPRESS
Codec Name: Digital Theatre System Express Codec Name: Digital Theatre System Express
Description: DTS Express (a.k.a. LBR) audio streams. The private Description: DTS Express (a.k.a. LBR) audio streams. The private
data is void. Corresponding ACM wFormatTag : 0x2001 data is void. Corresponding ACM wFormatTag : 0x2001
Initialisation: none Initialization: none
6.4.14. A_DTS/LOSSLESS 6.4.14. A_DTS/LOSSLESS
Codec ID: A_DTS/LOSSLESS Codec ID: A_DTS/LOSSLESS
Codec Name: Digital Theatre System Lossless Codec Name: Digital Theatre System Lossless
Description: DTS Lossless audio that does not have a core substream. Description: DTS Lossless audio that does not have a core substream.
The private data is void. Corresponding ACM wFormatTag : 0x2001 The private data is void. Corresponding ACM wFormatTag : 0x2001
Initialisation: none Initialization: none
6.4.15. A_VORBIS 6.4.15. A_VORBIS
Codec ID: A_VORBIS Codec ID: A_VORBIS
Codec Name: Vorbis Codec Name: Vorbis
Initialisation: The "Private Data" contains the first three Vorbis Initialization: The "Private Data" contains the first three Vorbis
packet in order. The lengths of the packets precedes them. The packet in order. The lengths of the packets precedes them. The
actual layout is: - Byte 1: number of distinct packets '"#p"' minus actual layout is: - Byte 1: number of distinct packets '"#p"' minus
one inside the CodecPrivate block. This MUST be '2' for current (as one inside the CodecPrivate block. This MUST be '2' for current (as
of 2016-07-08) Vorbis headers. - Bytes 2..n: lengths of the first of 2016-07-08) Vorbis headers. - Bytes 2..n: lengths of the first
'"#p"' packets, coded in Xiph-style lacing. The length of the last '"#p"' packets, coded in Xiph-style lacing. The length of the last
packet is the length of the CodecPrivate block minus the lengths packet is the length of the CodecPrivate block minus the lengths
coded in these bytes minus one. - Bytes n+1..: The Vorbis coded in these bytes minus one. - Bytes n+1..: The Vorbis
identification header [14], followed by the Vorbis comment header identification header [14], followed by the Vorbis comment header
[15] followed by the codec setup header [16]. [15] followed by the codec setup header [16].
6.4.16. A_FLAC 6.4.16. A_FLAC
Codec ID: A_FLAC Codec ID: A_FLAC
Codec Name: FLAC (Free Lossless Audio Codec) [17] Codec Name: FLAC (Free Lossless Audio Codec) [17]
Initialisation: The "Private Data" contains all the header/metadata Initialization: The "Private Data" contains all the header/metadata
packets before the first data packet. These include the first header packets before the first data packet. These include the first header
packet containing only the word "fLaC" as well as all metadata packet containing only the word "fLaC" as well as all metadata
packets. packets.
6.4.17. A_REAL/14_4 6.4.17. A_REAL/14_4
Codec ID: A_REAL/14_4 Codec ID: A_REAL/14_4
Codec Name: Real Audio 1 Codec Name: Real Audio 1
Initialisation: The "Private Data" contains either the Initialization: The "Private Data" contains either the
"real_audio_v4_props_t" or the "real_audio_v5_props_t" structure "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; Big Endian byte order) as (differentiated by their "version" field; Big Endian byte order) as
found in librmff [18]. found in librmff [18].
6.4.18. A_REAL/28_8 6.4.18. A_REAL/28_8
Codec ID: A_REAL/28_8 Codec ID: A_REAL/28_8
Codec Name: Real Audio 2 Codec Name: Real Audio 2
Initialisation: The "Private Data" contains either the Initialization: The "Private Data" contains either the
"real_audio_v4_props_t" or the "real_audio_v5_props_t" structure "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; Big Endian byte order) as (differentiated by their "version" field; Big Endian byte order) as
found in librmff [19]. found in librmff [19].
6.4.19. A_REAL/COOK 6.4.19. A_REAL/COOK
Codec ID: A_REAL/COOK Codec ID: A_REAL/COOK
Codec Name: Real Audio Cook Codec (codename: Gecko) Codec Name: Real Audio Cook Codec (codename: Gecko)
Initialisation: The "Private Data" contains either the Initialization: The "Private Data" contains either the
"real_audio_v4_props_t" or the "real_audio_v5_props_t" structure "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; Big Endian byte order) as (differentiated by their "version" field; Big Endian byte order) as
found in librmff [20]. found in librmff [20].
6.4.20. A_REAL/SIPR 6.4.20. A_REAL/SIPR
Codec ID: A_REAL/SIPR Codec ID: A_REAL/SIPR
Codec Name: Sipro Voice Codec Codec Name: Sipro Voice Codec
Initialisation: The "Private Data" contains either the Initialization: The "Private Data" contains either the
"real_audio_v4_props_t" or the "real_audio_v5_props_t" structure "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; Big Endian byte order) as (differentiated by their "version" field; Big Endian byte order) as
found in librmff [21]. found in librmff [21].
6.4.21. A_REAL/RALF 6.4.21. A_REAL/RALF
Codec ID: A_REAL/RALF Codec ID: A_REAL/RALF
Codec Name: Real Audio Lossless Format Codec Name: Real Audio Lossless Format
Initialisation: The "Private Data" contains either the Initialization: The "Private Data" contains either the
"real_audio_v4_props_t" or the "real_audio_v5_props_t" structure "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; Big Endian byte order) as (differentiated by their "version" field; Big Endian byte order) as
found in librmff [22]. found in librmff [22].
6.4.22. A_REAL/ATRC 6.4.22. A_REAL/ATRC
Codec ID: A_REAL/ATRC Codec ID: A_REAL/ATRC
Codec Name: Sony Atrac3 Codec Codec Name: Sony Atrac3 Codec
Initialisation: The "Private Data" contains either the Initialization: The "Private Data" contains either the
"real_audio_v4_props_t" or the "real_audio_v5_props_t" structure "real_audio_v4_props_t" or the "real_audio_v5_props_t" structure
(differentiated by their "version" field; Big Endian byte order) as (differentiated by their "version" field; Big Endian byte order) as
found in librmff [23]. found in librmff [23].
6.4.23. A_MS/ACM 6.4.23. A_MS/ACM
Codec ID: A_MS/ACM Codec ID: A_MS/ACM
Codec Name: Microsoft(TM) Audio Codec Manager (ACM) Codec Name: Microsoft(TM) Audio Codec Manager (ACM)
Description: The data are stored in little endian format (like on Description: The data are stored in little endian format (like on
IA32 machines). IA32 machines).
Initialisation: The "Private Data" contains the ACM structure Initialization: The "Private Data" contains the ACM structure
WAVEFORMATEX including the extra private bytes, as defined by WAVEFORMATEX including the extra private bytes, as defined by
Microsoft [24]. Microsoft [24].
6.4.24. A_AAC/MPEG2/MAIN 6.4.24. A_AAC/MPEG2/MAIN
Codec ID: A_AAC/MPEG2/MAIN Codec ID: A_AAC/MPEG2/MAIN
Codec Name: MPEG2 Main Profile Codec Name: MPEG2 Main Profile
Description: Channel number and sample rate have to be read from the Description: Channel number and sample rate have to be read from the
corresponding audio element. Audio stream is stripped from ADTS corresponding audio element. Audio stream is stripped from ADTS
headers and normal Matroska frame based muxing scheme is applied. headers and normal Matroska frame based muxing scheme is applied.
AAC audio always uses wFormatTag 0xFF. AAC audio always uses wFormatTag 0xFF.
Initialisation: none Initialization: none
6.4.25. A_AAC/MPEG2/LC 6.4.25. A_AAC/MPEG2/LC
Codec ID: A_AAC/MPEG2/LC Codec ID: A_AAC/MPEG2/LC
Codec Name: Low Complexity Codec Name: Low Complexity
Description: Channel number and sample rate have to be read from the Description: Channel number and sample rate have to be read from the
corresponding audio element. Audio stream is stripped from ADTS corresponding audio element. Audio stream is stripped from ADTS
headers and normal Matroska frame based muxing scheme is applied. headers and normal Matroska frame based muxing scheme is applied.
AAC audio always uses wFormatTag 0xFF. AAC audio always uses wFormatTag 0xFF.
Initialisation: none Initialization: none
6.4.26. A_AAC/MPEG2/LC/SBR 6.4.26. A_AAC/MPEG2/LC/SBR
Codec ID: A_AAC/MPEG2/LC/SBR Codec ID: A_AAC/MPEG2/LC/SBR
Codec Name: Low Complexity with Spectral Band Replication Codec Name: Low Complexity with Spectral Band Replication
Description: Channel number and sample rate have to be read from the Description: Channel number and sample rate have to be read from the
corresponding audio element. Audio stream is stripped from ADTS corresponding audio element. Audio stream is stripped from ADTS
headers and normal Matroska frame based muxing scheme is applied. headers and normal Matroska frame based muxing scheme is applied.
AAC audio always uses wFormatTag 0xFF. AAC audio always uses wFormatTag 0xFF.
Initialisation: none Initialization: none
6.4.27. A_AAC/MPEG2/SSR 6.4.27. A_AAC/MPEG2/SSR
Codec ID: A_AAC/MPEG2/SSR Codec ID: A_AAC/MPEG2/SSR
Codec Name: Scalable Sampling Rate Codec Name: Scalable Sampling Rate
Description: Channel number and sample rate have to be read from the Description: Channel number and sample rate have to be read from the
corresponding audio element. Audio stream is stripped from ADTS corresponding audio element. Audio stream is stripped from ADTS
headers and normal Matroska frame based muxing scheme is applied. headers and normal Matroska frame based muxing scheme is applied.
AAC audio always uses wFormatTag 0xFF. AAC audio always uses wFormatTag 0xFF.
Initialisation: none Initialization: none
6.4.28. A_AAC/MPEG4/MAIN 6.4.28. A_AAC/MPEG4/MAIN
Codec ID: A_AAC/MPEG4/MAIN Codec ID: A_AAC/MPEG4/MAIN
Codec Name: MPEG4 Main Profile Codec Name: MPEG4 Main Profile
Description: Channel number and sample rate have to be read from the Description: Channel number and sample rate have to be read from the
corresponding audio element. Audio stream is stripped from ADTS corresponding audio element. Audio stream is stripped from ADTS
headers and normal Matroska frame based muxing scheme is applied. headers and normal Matroska frame based muxing scheme is applied.
AAC audio always uses wFormatTag 0xFF. AAC audio always uses wFormatTag 0xFF.
Initialisation: none Initialization: none
6.4.29. A_AAC/MPEG4/LC 6.4.29. A_AAC/MPEG4/LC
Codec ID: A_AAC/MPEG4/LC Codec ID: A_AAC/MPEG4/LC
Codec Name: Low Complexity Codec Name: Low Complexity
Description: Channel number and sample rate have to be read from the Description: Channel number and sample rate have to be read from the
corresponding audio element. Audio stream is stripped from ADTS corresponding audio element. Audio stream is stripped from ADTS
headers and normal Matroska frame based muxing scheme is applied. headers and normal Matroska frame based muxing scheme is applied.
AAC audio always uses wFormatTag 0xFF. AAC audio always uses wFormatTag 0xFF.
Initialisation: none Initialization: none
6.4.30. A_AAC/MPEG4/LC/SBR 6.4.30. A_AAC/MPEG4/LC/SBR
Codec ID: A_AAC/MPEG4/LC/SBR Codec ID: A_AAC/MPEG4/LC/SBR
Codec Name: Low Complexity with Spectral Band Replication Codec Name: Low Complexity with Spectral Band Replication
Description: Channel number and sample rate have to be read from the Description: Channel number and sample rate have to be read from the
corresponding audio element. Audio stream is stripped from ADTS corresponding audio element. Audio stream is stripped from ADTS
headers and normal Matroska frame based muxing scheme is applied. headers and normal Matroska frame based muxing scheme is applied.
AAC audio always uses wFormatTag 0xFF. AAC audio always uses wFormatTag 0xFF.
Initialisation: none Initialization: none
6.4.31. A_AAC/MPEG4/SSR 6.4.31. A_AAC/MPEG4/SSR
Codec ID: A_AAC/MPEG4/SSR Codec ID: A_AAC/MPEG4/SSR
Codec Name: Scalable Sampling Rate Codec Name: Scalable Sampling Rate
Description: Channel number and sample rate have to be read from the Description: Channel number and sample rate have to be read from the
corresponding audio element. Audio stream is stripped from ADTS corresponding audio element. Audio stream is stripped from ADTS
headers and normal Matroska frame based muxing scheme is applied. headers and normal Matroska frame based muxing scheme is applied.
AAC audio always uses wFormatTag 0xFF. AAC audio always uses wFormatTag 0xFF.
Initialisation: none Initialization: none
6.4.32. A_AAC/MPEG4/LTP 6.4.32. A_AAC/MPEG4/LTP
Codec ID: A_AAC/MPEG4/LTP Codec ID: A_AAC/MPEG4/LTP
Codec Name: Long Term Prediction Codec Name: Long Term Prediction
Description: Channel number and sample rate have to be read from the Description: Channel number and sample rate have to be read from the
corresponding audio element. Audio stream is stripped from ADTS corresponding audio element. Audio stream is stripped from ADTS
headers and normal Matroska frame based muxing scheme is applied. headers and normal Matroska frame based muxing scheme is applied.
AAC audio always uses wFormatTag 0xFF. AAC audio always uses wFormatTag 0xFF.
Initialisation: none Initialization: none
6.4.33. A_QUICKTIME 6.4.33. A_QUICKTIME
Codec ID: A_QUICKTIME Codec ID: A_QUICKTIME
Codec Name: Audio taken from QuickTime(TM) files Codec Name: Audio taken from QuickTime(TM) files
Description: Several codecs as stored in QuickTime, e.g. QDesign Description: Several codecs as stored in QuickTime, e.g. QDesign
Music v1 or v2. Music v1 or v2.
Initialisation: The "Private Data" contains all additional data that Initialization: The "Private Data" contains all additional data that
is stored in the 'stsd' (sample description) atom in the QuickTime is stored in the 'stsd' (sample description) atom in the QuickTime
file *after* the mandatory sound descriptor structure (starting with file *after* the mandatory sound descriptor structure (starting with
the size and FourCC fields). For an explanation of the QuickTime the size and FourCC fields). For an explanation of the QuickTime
file format read QuickTime File Format Specification [25]. file format read QuickTime File Format Specification [25].
6.4.34. A_QUICKTIME/QDMC 6.4.34. A_QUICKTIME/QDMC
Codec ID: A_QUICKTIME/QDMC Codec ID: A_QUICKTIME/QDMC
Codec Name: QDesign Music Codec Name: QDesign Music
Description: Description:
Initialisation: The "Private Data" contains all additional data that Initialization: The "Private Data" contains all additional data that
is stored in the 'stsd' (sample description) atom in the QuickTime is stored in the 'stsd' (sample description) atom in the QuickTime
file *after* the mandatory sound descriptor structure (starting with file *after* the mandatory sound descriptor structure (starting with
the size and FourCC fields). For an explanation of the QuickTime the size and FourCC fields). For an explanation of the QuickTime
file format read QuickTime File Format Specification [26]. file format read QuickTime File Format Specification [26].
Superseded By: A_QUICKTIME Superseded By: A_QUICKTIME
6.4.35. A_QUICKTIME/QDM2 6.4.35. A_QUICKTIME/QDM2
Codec ID: A_QUICKTIME/QDM2 Codec ID: A_QUICKTIME/QDM2
Codec Name: QDesign Music v2 Codec Name: QDesign Music v2
Description: Description:
Initialisation: The "Private Data" contains all additional data that Initialization: The "Private Data" contains all additional data that
is stored in the 'stsd' (sample description) atom in the QuickTime is stored in the 'stsd' (sample description) atom in the QuickTime
file *after* the mandatory sound descriptor structure (starting with file *after* the mandatory sound descriptor structure (starting with
the size and FourCC fields). For an explanation of the QuickTime the size and FourCC fields). For an explanation of the QuickTime
file format read QuickTime File Format Specification [27]. file format read QuickTime File Format Specification [27].
Superseded By: A_QUICKTIME Superseded By: A_QUICKTIME
6.4.36. A_TTA1 6.4.36. A_TTA1
Codec ID: A_TTA1 Codec ID: A_TTA1
Codec Name: The True Audio [28] lossless audio compressor Codec Name: The True Audio [28] lossless audio compressor
Description: TTA format description [29] Each frame is kept intact, Description: TTA format description [29] Each frame is kept intact,
including the CRC32. The header and seektable are dropped. including the CRC32. The header and seektable are dropped.
SamplingFrequency, Channels and BitDepth are used in the TrackEntry. SamplingFrequency, Channels and BitDepth are used in the TrackEntry.
wFormatTag = 0x77A1 wFormatTag = 0x77A1
Initialisation: none Initialization: none
6.4.37. A_WAVPACK4 6.4.37. A_WAVPACK4
Codec ID: A_WAVPACK4 Codec ID: A_WAVPACK4
Codec Name: WavPack [30] lossless audio compressor Codec Name: WavPack [30] lossless audio compressor
Description: The Wavpack packets consist of a stripped header Description: The Wavpack packets consist of a stripped header
followed by the frame data. For multi-track (> 2 tracks) a frame followed by the frame data. For multi-track (> 2 tracks) a frame
consists of many packets. For hybrid files (lossy part + correction consists of many packets. For hybrid files (lossy part + correction
part), the correction part is stored in an additional block (level part), the correction part is stored in an additional block (level
1). For more details, check the WavPack muxing description [31]. 1). For more details, check the WavPack muxing description [31].
Initialisation: none Initialization: none
6.5. Subtitle Codec Mappings 6.5. Subtitle Codec Mappings
6.5.1. S_TEXT/UTF8 6.5.1. S_TEXT/UTF8
Codec ID: S_TEXT/UTF8 Codec ID: S_TEXT/UTF8
Codec Name: UTF-8 Plain Text Codec Name: UTF-8 Plain Text
Description: Basic text subtitles. For more information, please look Description: Basic text subtitles. For more information, please look
at Section 7. at Section 7.
6.5.2. S_TEXT/SSA 6.5.2. S_TEXT/SSA
skipping to change at page 27, line 9 skipping to change at page 27, line 26
Here is a list of pointers for storing subtitles in Matroska: Here is a list of pointers for storing subtitles in Matroska:
o Any Matroska file containing only subtitles SHOULD use the o Any Matroska file containing only subtitles SHOULD use the
extension ".mks". extension ".mks".
o As a general rule of thumb for all codecs, information that is o As a general rule of thumb for all codecs, information that is
global to an entire stream SHOULD be stored in the CodecPrivate global to an entire stream SHOULD be stored in the CodecPrivate
element. element.
o Start and stop timecodes that are used in a timecodes native o Start and stop timestamps that are used in a timestamps native
storage format SHOULD be removed when being placed in Matroska as storage format SHOULD be removed when being placed in Matroska as
they could interfere if the file is edited afterwards. Instead, they could interfere if the file is edited afterwards. Instead,
the Blocks timecode and Duration SHOULD be used to say when the the Blocks timestamp and Duration SHOULD be used to say when the
timecode is displayed. timestamp is displayed.
o Because a "subtitle" stream is actually just an overlay stream, o Because a "subtitle" stream is actually just an overlay stream,
anything with a transparency layer could be use, including video. anything with a transparency layer could be use, including video.
7.1. Images Subtitles 7.1. Images Subtitles
The first image format that is a goal to import into Matroska is the The first image format that is a goal to import into Matroska is the
VobSub subtitle format. This subtitle type is generated by exporting VobSub subtitle format. This subtitle type is generated by exporting
the subtitles from a DVD. the subtitles from a DVD.
skipping to change at page 27, line 42 skipping to change at page 28, line 11
stream will need to be separated into separate tracks for storage in stream will need to be separated into separate tracks for storage in
Matroska. E.g. the VobSub file contains streams for both English and Matroska. E.g. the VobSub file contains streams for both English and
German subtitles. Then the resulting Matroska file SHOULD contain German subtitles. Then the resulting Matroska file SHOULD contain
two tracks. That way the language information can be 'dropped' and two tracks. That way the language information can be 'dropped' and
mapped to Matroska's language tags. mapped to Matroska's language tags.
The .IDX file is reformatted (see below) and placed in the The .IDX file is reformatted (see below) and placed in the
CodecPrivate. CodecPrivate.
Each .BMP will be stored in its own Block. The Timestamp with be Each .BMP will be stored in its own Block. The Timestamp with be
stored in the Blocks Timecode and the duration will be stored in the stored in the Blocks Timestamp and the duration will be stored in the
Default Duration. Default Duration.
Here is an example .IDX file: Here is an example .IDX file:
# VobSub index file, v7 (do not modify this line!) # VobSub index file, v7 (do not modify this line!)
# #
# To repair desynchronization, you can insert gaps this way: # To repair desynchronization, you can insert gaps this way:
# (it usually happens after vob id changes) # (it usually happens after vob id changes)
# #
# delay: [sign]hh:mm:ss:ms # delay: [sign]hh:mm:ss:ms
skipping to change at page 29, line 4 skipping to change at page 29, line 22
# For correcting non-progressive desync. (in millisecs or hh:mm:ss:ms) # For correcting non-progressive desync. (in millisecs or hh:mm:ss:ms)
# Note: Not effective in DirectVobSub, use "delay: ... " instead. # Note: Not effective in DirectVobSub, use "delay: ... " instead.
time offset: 0 time offset: 0
# ON: displays only forced subtitles, OFF: shows everything # ON: displays only forced subtitles, OFF: shows everything
forced subs: OFF forced subs: OFF
# The original palette of the DVD # The original palette of the DVD
palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \ palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \
b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd
# Custom colors (transp idxs and the four colors) # Custom colors (transp idxs and the four colors)
custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \ custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \
000000 000000
# Language index in use # Language index in use
langidx: 0 langidx: 0
# English # English
id: en, index: 0 id: en, index: 0
# Decomment next line to activate alternative name in DirectVobSub / # Uncomment next line to activate alternative name in DirectVobSub /
# Windows Media Player 6.x # Windows Media Player 6.x
# alt: English # alt: English
# Vob/Cell ID: 1, 1 (PTS: 0) # Vob/Cell ID: 1, 1 (PTS: 0)
timestamp: 00:00:01:101, filepos: 000000000 timestamp: 00:00:01:101, filepos: 000000000
timestamp: 00:00:08:708, filepos: 000001000 timestamp: 00:00:08:708, filepos: 000001000
First, lines beginning with "#" are removed. These are comments to First, lines beginning with "#" are removed. These are comments to
make text file editing easier, and as this is not a text file, they make text file editing easier, and as this is not a text file, they
aren't needed. aren't needed.
Next remove the "langidx" and "id" lines. These are used to Next remove the "langidx" and "id" lines. These are used to
differentiate the subtitle streams and define the language. As the differentiate the subtitle streams and define the language. As the
streams will be stored separately anyway, there is no need to streams will be stored separately anyway, there is no need to
differentiate them here. Also, the language setting will be stored differentiate them here. Also, the language setting will be stored
in the Matroska tags, so there is no need to store it here. in the Matroska tags, so there is no need to store it here.
Finally, the "timestamp" will be used to set the Block's timecode. Finally, the "timestamp" will be used to set the Block's timestamp.
Once it is set there, there is no need for it to be stored here. Once it is set there, there is no need for it to be stored here.
Also, as it may interfere if the file is edited, it SHOULD NOT be Also, as it may interfere if the file is edited, it SHOULD NOT be
stored here. stored here.
Once all of these items are removed, the data to store in the Once all of these items are removed, the data to store in the
CodecPrivate SHOULD look like this: CodecPrivate SHOULD look like this:
size: 720x480 size: 720x480
org: 0, 0 org: 0, 0
scale: 100%, 100% scale: 100%, 100%
alpha: 100% alpha: 100%
skipping to change at page 30, line 4 skipping to change at page 30, line 24
alpha: 100% alpha: 100%
smooth: OFF smooth: OFF
fadein/out: 50, 50 fadein/out: 50, 50
align: OFF at LEFT TOP align: OFF at LEFT TOP
time offset: 0 time offset: 0
forced subs: OFF forced subs: OFF
palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \ palette: 000000, 7e7e7e, fbff8b, cb86f1, 7f74b8, e23f06, 0a48ea, \
b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd b3d65a, 6b92f1, 87f087, c02081, f8d0f4, e3c411, 382201, e8840b, fdfdfd
custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \ custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, \
000000 000000
There SHOULD also be two Blocks containing one image each with the There SHOULD also be two Blocks containing one image each with the
timecodes "00:00:01:101" and "00:00:08:708". timestamps "00:00:01:101" and "00:00:08:708".
7.2. SRT Subtitles 7.2. SRT Subtitles
SRT is perhaps the most basic of all subtitle formats. SRT is perhaps the most basic of all subtitle formats.
It consists of four parts, all in text.. It consists of four parts, all in text..
1. A number indicating which subtitle it is in the sequence. 2. 1. A number indicating which subtitle it is in the sequence. 2.
The time that the subtitle appears on the screen, and then The time that the subtitle appears on the screen, and then
disappears. 3. The subtitle itself. 4. A blank line indicating disappears. 3. The subtitle itself. 4. A blank line indicating
the start of a new subtitle. the start of a new subtitle.
When placing SRT in Matroska, part 3 is converted to UTF-8 (S_TEXT/ When placing SRT in Matroska, part 3 is converted to UTF-8 (S_TEXT/
UTF8) and placed in the data portion of the Block. Part 2 is used to UTF8) and placed in the data portion of the Block. Part 2 is used to
set the timecode of the Block, and BlockDuration element. Nothing set the timestamp of the Block, and BlockDuration element. Nothing
else is used. else is used.
Here is an example SRT file: Here is an example SRT file:
1 1
00:02:17,440 --> 00:02:20,375 00:02:17,440 --> 00:02:20,375
Senator, we're making Senator, we're making
our final approach into Coruscant. our final approach into Coruscant.
2 2
00:02:20,476 --> 00:02:22,501 00:02:20,476 --> 00:02:22,501
Very good, Lieutenant. Very good, Lieutenant.
In this example, the text "Senator, we're making our final approach In this example, the text "Senator, we're making our final approach
into Coruscant." would be converted into UTF-8 and placed in the into Coruscant." would be converted into UTF-8 and placed in the
Block. The timecode of the block would be set to "00:02:17,440". Block. The timestamp of the block would be set to "00:02:17,440".
And the BlockDuration element would be set to "00:00:02,935". And the BlockDuration element would be set to "00:00:02,935".
The same is repeated for the next subtitle. The same is repeated for the next subtitle.
Because there are no general settings for SRT, the CodecPrivate is Because there are no general settings for SRT, the CodecPrivate is
left blank. left blank.
7.3. SSA/ASS Subtitles 7.3. SSA/ASS Subtitles
SSA stands for Sub Station Alpha. It's the file format used by the SSA stands for Sub Station Alpha. It's the file format used by the
skipping to change at page 33, line 34 skipping to change at page 34, line 34
Timer: 100,0000 Timer: 100,0000
[V4 Styles] [V4 Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style: Default,Arial,20,65535,65535,65535,-2147483640,-1,0,1,3,0,2,30,30,30,0,0 Style: Default,Arial,20,65535,65535,65535,-2147483640,-1,0,1,3,0,2,30,30,30,0,0
Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,-1,0,1,1,0,3,30,30,30,0,0 Style: Titre_episode,Akbar,140,15724527,65535,65535,986895,-1,0,1,1,0,3,30,30,30,0,0
Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0 Style: Wolf main,Wolf_Rain,56,15724527,15724527,15724527,4144959,0,0,1,1,2,2,5,5,30,0,0
And here are the two blocks that would be generated. And here are the two blocks that would be generated.
Block's timecode: 00:02:40.650 BlockDuration: 00:00:01.140 Block's timestamp: 00:02:40.650 BlockDuration: 00:00:01.140
1,,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ? 1,,Wolf main,Cher,0000,0000,0000,,Et les enregistrements de ses ondes delta ?
Block's timecode: 00:02:42.420 BlockDuration: 00:00:01.730 Block's timestamp: 00:02:42.420 BlockDuration: 00:00:01.730
2,,Wolf main,autre,0000,0000,0000,,Toujours rien. 2,,Wolf main,autre,0000,0000,0000,,Toujours rien.
7.4. USF Subtitles 7.4. USF Subtitles
Under construction Under construction
7.5. WebVTT 7.5. WebVTT
The "Web Video Text Tracks Format" (short: WebVTT) is developed by The "Web Video Text Tracks Format" (short: WebVTT) is developed by
skipping to change at page 37, line 5 skipping to change at page 38, line 5
This one has multiple lines. This one has multiple lines.
00:01:03.000 --> 00:01:06.500 position:90% align:right size:35% 00:01:03.000 --> 00:01:06.500 position:90% align:right size:35%
Example entry 3: That stuff to the right of the timestamps are cue settings. Example entry 3: That stuff to the right of the timestamps are cue settings.
00:03:10.000 --> 00:03:20.000 00:03:10.000 --> 00:03:20.000
Example entry 4: Entries can even include timestamps. Example entry 4: Entries can even include timestamps.
For example:<00:03:15.000>This becomes visible five seconds For example:<00:03:15.000>This becomes visible five seconds
after the first part. after the first part.
7.5.2.2. CodecPrivate 7.5.2.2. Example of CodecPrivate
The resulting CodecPrivate element will look like this: The resulting CodecPrivate element will look like this:
WEBVTT with text after the signature WEBVTT with text after the signature
STYLE STYLE
::cue { ::cue {
background-image: linear-gradient(to bottom, dimgray, lightgray); background-image: linear-gradient(to bottom, dimgray, lightgray);
color: papayawhip; color: papayawhip;
} }
skipping to change at page 39, line 16 skipping to change at page 40, line 16
7.6. HDMV presentation graphics subtitles 7.6. HDMV presentation graphics subtitles
The specifications for the HDMV presentation graphics subtitle format The specifications for the HDMV presentation graphics subtitle format
(short: HDMV PGS) can be found in the document "Blu-ray Disc Read- (short: HDMV PGS) can be found in the document "Blu-ray Disc Read-
Only Format; Part 3 -- Audio Visual Basic Specifications" in section Only Format; Part 3 -- Audio Visual Basic Specifications" in section
9.14 "HDMV graphics streams". 9.14 "HDMV graphics streams".
7.6.1. Storage of HDMV presentation graphics subtitles 7.6.1. Storage of HDMV presentation graphics subtitles
7.6.1.1. CodecID & CodecPrivate: codec identification
The CodecID to use is "S_HDMV/PGS". A CodecPrivate element is not The CodecID to use is "S_HDMV/PGS". A CodecPrivate element is not
used. used.
7.6.1.2. Storage of HDMV PGS Segments in Matroska Blocks 7.6.1.1. Storage of HDMV PGS Segments in Matroska Blocks
Each HDMV PGS Segment (short: Segment) will be stored in a Matroska Each HDMV PGS Segment (short: Segment) will be stored in a Matroska
Block. A Segment is the data structure described in section 9.14.2.1 Block. A Segment is the data structure described in section 9.14.2.1
"Segment coding structure and parameters" of the Blu-ray "Segment coding structure and parameters" of the Blu-ray
specifications. specifications.
Each Segment contains a presentation timestamp. This timestamp will Each Segment contains a presentation timestamp. This timestamp will
be used as the timestamp for the Matroska Block. be used as the timestamp for the Matroska Block.
A Segment is normally shown until a subsequent Segment is A Segment is normally shown until a subsequent Segment is
skipping to change at page 40, line 7 skipping to change at page 40, line 48
7.7. HDMV text subtitles 7.7. HDMV text subtitles
The specifications for the HDMV text subtitle format (short: HDMV The specifications for the HDMV text subtitle format (short: HDMV
TextST) can be found in the document "Blu-ray Disc Read-Only Format; TextST) can be found in the document "Blu-ray Disc Read-Only Format;
Part 3 -- Audio Visual Basic Specifications" in section 9.15 "HDMV Part 3 -- Audio Visual Basic Specifications" in section 9.15 "HDMV
text subtitle streams". text subtitle streams".
7.7.1. Storage of HDMV text subtitles 7.7.1. Storage of HDMV text subtitles
7.7.1.1. CodecID & CodecPrivate: codec identification
The CodecID to use is "S_HDMV/TEXTST". The CodecID to use is "S_HDMV/TEXTST".
A CodecPrivate Element is required. It MUST contain the stream's A CodecPrivate Element is required. It MUST contain the stream's
Dialog Style Segment as described in section 9.15.4.2 "Dialog Style Dialog Style Segment as described in section 9.15.4.2 "Dialog Style
Segment" of the Blu-ray specifications. Segment" of the Blu-ray specifications.
7.7.1.2. Storage of HDMV TextST Dialog Presentation Segments in 7.7.1.1. Storage of HDMV TextST Dialog Presentation Segments in
Matroska Blocks Matroska Blocks
Each HDMV Dialog Presentation Segment (short: Segment) will be stored Each HDMV Dialog Presentation Segment (short: Segment) will be stored
in a Matroska Block. A Segment is the data structure described in in a Matroska Block. A Segment is the data structure described in
section 9.15.4.3 "Dialog presentation segment" of the Blu-ray section 9.15.4.3 "Dialog presentation segment" of the Blu-ray
specifications. specifications.
Each Segment contains a start and an end presentation timestamp Each Segment contains a start and an end presentation timestamp
(short: start PTS & end PTS). The start PTS will be used as the (short: start PTS & end PTS). The start PTS will be used as the
timestamp for the Matroska Block. The Matroska Block MUST have a timestamp for the Matroska Block. The Matroska Block MUST have a
Duration, and that Duration is the difference between the end PTS and Duration, and that Duration is the difference between the end PTS and
the start PTS. the start PTS.
A player MUST use the Matroska Block's timestamp and Duration instead A player MUST use the Matroska Block's timestamp and Duration instead
of the Segment's start and end PTS for determining when and how long of the Segment's start and end PTS for determining when and how long
to show the Segment. to show the Segment.
7.7.1.3. Character set 7.7.1.2. Character set
When TextST subtitles are stored inside Matroska, the only allowed When TextST subtitles are stored inside Matroska, the only allowed
character set is UTF-8. character set is UTF-8.
Each HDMV text subtitle stream in a Blu-ray can use one of a handful Each HDMV text subtitle stream in a Blu-ray can use one of a handful
of character sets. This information is not stored in the MPEG2 of character sets. This information is not stored in the MPEG2
Transport Stream itself but in the accompanying Clip Information Transport Stream itself but in the accompanying Clip Information
file. file.
Therefore a muxer MUST parse the accompanying Clip Information file. Therefore a muxer MUST parse the accompanying Clip Information file.
skipping to change at page 41, line 42 skipping to change at page 42, line 38
described in segment 7.2 "Syntax and semantics of the subtitling described in segment 7.2 "Syntax and semantics of the subtitling
segment" of ETSI EN 300 743. segment" of ETSI EN 300 743.
Each Matroska Block SHOULD have a Duration indicating how long the Each Matroska Block SHOULD have a Duration indicating how long the
DVB Subtitle Segments in that Block SHOULD be displayed. DVB Subtitle Segments in that Block SHOULD be displayed.
8. References 8. References
8.1. Normative References 8.1. Normative References
[IEEE.754.1985]
Institute of Electrical and Electronics Engineers,
"Standard for Binary Floating-Point Arithmetic",
IEEE Standard 754, August 1985.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>. <https://www.rfc-editor.org/info/rfc3339>.
[RFC6386] Bankoski, J., Koleszar, J., Quillio, L., Salonen, J., [RFC6386] Bankoski, J., Koleszar, J., Quillio, L., Salonen, J.,
Wilkins, P., and Y. Xu, "VP8 Data Format and Decoding Wilkins, P., and Y. Xu, "VP8 Data Format and Decoding
Guide", RFC 6386, DOI 10.17487/RFC6386, November 2011, Guide", RFC 6386, DOI 10.17487/RFC6386, November 2011,
<https://www.rfc-editor.org/info/rfc6386>. <https://www.rfc-editor.org/info/rfc6386>.
[RFC6648] Saint-Andre, P., Crocker, D., and M. Nottingham, [RFC6648] Saint-Andre, P., Crocker, D., and M. Nottingham,
skipping to change at page 42, line 42 skipping to change at page 43, line 42
[8] https://developer.apple.com/library/mac/documentation/QuickTime/ [8] https://developer.apple.com/library/mac/documentation/QuickTime/
QTFF/QTFFPreface/qtffPreface.html QTFF/QTFFPreface/qtffPreface.html
[9] http://www.theora.org/doc/Theora.pdf [9] http://www.theora.org/doc/Theora.pdf
[10] http://wiki.multimedia.cx/ [10] http://wiki.multimedia.cx/
index.php?title=Apple_ProRes#Frame_layout index.php?title=Apple_ProRes#Frame_layout
[11] https://www.webmproject.org/vp9/ [11] https://www.webmproject.org/vp9/
[12] https://datatracker.ietf.org/doc/draft-niedermayer-cellar-ffv1/ [12] https://datatracker.ietf.org/doc/draft-ietf-cellar-ffv1/
[13] http://alac.macosforge.org/trac/browser/trunk/ [13] http://alac.macosforge.org/trac/browser/trunk/
ALACMagicCookieDescription.txt ALACMagicCookieDescription.txt
[14] https://xiph.org/vorbis/doc/Vorbis_I_spec.html [14] https://xiph.org/vorbis/doc/Vorbis_I_spec.html
[15] https://xiph.org/vorbis/doc/v-comment.html [15] https://xiph.org/vorbis/doc/v-comment.html
[16] https://xiph.org/vorbis/doc/Vorbis_I_spec.html [16] https://xiph.org/vorbis/doc/Vorbis_I_spec.html
 End of changes. 119 change blocks. 
143 lines changed or deleted 170 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/