Last Comment Bug 833023 - (vp9) Implement VP9 video decoder in Firefox
(vp9)
: Implement VP9 video decoder in Firefox
Status: VERIFIED FIXED
: dev-doc-needed, feature
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: Trunk
: All All
: -- enhancement with 40 votes (vote)
: mozilla28
Assigned To: Jan Gerber
: Andrei Vaida, QA [:avaida] – please ni? me
Mentors:
: 959557 (view as bug list)
Depends on: 763495 884275 888789 918550 947325 1105293 1115096
Blocks: MSE html5test 1175696 881512 947160 949525 962560 968809 1173179 1183977
  Show dependency treegraph
 
Reported: 2013-01-21 10:06 PST by Markus Popp
Modified: 2015-12-07 14:53 PST (History)
87 users (show)
cdiehl: sec‑review? (cdiehl)
moz.mihaelav: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
28+


Attachments
mozilla-central_vp9.patch (2.82 KB, patch)
2013-09-19 12:13 PDT, Jan Gerber
no flags Details | Diff | Review
0001-add-vp9-support_v2.patch (3.22 KB, patch)
2013-12-03 02:08 PST, Jan Gerber
cpearce: feedback+
Details | Diff | Review
0001-Add-VP9-Support.patch (4.66 KB, patch)
2013-12-03 16:21 PST, Jan Gerber
kinetik: review+
Details | Diff | Review

Description Markus Popp 2013-01-21 10:06:12 PST
VP9, being an open and royalty free video compression standard and the successor of VP8 has recently been implemented in Chromium, and should be supported by Firefox too.

http://src.chromium.org/viewvc/chrome?view=rev&revision=172738
Comment 1 Scott Baker 2013-05-10 16:15:25 PDT
Should this be marked parity with Chrome? Chrome supports VP9 as of version 25.

http://en.wikipedia.org/wiki/VP9
Comment 3 NVD 2013-05-18 14:53:01 PDT
http://www.youtube.com/watch?v=K6JshvblIcM

Hope VP9 decoding support can be implemented soon, VP9 is big improvement over VP8.
Comment 4 lainiwaku 2013-06-16 11:47:36 PDT
"Chromium has VP9 decoding support enabled by default in latest chrome builds."
and youtube already begin to encode video on vp9

come on mozilla, you was late for h264, now you are late for vp9 ...
Comment 5 Scott Baker 2013-06-16 13:40:21 PDT
The final bitstream codec hasn't even been released yet. It's due to be released tomorrow actually.

https://groups.google.com/a/webmproject.org/forum/?fromgroups=#!topic/webm-discuss/UzoX7owhwB0

What Google has put in Chrome already was the test/beta versions. When the spec is final we'll evaluate inclusion in Firefox.
Comment 6 Willy_ Foo_Foo 2013-06-18 00:31:59 PDT
https://groups.google.com/a/webmproject.org/forum/#!msg/webm-discuss/UzoX7owhwB0/XVIZVDG9rm0J


Google has just enabled in chromium - VP9 by default
Comment 8 Jan Gerber 2013-09-19 12:13:17 PDT
Created attachment 807350 [details] [diff] [review]
mozilla-central_vp9.patch

needs https://github.com/kinetiknz/nestegg/pull/13 to be pulled into mozilla-central tree and libvpx with vp9 support (i.e. via --with-system-libvpx)
Comment 9 Ralph Giles (:rillian) needinfo me 2013-09-19 15:44:12 PDT
Thanks, Jan! I've filed bug 918550 about updating our in-tree libvpx.
Comment 10 Florian Bender 2013-11-21 06:08:22 PST
Adding Bug 884275 to allow for proper script detection of VP9 support in Fx.
Comment 11 Jan Gerber 2013-12-03 02:08:46 PST
Created attachment 8341614 [details] [diff] [review]
0001-add-vp9-support_v2.patch

