VP9/Opus in WebM

2,619 views
Skip to first unread message

Frank Galligan

unread,
Nov 16, 2012, 5:21:30 PM11/16/12
to WebM Discussion
Hi all,

I want to start the technical discussion about adding VP9 and Opus to WebM.

A discussion about adding Opus to Matroska is ongoing on Matroska dev list [1]. I think it is best that we keep the Opus discussion there and incorporate the specs into WebM when they are agreed upon. There is also a wiki page at Xiph [2].

Changes to WebM spec [3]:
a) Keep WebM naming the same. I.e. Container Format Name, Filename Extension, MIME-type and Audio-only MIME-type. [4]

b) VP9 WebM Track elements will be the same as VP8 except Codec ID must be “V_VP9”.

c) Codec type parameters [5] should follow VP8 and Vorbis.
canPlayType('video/webm; codecs="vp9, opus"') should return probably
canPlayType('video/webm; codecs="vp9.0, opus"') should return probably
canPlayType('audio/webm; codecs="opus"') should return probably
canPlayType('video/webm; codecs="vp8, opus"') should return probably
canPlayType('video/webm; codecs="vp9, vorbis"') should return probably

d) Muxer guidelines [6] should stay the same.

e) VP9 Alt-Ref frames are now processed within the codec. So applications using the VP9 decoder and encoder will only have to handle one frame in and one frame out. This is different from VP8 Alt-Ref frames [7] where the applications had to understand what an Alt-Ref frame was and how they were stored in the container.

Frank

Ralph Giles

unread,
Nov 16, 2012, 6:06:32 PM11/16/12
to webm-d...@webmproject.org
On 12-11-16 2:21 PM, Frank Galligan wrote:

> A discussion about adding Opus to Matroska is ongoing on Matroska dev
> list [1]. I think it is best that we keep the Opus discussion there and
> incorporate the specs into WebM when they are agreed upon. There is also
> a wiki page at Xiph [2].

Note that even if we punt on the phase shift and sample-accurate
duration issues, supporting pre-roll requires serious changes to
currently implemented see logic, and likely the format of the Cues
element. This is a container revision as far as random access is concerned.

The good news is that the same changes are necessary to support
rolling-intra video, so Opus requirements aren't the sole motivation.

-r

Frank Galligan

unread,
Mar 22, 2013, 5:30:20 PM3/22/13
to WebM Discussion
Hello all,

For anyone who is interested in Opus in WebM, I posted some ideas on how to handle pre-skip and pre-roll on matroska-dev list. http://lists.matroska.org/pipermail/matroska-devel/2013-March/004413.html

Frank
 



 -r

--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To post to this group, send email to webm-d...@webmproject.org.
To unsubscribe from this group, send email to webm-discuss...@webmproject.org.
For more options, visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.


Basil Mohamed Gohar

unread,
Mar 22, 2013, 5:58:28 PM3/22/13
to webm-d...@webmproject.org
This might be a naive question, but since Opus is already quite successfully packaged inside of the Ogg container, will there be significant differences with how it's done in Matroska, or will it be similar?  I know Matroska and Ogg are two different container formats, and even operate in fundamentally different ways (in some ways, that is), but is there any goal to in place to mimic, where possible, existing behaviors in the Ogg Opus mapping?
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.

To post to this group, send email to webm-d...@webmproject.org.

Frank Galligan

unread,
Mar 22, 2013, 6:50:46 PM3/22/13
to WebM Discussion
On Fri, Mar 22, 2013 at 2:58 PM, Basil Mohamed Gohar <basil...@librevideo.org> wrote:
This might be a naive question, but since Opus is already quite successfully packaged inside of the Ogg container, will there be significant differences with how it's done in Matroska, or will it be similar? 
I guess it depends on how you define significant. Also the severity of changes will depend on how we decide to add Opus to Matroska. Also different changes will will have a different severity to different components. I.e. A change might not be significant to the contianer spec., muxers,and demuxers, but very significant to encoders and decoders.
 
I know Matroska and Ogg are two different container formats, and even operate in fundamentally different ways (in some ways, that is), but is there any goal to in place to mimic, where possible, existing behaviors in the Ogg Opus mapping?
I think the general goal is we don't want anything to be different. But I think you will have to be more specific on existing behaviors.

Brendan Bolles

unread,
Jan 3, 2014, 4:58:26 PM1/3/14
to webm-d...@webmproject.org
On Friday, November 16, 2012 2:21:33 PM UTC-8, Frank Galligan wrote:
Hi all,

I want to start the technical discussion about adding VP9 and Opus to WebM.


Any more word on Opus and WebM? The spec page on Xiph makes is look unfinished. Any Opus files out there in the wild yet?


Brendan

Basil Mohamed Gohar

