On 2014-05-14 12:25 PM,
bryand...@gmail.com wrote:
> I have a WebRTC MCU and I want to write WEBM files containing VP8+Opus.
Hooray, and implementor! :)
> Is my use case currently supported by the muxer library?
From a quick look there's basic support for Opus. There's a
kOpusCodecId, and support for writing the CodecDelay and SeekPreRoll
elements, but you have to generate the Opus CodecPrivate yourself.
> In one file webm file that I found that does play in Chrome, the
> DocTypeVersion is 4, while libwebm always writes an EbmlHeader
> containing a DoctypeVersion of 2. What is the correct DocTypeVersion to
> use?
There's been some dicussion of using DoctypeVersion 4 for VP9 and/or
Opus in webm to distinguish it from VP8/Vorbis webm. Particularly for
the IE plugin, which rejects such files more cleanly than if they just
contain an unrecognized codec.
As I read the spec, DocReadTypeVersion should be 4 for Opus files. Opus
tracks should use the CodecDelay and SeekPreRoll elements. The matroska
spec says they're defined for "Matroska version 4" and "WebM". The WebM
spec says "DocReadTypeVersion SHOULD follow the Matroska specification."
So writing 2 unconditionally is a bug in libwebm.
> It would be great if the container docs could be updated with
> information on opus and related changes.
I agree! There's a rought design document at
https://wiki.xiph.org/MatroskaOpus. You can help by providing
implementation feedback, updating the wiki page, etc.
-r