- rebase patch on top of inbound + Bug 918550
- add vpx_codec_vp9_dx/vpx_codec_vp9_cx to layout/media/symbols.def.in
Comment 12 Chris Pearce (:cpearce) 2013-12-03 13:38:29 PST
Comment on attachment 8341614 [details] [diff] [review]
0001-add-vp9-support_v2.patch

Review of attachment 8341614 [details] [diff] [review]:
-----------------------------------------------------------------

Please make the following changes, and then request review from kinetik, he reviews WebMReader.

::: content/media/webm/WebMReader.cpp
@@ +281,4 @@
>          Cleanup();
>          return NS_ERROR_FAILURE;
>        }
> +      mVideoCodec = nestegg_track_codec_id(mContext, track);

To reduce the cleanup paths, please change this block to:

  vpx_codec_iface_t* dx = nullptr;
  mVideoCodec = nestegg_track_codec_id(mContext, track);
  if (mVideoCodec == NESTEGG_CODEC_VP8) {
    dx = vpx_codec_vp8_dx();
  } else if (mVideoCodec == NESTEGG_CODEC_VP9) {
    dx = vpx_codec_vp9_dx();
  }
  if (!dx || vpx_codec_dec_init(&mVP8, dx, nullptr, 0)) {
    Cleanup();
    return NS_ERROR_FAILURE;
  }

Please also rename WebMReader::mVP8 to mVPX.
Comment 13 Jan Gerber 2013-12-03 16:21:35 PST
Created attachment 8342033 [details] [diff] [review]
0001-Add-VP9-Support.patch
Comment 14 Ralph Giles (:rillian) needinfo me 2013-12-06 08:55:06 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/e070e04b0795
Comment 15 Ryan VanderMeulen [:RyanVM] 2013-12-06 12:38:42 PST
https://hg.mozilla.org/mozilla-central/rev/e070e04b0795
Comment 16 Florian Bender 2013-12-06 12:42:43 PST
Setting relnote? assuming this is on by default for everyone (pending Bug 947325 for Linux).
Comment 17 Ralph Giles (:rillian) needinfo me 2013-12-06 13:43:56 PST
Yes, that's correct. Also setting dev-doc-needed for https://developer.mozilla.org/docs/HTML/Supported_media_formats &c.
Comment 18 Andrei Vaida, QA [:avaida] – please ni? me 2013-12-12 05:30:57 PST
Hi Jan, does this feature require manual QA?

