1

If a WebM's DocTypeVersion is 4, what does that signify and correlate to? Is that version 4 of the Matroska specification draft? Or does WebM have its own versioning independent of Matroska? I couldn't find any information on webmproject.org

After analyzing a WebM file created by ffmpeg, I see the "Document Type Version" is 4:

$ ffmpeg -i audio.opus -a:c copy audio.webm
$ mkvinfo audio.webm

+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: webm
|+ Document type version: 4             <=  This is what I'm referencing
|+ Document type read version: 2
AnthumChris
  • 4,779
  • 1
  • 19
  • 41

1 Answers1

1

WebMs is a type of EBML document.

From https://github.com/cellar-wg/ebml-specification/blob/master/specification.markdown

The version of the EBML Body is found in EBMLDocTypeVersion. A parser for the particular DocType format can read the EBML Document if it can read either the EBMLDocTypeVersion version of that format or a version equal or higher than the one found in EBMLDocTypeReadVersion.

FFmpeg will set version to 4 for WebM if there's an audio stream with codec Opus or if video stream has an alpha channel stored in an additional block or is a stereo video.

Gyan
  • 63,018
  • 7
  • 100
  • 141