You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: codec_specs.md
+37-14
Original file line number
Diff line number
Diff line change
@@ -71,8 +71,9 @@ which **MUST** be stored within the `CodecPrivate Element`. When the Initializat
71
71
within a track, then that updated Initialization data **MUST** be written into the `CodecState Element`
72
72
of the first `Cluster` to require it. If the encoding does not require any form of Initialization,
73
73
then `none`**MUST** be used to define the Initialization and the `CodecPrivate Element`
74
-
**SHOULD NOT** be written and **MUST** be ignored. Data that is defined Initialization to be
75
-
stored in the `CodecPrivate Element` is known as `Private Data`.
74
+
**SHOULD NOT** be written and **MUST** be ignored. If the encoding does require any form of Initialization,
75
+
then `CodecPrivate Element`**MUST** be written and **MUST** be provided to the decoder.
76
+
The Initialization data to be stored in the `CodecPrivate Element` is referred to as `Private Data`.
76
77
77
78
### Codec BlockAdditions
78
79
@@ -332,8 +333,8 @@ Codec Name: Theora
332
333
333
334
Initialization: The `Private Data` contains the first three Theora packets in order. The lengths of the packets precedes them. The actual layout is:
334
335
335
-
* Byte 1: number of distinct packets `#p` minus one inside the CodecPrivate block. This **MUST** be "2" for current (as of 2016-07-08) Theora headers.
336
-
* 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 CodecPrivate block minus the lengths coded in these bytes minus one.
336
+
* Byte 1: number of distinct packets `#p` minus one inside the `Private Data`. This **MUST** be "2" for current (as of 2016-07-08) Theora headers.
337
+
* 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 `Private Data` minus the lengths coded in these bytes minus one.
337
338
* Bytes n+1..: The Theora identification header, followed by the commend header followed by the codec setup header. Those are described in the [Theora specs](http://www.theora.org/doc/Theora.pdf).
338
339
339
340
### V_PRORES
@@ -389,7 +390,7 @@ Description: FFV1 is a lossless intra-frame video encoding format designed to ef
389
390
Compared to uncompressed video, FFV1 offers storage compression, frame fixity, and self-description,
390
391
which makes FFV1 useful as a preservation or intermediate video format. [Draft FFV1 Specification](https://datatracker.ietf.org/doc/draft-ietf-cellar-ffv1/)
391
392
392
-
Initialization: For FFV1 versions 0 or 1, `Private Data`**SHOULD NOT** be written. For FFV1 version 3 or greater, the `Private Data`**MUST** contain the FFV1 Configuration Record structure, as defined in https://tools.ietf.org/html/draft-ietf-cellar-ffv1-04#section-4.2, and no other data.
393
+
Initialization: For FFV1 versions 0 or 1, none. For FFV1 version 3 or greater, the `Private Data`contains the FFV1 Configuration Record structure, as defined in https://tools.ietf.org/html/draft-ietf-cellar-ffv1-04#section-4.2, and no other data.
393
394
394
395
## Audio Codec Mappings
395
396
@@ -471,9 +472,11 @@ Codec ID: A_AC3
471
472
472
473
Codec Name: (Dolby™) AC3
473
474
474
-
Description: BSID <= 8 !! The private data is void ??? Corresponding ACM wFormatTag : 0x2000 ; channel number have
475
+
Description: For BSID <= 8. Corresponding ACM wFormatTag : 0x2000 ; channel number have
475
476
to be read from the corresponding audio element
476
477
478
+
Initialization: none
479
+
477
480
### A_AC3/BSID9
478
481
479
482
Codec ID: A_AC3/BSID9
@@ -549,10 +552,10 @@ Codec ID: A_VORBIS
549
552
Codec Name: Vorbis
550
553
551
554
Initialization: The `Private Data` contains the first three Vorbis packet in order. The lengths of the packets precedes them. The actual layout is:
552
-
- Byte 1: number of distinct packets `#p` minus one inside the CodecPrivate block.
555
+
- Byte 1: number of distinct packets `#p` minus one inside the `Private Data`.
553
556
This **MUST** be "2" for current (as of 2016-07-08) Vorbis headers.
554
557
- Bytes 2..n: lengths of the first `#p` packets, coded in Xiph-style lacing.
555
-
The length of the last packet is the length of the CodecPrivate block minus the lengths coded in these bytes minus one.
558
+
The length of the last packet is the length of the `Private Data` minus the lengths coded in these bytes minus one.
556
559
- Bytes n+1..: The [Vorbis identification header](https://xiph.org/vorbis/doc/Vorbis_I_spec.html),
557
560
followed by the [Vorbis comment header](https://xiph.org/vorbis/doc/v-comment.html)
558
561
followed by the [codec setup header](https://xiph.org/vorbis/doc/Vorbis_I_spec.html).
@@ -815,24 +818,30 @@ Codec Name: UTF-8 Plain Text
815
818
816
819
Description: Basic text subtitles. For more information, see (#subtitles) on Subtitles.
817
820
821
+
Initialization: none
822
+
818
823
### S_TEXT/SSA
819
824
820
825
Codec ID: S_TEXT/SSA
821
826
822
827
Codec Name: Subtitles Format
823
828
824
-
Description: The [Script Info] and [V4 Styles] sections are stored in the codecprivate. Each event is stored in its own Block.
829
+
Description: Each event is stored in its own Block.
825
830
For more information, see (#ssa-ass-subtitles) on SSA/ASS.
826
831
832
+
Initialization: The `Private Data` contains the [Script Info] and [V4 Styles] sections.
833
+
827
834
### S_TEXT/ASS
828
835
829
836
Codec ID: S_TEXT/ASS
830
837
831
838
Codec Name: Advanced Subtitles Format
832
839
833
-
Description: The [Script Info] and [V4 Styles] sections are stored in the codecprivate. Each event is stored in its own Block.
840
+
Description: Each event is stored in its own Block.
834
841
For more information, see (#ssa-ass-subtitles) on SSA/ASS.
835
842
843
+
Initialization: The `Private Data` contains the [Script Info] and [V4+ Styles] sections.
844
+
836
845
### S_TEXT/WEBVTT
837
846
838
847
Codec ID: S_TEXT/WEBVTT
@@ -841,6 +850,8 @@ Codec Name: Web Video Text Tracks Format (WebVTT)
841
850
842
851
Description: Advanced text subtitles. For more information, see (#webvtt) on WebVTT.
843
852
853
+
Initialization: none
854
+
844
855
### S_IMAGE/BMP
845
856
846
857
Codec ID: S_IMAGE/BMP
@@ -852,6 +863,8 @@ The timestamp in the block header of Matroska indicates the start display time,
852
863
the duration is set with the Duration element. The full data for the subtitle bitmap
853
864
is stored in the Block's data section.
854
865
866
+
Initialization: none
867
+
855
868
### S_DVBSUB
856
869
857
870
Codec ID: S_DVBSUB
@@ -861,6 +874,8 @@ Codec Name: Digital Video Broadcasting (DVB) subtitles
861
874
Description: This is the graphical subtitle format used in the Digital Video Broadcasting standard.
862
875
For more information, see (#digital-video-broadcasting-dvb-subtitles) on Digital Video Broadcasting (DVB).
<documentationlang="en"purpose="definition">Private data only known to the codec.</documentation>
401
+
<documentationlang="en"purpose="definition">Private data only known to the codec. This element **MUST NOT** be present if the codec mapping specification defines no initialization or an initialization `none`, else **MUST** be present.</documentation>
0 commit comments