If that is the case, could you please advise on how should I proceed with the validation of this feature? The following aspects would be very useful:
1. Automation coverage for this feature.
2. Things to keep in mind while verifying and performing regression testing.
3. Anything else you think that might help me verify this feature.
Comment 19 Jan Gerber 2013-12-12 08:54:08 PST
(In reply to Andrei Vaida, QA [:AndreiVaida] from comment #18)
> Hi Jan, does this feature require manual QA?
> 
> If that is the case, could you please advise on how should I proceed with
> the validation of this feature? The following aspects would be very useful:
> 1. Automation coverage for this feature.
> 2. Things to keep in mind while verifying and performing regression testing.
> 3. Anything else you think that might help me verify this feature.

(a) Adding Automated testing is tracked in Bug 949525
(b) Manual verification can be done i.e. with content/media/test/vp9.webm
    to verify visually that it plays back correctly. (once Bug 949525 is fixed)
Comment 20 Andrei Vaida, QA [:avaida] – please ni? me 2013-12-13 06:41:15 PST
Thank you Jan. I was able to successfully verify this feature using the latest Aurora (BuildID: 20131213004002) on Windows 7 x64, Mac OS X 10.9 and Ubuntu 13.10 x64, with the files "vp9cake.webm" and "vp9.webm" from Bug 949525.

Also, I'm not sure if the following notes are relevant at this point, but I thought they were worth mentioning:
- Google Chrome cannot playback the two *.webm files attached to Bug 949525.
- http://www.youtube.com/html5 states that the latest Aurora does not support "MSE & WebM VP9".

I will test this feature further when additional test files will be available.
Comment 21 Jan Gerber 2013-12-13 06:52:56 PST
(In reply to Andrei Vaida, QA [:AndreiVaida] from comment #20)
> - Google Chrome cannot playback the two *.webm files attached to Bug 949525.
This is due to the opus audio track.
Opus Support is Chrome currently broken: https://code.google.com/p/chromium/issues/detail?id=104241

> - http://www.youtube.com/html5 states that the latest Aurora does not
> support "MSE & WebM VP9".
For MSE support, check Bug 881512
Comment 22 Kevin Brosnan [:kbrosnan] 2014-01-14 13:12:37 PST
*** Bug 959557 has been marked as a duplicate of this bug. ***
Comment 23 Andrei Vaida, QA [:avaida] – please ni? me 2014-01-22 04:23:36 PST
Jan, I noticed that all the VP9-encoded test files previously attached to Bug 949525 are currently marked as obsolete. Are there any new video samples available for testing purposes? Or maybe a page featuring an embedded video of the same format?
Comment 24 Alex Xu 2014-01-22 05:12:05 PST
(In reply to Andrei Vaida, QA [:AndreiVaida] from comment #23)
> Jan, I noticed that all the VP9-encoded test files previously attached to
> Bug 949525 are currently marked as obsolete. Are there any new video samples
> available for testing purposes? Or maybe a page featuring an embedded video
> of the same format?

http://base-n.de/webm/VP9%20Sample.html
Comment 25 Jan Gerber 2014-01-22 05:49:05 PST
(In reply to Andrei Vaida, QA [:AndreiVaida] from comment #23)
> Jan, I noticed that all the VP9-encoded test files previously attached to
> Bug 949525 are currently marked as obsolete. Are there any new video samples
> available for testing purposes? Or maybe a page featuring an embedded video
> of the same format?

The files attached to Bug 949525 are still good test files,
they are part of the automated test suite and only marked
as obsolete since they where included in the patch that got committed: https://bugzilla.mozilla.org/show_bug.cgi?id=949525#c10
Comment 26 Andrei Vaida, QA [:avaida] – please ni? me 2014-01-22 06:25:16 PST
(In reply to Alex Xu from comment #24)
> http://base-n.de/webm/VP9%20Sample.html

Thanks Alex!

(In reply to Jan Gerber from comment #25)
> (In reply to Andrei Vaida, QA [:AndreiVaida] from comment #23)
> The files attached to Bug 949525 are still good test files,
> they are part of the automated test suite and only marked
> as obsolete since they where included in the patch that got committed:
> https://bugzilla.mozilla.org/show_bug.cgi?id=949525#c10

Hi Jan, thank you for clarifying this.
Comment 27 Andrei Vaida, QA [:avaida] – please ni? me 2014-02-12 07:10:57 PST
The feature was thoroughly tested and all the associated test cases were successfully executed, uncovering minor issues only. 

The latest smoke tests performed on Firefox 28 Beta 1 also uncovered no major issues.
Comment 28 Mihaela Velimiroviciu (:mihaelav) 2014-03-05 06:08:30 PST
Adding in-testsuite+ since this is covered automatically by
content/media/test/can_play_type_webm.js
content/media/test/manifest.js
content/media/test/mochitest.ini
content/media/test/vp9.webm
content/media/test/vp9cake.webm

tracked in bug 949525.
Comment 29 Andrei Vaida, QA [:avaida] – please ni? me 2014-03-06 05:14:55 PST
Jan, I was running some smoke tests on this feature to make sure that everything is working as expected before its release, when I stumbled over the following error that's being thrown in the Browser Console of both latest Aurora (Build ID: 20140306004001) [1] and latest Nightly (Build ID: 20140305170806) [2]:

(Browser Console error)
> Media resource https://moztrap.mozilla.org/media/attachments/2014/01/22/vp9cake.webm 
> could not be decoded.
The latest Beta (Build ID: 20140303165517) [3] seems to be running the vp9-encoded video sample from that URL [4].


[1] Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
[2] Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:30.0) Gecko/20100101 Firefox/30.0
[3] Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
[4] https://moztrap.mozilla.org/media/attachments/2014/01/22/vp9cake.webm
Comment 30 Jan Gerber 2014-03-06 06:03:56 PST
https://moztrap.mozilla.org/media/attachments/2014/01/22/vp9cake.webm
is not the version that is checked into hg content/media/test/vp9cake.webm

My guess would be that you are not testing with the latest version of vp9cake.webm.
An earlier version was in fact invalid and is explicitly not support anymore (Bug 951770)

I am able to play the version that is in mozilla-central:

 http://hg.mozilla.org/mozilla-central/raw-file/d2dac18d0562/content/media/test/vp9cake.webm
Comment 31 Ralph Giles (:rillian) needinfo me 2014-03-06 10:35:52 PST
Yes, confirmed. the version moztrap is serving has incorrect opus headers and is correctly rejected by aurora and nightly.
Comment 32 Andrei Vaida, QA [:avaida] – please ni? me 2014-03-06 22:40:30 PST
Jan, Ralph - thank you for clarifying this, I was indeed accidentally running an outdated version of vp9cake.webm.
Comment 33 avada 2014-07-05 02:35:25 PDT
It's not normal that after disabling "media.webm.enabled" and "media.encoder.webm.enabled" youtube shows that MSE & WebM VP9 is supported and videos start to play in webm/VP9 format, right?

("WebM VP8" is shown to be not supported)
Comment 34 Anthony Jones (:kentuckyfriedtakahe, :k17e) 2014-07-06 18:32:44 PDT
(In reply to avada from comment #33)
> It's not normal that after disabling "media.webm.enabled" and
> "media.encoder.webm.enabled" youtube shows that MSE & WebM VP9 is supported
> and videos start to play in webm/VP9 format, right?

Try setting media.mediasource.enabled to false.
Comment 35 avada 2014-07-07 04:29:24 PDT
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #34)

> Try setting media.mediasource.enabled to false.

But what if I only want to disable VP9. Which is a valid reason because it has exorbitant CPU usage and no hardware acceleration, and as such is unplayable.
Disabling whole webm is already a sacrifice, but not a great one since youtube (the de facto web video site) mostly moved to VP9.
But if I disable MSE too I loose most of the higher resolution/quality videos.

(Ignoring the fact that for now since bug 1027875 landed both vp9 and AVC youtube videos play without audio and only for 32 seconds.)
Comment 36 Ralph Giles (:rillian) needinfo me 2014-07-07 11:01:01 PDT
(In reply to avada from comment #33)
> It's not normal that after disabling "media.webm.enabled" and
> "media.encoder.webm.enabled" youtube shows that MSE & WebM VP9 is supported
> and videos start to play in webm/VP9 format, right?

That does sounds like an oversight. If you'd like it to apply both (or have separate prefs for each codec) please file a new bug. That's easier to track than followup on old, fixed bugs.
Comment 37 Anthony Jones (:kentuckyfriedtakahe, :k17e) 2014-07-07 18:42:16 PDT
(In reply to avada from comment #35)
> But what if I only want to disable VP9. Which is a valid reason because it
> has exorbitant CPU usage and no hardware acceleration, and as such is
> unplayable.
> Disabling whole webm is already a sacrifice, but not a great one since
> youtube (the de facto web video site) mostly moved to VP9.
> But if I disable MSE too I loose most of the higher resolution/quality
> videos.

MP4 does not work with MSE yet so you should disable MSE if you don't want WebM.
Comment 38 Matthew Gregan [:kinetik] 2014-07-07 23:21:41 PDT
(In reply to Ralph Giles (:rillian) from comment #36)
> That does sounds like an oversight. If you'd like it to apply both (or have
> separate prefs for each codec) please file a new bug. That's easier to track
> than followup on old, fixed bugs.

Bug 1035622 now covers this.(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #37)
Comment 39 Leman Bennett [Omega] 2014-07-08 00:49:02 PDT
Turning off MSE is wise. None of it works well at the moment.
Comment 40 medichit 2014-12-28 12:12:11 PST Comment hidden (spam)
Comment 41 Clemens Eisserer 2015-03-01 13:52:32 PST
Any idea, what I still only get VP8 videos with FF36 on youtube limited to 360p, while Chrome receives VP9 streams with up to 1080p?

Also on youtube.com/html5 I get "MSE & WebM VP9" = disabled.
Comment 42 avada 2015-03-01 15:27:30 PST
(In reply to Clemens Eisserer from comment #41)
> Any idea, what I still only get VP8 videos with FF36 on youtube limited to
> 360p, while Chrome receives VP9 streams with up to 1080p?
> 
> Also on youtube.com/html5 I get "MSE & WebM VP9" = disabled.

The place for support is support.mozilla.org
Anyway, because it's disabled, because it's not fully enable implemented.media.mediasource.enabled in about:config. Then you'll get all resolutions.
Comment 43 avada 2015-03-01 15:29:07 PST
(In reply to avada from comment #42)
> The place for support is support.mozilla.org
> Anyway, because it's disabled, because it's not fully enable
> implemented.media.mediasource.enabled in about:config. Then you'll get all
> resolutions.

Well this got effed... Supposed to be "enable media.mediasource.enabled"
Comment 44 Anthony Jones (:kentuckyfriedtakahe, :k17e) 2015-03-02 06:37:17 PST
MSE is not supported in Firefox 36. MSE support for MP4 is enabled 37 beta for Mac and Windows Vista and up.
Comment 45 Clemens Eisserer 2015-03-02 07:30:51 PST
Will MSE für VP9 be enabled anytime soon on Linux?
Comment 46 Anthony Jones (:kentuckyfriedtakahe, :k17e) 2015-03-02 07:55:07 PST
(In reply to Clemens Eisserer from comment #45)
> Will MSE für VP9 be enabled anytime soon on Linux?

Not soon.
Comment 47 Clemens Eisserer 2015-03-12 15:18:37 PDT
Hmm, even with enable media.mediasource.enabled, VP9 playback on Youtube has all kinds of issues on Linux.
Unfortunately it seems, Firefox is not a good choice for youtube.com-users running Linux currently :/
Comment 48 Dave Garrett 2015-03-12 15:43:04 PDT
(In reply to Clemens Eisserer from comment #47)
> Unfortunately it seems, Firefox is not a good choice for youtube.com-users
> running Linux currently :/

I just use the HTML5 Video Everywhere addon to force Firefox's built in video player instead of YouTube's crappy one and I've disabled webm and set it to only use mp4. Works fantastically better. YMMV

A new bug for Linux issues should probably be filed instead of commenting here further.
Comment 49 Luke 2015-04-06 15:57:19 PDT
For those wondering how to enable MSE & WebM VP9 in Firefox nightly, you must leave:

media.webm.enabled=true (default)

media.mediasource.enabled=true (default)

You must change:

media.mediasource.webm.enabled=true (user-set)
Comment 50 Dan 2015-04-10 11:56:09 PDT
(In reply to Luke from comment #49)
> For those wondering how to enable MSE & WebM VP9 in Firefox nightly, you
> must leave:
> 
> media.webm.enabled=true (default)
> 
> media.mediasource.enabled=true (default)
> 
> You must change:
> 
> media.mediasource.webm.enabled=true (user-set)

Same works on Fx37, nightly not required.
Comment 51 Scott Baker 2015-04-10 11:59:04 PDT
Are the directions in #49 platform agnostic? Or are they Windows specific? I want to get this working under Linux.
Comment 52 Dave Garrett 2015-04-10 12:01:30 PDT
(In reply to Scott Baker from comment #51)
> Are the directions in #49 platform agnostic? Or are they Windows specific? I
> want to get this working under Linux.

All the webm stuff is generally platform agnostic. The decoder is built-into Firefox. It's just the h.264 & mp3 stuff that's platform dependent.
Comment 53 Scott Baker 2015-04-10 12:02:53 PDT
I should have been more specific. Are the MediaSource options platform agnostic?
Comment 54 Dave Garrett 2015-04-10 12:11:22 PDT
(In reply to Scott Baker from comment #53)
> I should have been more specific. Are the MediaSource options platform
> agnostic?

The same prefs need to be set as in comment 49, but one is defaulted to off still. If you turn it all on it should work though. (youtube.com/html5 says "MSE & WebM VP9" is enabled for me, at least)
Comment 55 Dan 2015-04-10 14:19:44 PDT
(In reply to Dave Garrett from comment #54)
> (In reply to Scott Baker from comment #53)
> > I should have been more specific. Are the MediaSource options platform
> > agnostic?
> 
> The same prefs need to be set as in comment 49, but one is defaulted to off
> still. If you turn it all on it should work though. (youtube.com/html5 says
> "MSE & WebM VP9" is enabled for me, at least)

Same here.  Also, if you right click you can click on the video, click on "stats for nerds" and you will see the codec is vp9 (assuming the video exists in vp9).
Comment 56 Clemens Eisserer 2015-04-10 14:26:22 PDT
At least for me, youtube with VP9 doesn't work reliable in Firefox.
From time to time clips don't continue loading and are stuck at e.g. 30%, also when jumping inside a clip it quite often simply does not play any further after some jumps.
Comment 57 Dan 2015-04-10 14:30:56 PDT
(In reply to Clemens Eisserer from comment #56)
> At least for me, youtube with VP9 doesn't work reliable in Firefox.
> From time to time clips don't continue loading and are stuck at e.g. 30%,
> also when jumping inside a clip it quite often simply does not play any
> further after some jumps.

I haven't seen that, yet.  What are your PC specs, out of curiosity?
Comment 58 Leman Bennett [Omega] 2015-04-10 14:54:20 PDT
Mediasource Extensions is very much still a work in progress.
https://bugzilla.mozilla.org/show_bug.cgi?id=778617
Comment 59 Anthony Jones (:kentuckyfriedtakahe, :k17e) 2015-04-21 18:37:50 PDT
(In reply to Clemens Eisserer from comment #56)
> At least for me, youtube with VP9 doesn't work reliable in Firefox.
> From time to time clips don't continue loading and are stuck at e.g. 30%,
> also when jumping inside a clip it quite often simply does not play any
> further after some jumps.

That is why it is disabled in nightly.
Comment 60 Djfe 2015-06-09 15:57:48 PDT
something bad about MSE & Webm VP9 is that youtube only delivers VP8 360p :/
so that I need to enforce the Flash Player on Linux to get better quality

Is someone still working on this? (since the last post is from april)
Comment 61 Djfe 2015-06-09 16:10:53 PDT
I opened a bug for the specific isse I'm experiencing with MSE & Web VP9 on Fedora 21 with Firefox 38.0.5
Comment 62 Anthony Jones (:kentuckyfriedtakahe, :k17e) 2015-06-09 20:56:42 PDT
(In reply to Djfe from comment #60)
> Is someone still working on this? (since the last post is from april)

This feature is VP9 support in Firefox and is complete hence the closed bug and no further comments in this bug. MSE support is being tracked in bug 778617.
Comment 63 Djfe 2015-06-11 15:53:02 PDT
oh I totally forgot to copy&paste the bugzilla link here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1173179

is the description ok?
Comment 64 Anthony Jones (:kentuckyfriedtakahe, :k17e) 2015-07-05 13:17:23 PDT
Chris - I don't think we should be tracking MSE related issues on this bug because they're outside of the scope of what was originally done here.

Note You need to log in before you can comment on or make changes to this bug.