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
WebMs is a type of EBML document.
From https://github.com/cellar-wg/ebml-specification/blob/master/specification.markdown
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.