Closed Bug 1614958 Opened 2 years ago Closed 2 years ago

Disable VP9 support on Android devices without hardware decoder.


(Core :: Audio/Video: Playback, enhancement, P1)




Tracking Status
firefox75 --- fixed


(Reporter: jhlin, Assigned: jya)




(1 file)

Youtube uses MediaSource.isTypeSupported() to determine whether VP9 video is supported and prefers it over H.264 when it returns true. However, older devices, such as Moto G5, cannot play VP9 video >= 1080p smoothly. In order to make Youtbue serve H.264 video instead of H.264 on those devices, check if hardware decoder is available and let isTypeSupported() return false if not.

Hand this over to :jya. Thanks for the help!

Assignee: jolin → jyavenard

We remove the old behaviour that if webm was disabled it would be overridden under some circumstances.
Instead we replace if with a new specialised preference (media.mediasource.vp9.enabled) that is only disabled on Android.

If this pref is disabled, vp9 will only be enabled under some conditions:

  • h264 HW decoding is not supported
  • mp4 is not enabled
  • Device was deemed fast enough to decode VP9 via the P9Benchmark utility
  • On Android, A VP9 HW decoder is present.

The primary observable result is that YouTube will serve H264 content on devices with no hardware VP9 decoder

Pushed by
Disable VP9 codec in MSE on Android device with no VP9 hardware decoder. r=jolin

Backed out changeset 53b2c37566d3 (Bug 1614958) for causing wpt failure /media-source/mediasource-changetype-play-implicit.html

Push with failure:

Failure log:

Backout link:

[task 2020-02-20T03:16:34.006Z] 03:16:34     INFO - TEST-START | /media-source/mediasource-changetype-play-implicit.html
[task 2020-02-20T03:16:34.009Z] 03:16:34     INFO - Closing window 70
[task 2020-02-20T03:16:36.777Z] 03:16:36     INFO - 
[task 2020-02-20T03:16:36.777Z] 03:16:36     INFO - TEST-UNEXPECTED-FAIL | /media-source/mediasource-changetype-play-implicit.html | Check if browser supports enough test media types and pairs of audio-only or video-only media with same bytestream format - assert_true: Browser doesn't support at least 2 audio-only or 2 video-only test media with same bytestream format expected true got false
[task 2020-02-20T03:16:36.777Z] 03:16:36     INFO - generateImplicitChangeTypeTests/<@http://web-platform.test:8000/media-source/mediasource-changetype-play-implicit.html:61:16
[task 2020-02-20T03:16:36.777Z] 03:16:36     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1867:25
[task 2020-02-20T03:16:36.777Z] 03:16:36     INFO - async_test@http://web-platform.test:8000/resources/testharness.js:584:22
[task 2020-02-20T03:16:36.777Z] 03:16:36     INFO - generateImplicitChangeTypeTests@http://web-platform.test:8000/media-source/mediasource-changetype-play-implicit.html:51:13
[task 2020-02-20T03:16:36.777Z] 03:16:36     INFO - findSupportedChangeTypeTestTypes@http://web-platform.test:8000/media-source/mediasource-changetype-util.js:110:5
[task 2020-02-20T03:16:36.777Z] 03:16:36     INFO - @http://web-platform.test:8000/media-source/mediasource-changetype-play-implicit.html:85:33
Flags: needinfo?(jyavenard)
Regressions: 1617085
Pushed by
Disable VP9 codec in MSE on Android device with no VP9 hardware decoder. r=jolin

Backed out changeset 4048d124b522 (bug 1614958) for mda failures at dom/media/mediasource/test/test_AbortAfterPartialMediaSegment.html


Failure push:

Failure log:

[task 2020-02-22T12:00:31.692Z] 12:00:31 INFO - 15 INFO TEST-START | dom/media/mediasource/test/test_AbortAfterPartialMediaSegment.html
[task 2020-02-22T12:00:31.692Z] 12:00:31 WARNING - 16 INFO TEST-UNEXPECTED-FAIL | dom/media/mediasource/test/test_AbortAfterPartialMediaSegment.html | failed with error NotSupportedError
[task 2020-02-22T12:00:31.692Z] 12:00:31 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:299:16
[task 2020-02-22T12:00:31.692Z] 12:00:31 INFO - runWithMSE@dom/media/mediasource/test/mediasource.js:33:7
[task 2020-02-22T12:05:33.721Z] 12:05:33 WARNING - 17 INFO TEST-UNEXPECTED-FAIL | dom/media/mediasource/test/test_AbortAfterPartialMediaSegment.html | Test timed out.
[task 2020-02-22T12:05:33.721Z] 12:05:33 INFO - SimpleTest.ok@SimpleTest/SimpleTest.js:299:16
[task 2020-02-22T12:05:33.722Z] 12:05:33 INFO - reportError@SimpleTest/TestRunner.js:128:22
[task 2020-02-22T12:05:33.722Z] 12:05:33 INFO - TestRunner._checkForHangs@SimpleTest/TestRunner.js:150:18

Flags: needinfo?(jyavenard)
Pushed by
Disable VP9 codec in MSE on Android device with no VP9 hardware decoder. r=jolin
Pushed by
Disable VP9 codec in MSE on Android device with no VP9 hardware decoder. r=jolin
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Flags: needinfo?(jyavenard)
See Also: → 1261273
You need to log in before you can comment on or make changes to this bug.