unread,
Jan 3, 2014, 9:11:27 PM1/3/14
to webm-d...@webmproject.org
On 01/03/2014 04:58 PM, Brendan Bolles wrote:
> On Friday, November 16, 2012 2:21:33 PM UTC-8, Frank Galligan wrote:
>
> *Hi all,
>
> I want to start the technical discussion about adding VP9 and Opus
> to WebM.
>
> *
>
>
> Any more word on Opus and WebM? The spec page on Xiph
> <http://wiki.xiph.org/MatroskaOpus> makes is look unfinished. Any Opus
> files out there in the wild yet?
>
>
> Brendan

Brendan,

Firefox Nightly successfully plays WebM files that are composed of VP9
and Opus, for what it's worth.

This is one I composed a while ago

http://media.basilgohar.com/patent-absurdity/patent-absurdity_288p30.y4m_vp9-256kbps_opus-32kbps.webm

Plays properly in Firefox Nightly as well as ffplay, the bundled example
player for the ffmpeg project.

Brendan Bolles

unread,
Jan 3, 2014, 9:58:35 PM1/3/14
to webm-d...@webmproject.org
On Friday, January 3, 2014 6:11:27 PM UTC-8, Basil Mohamed Gohar wrote:
Firefox Nightly successfully plays WebM files that are composed of VP9
and Opus, for what it's worth.

This is one I composed a while ago

http://media.basilgohar.com/patent-absurdity/patent-absurdity_288p30.y4m_vp9-256kbps_opus-32kbps.webm

Plays properly in Firefox Nightly as well as ffplay, the bundled example
player for the ffmpeg project.



Thanks for the info and the sample file, Basil! I'll see about adding Opus support to my Premiere plug-in. VP9 support is already in there.

One thing though: this file and others made with FFmpeg gets an error from Google's WebM File Inspector. And I saw some other weird stuff involving timestamps in there. Does FFmpeg maybe have a few bugs to fix?


Brendan

j...@v2v.cc

unread,
Jan 4, 2014, 2:42:22 AM1/4/14
to webm-d...@webmproject.org
On 01/04/2014 08:28 AM, Brendan Bolles wrote:
> One thing though: this file and others made with FFmpeg gets an error
> from Google's WebM File Inspector. And I saw some other weird stuff
> involving timestamps in there. Does FFmpeg maybe have a few bugs to fix?

While working on support in Firefox I had to fix some bugs in FFmpeg.
Current master should be fine now.

On 01/04/2014 07:41 AM, Basil Mohamed Gohar wrote:
>
http://media.basilgohar.com/patent-absurdity/patent-absurdity_288p30.y4m_vp9-256kbps_opus-32kbps.webm

that file still has a codec delay of 0. That looks wrong.

| + Codec delay: 0.000ms (0ns)

Codec delay must match the PreSkip value in the OpusHeader (one is in
samples the other in nanoseconds).

Firefox will stop playing files that where this does not match:
https://bugzilla.mozilla.org/show_bug.cgi?id=951770

j...@v2v.cc

unread,
Jan 4, 2014, 3:04:57 AM1/4/14
to webm-d...@webmproject.org
mkvinfo patent-absurdity_288p30.y4m_vp9-256kbps_opus-32kbps.webm
...
| + Codec ID: A_OPUS
| + Codec delay: 0.000ms (0ns)
| + Seek pre-roll: 80.000ms (80000000ns)
...

Codec delay should most likely be 6.5ms

remuxing this file with ffmpeg from git master, fixes the issue and it
will also play in chrome (possibly only canary/unstable right now [1]):

ffmpeg -i patent-absurdity_288p30.y4m_vp9-256kbps_opus-32kbps.webm
-strict -2 -acodec copy -vcodec copy remux.webm

mkvinfo remux.webm
...
| + Codec ID: A_OPUS
| + Codec delay: 6.500ms (6500000ns)
| + Seek pre-roll: 80.000ms (80000000ns)
...


[1] https://code.google.com/p/chromium/issues/detail?id=315165

Brendan Bolles

unread,
Jan 7, 2014, 2:17:03 PM1/7/14
to webm-d...@webmproject.org
OK, I've posted a new beta of my Premiere plug-in with Opus support. I'd love for interested parties to take a look. I assume I'm not doing some things completely right, which is why this is beta software. Heck, there doesn't even seem to be an official standard for putting Opus into WebM yet.

http://github.com/fnordware/AdobeWebM


Basil, this plug-in can read the WebM file you posted, although somewhat poorly. I think the main problems are on the VP9 side though.


Brendan

Harmony Tinker

unread,
Sep 26, 2025, 9:28:46 AM (yesterday) Sep 26
to WebM Discussion, Brendan Bolles
There is a complete, tested, and successful guide for WebM/VP9 streaming to Icecast2, with examples and instructions. It’s definitely worth checking out, as the manual has recently been updated with the proper steps for correct broadcasting.

👉 Full manual & guide (EN/GR): https://f105.dos.gr

👉 Also available at: https://webm.win

💬 Live discussion on LowEndTalk.
https://lowendtalk.com/discussion/205646/livestreaming-1080p-vp9-webm-via-icecast-yes-it-works
Reply all
Reply to author
Forward
0 new messages