Closed Bug 1614958 Opened 4 years ago Closed 4 years ago

Disable VP9 support on Android devices without hardware decoder.

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: jhlin, Assigned: jya)

References

Details

Attachments

(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 jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/53b2c37566d3
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: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=289636671&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&searchStr=android%2C7.0%2Cx86-64%2Copt%2Cweb%2Cplatform%2Ctests%2Ctest-android-em-7.0-x86_64%2Fopt-geckoview-web-platform-tests-e10s-17%2Cw%28wpt17%29&revision=53b2c37566d36242e81ba00b836d6f589e3baf49

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=289636671&repo=autoland&lineNumber=3725

Backout link: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&searchStr=android%2C7.0%2Cx86-64%2Copt%2Cweb%2Cplatform%2Ctests%2Ctest-android-em-7.0-x86_64%2Fopt-geckoview-web-platform-tests-e10s-17%2Cw%28wpt17%29&revision=c0a39325bf4f577af57e131ecbab79b3cbe16aca

[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 jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4048d124b522
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

Backout: https://hg.mozilla.org/integration/autoland/rev/2028243a2ae4a96e938fdfab4075c7dbcc6e0bec

Failure push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=4048d124b5220f28b9423d26b76dc22cf93e4193

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=290019348&repo=autoland&lineNumber=1884

[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 jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe83145aa0b9
Disable VP9 codec in MSE on Android device with no VP9 hardware decoder. r=jolin
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d900c00b3756
Disable VP9 codec in MSE on Android device with no VP9 hardware decoder. r=jolin
Status: NEW → RESOLVED
Closed: 4 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.

Attachment

General

Created:
Updated:
Size: