Closed Bug 1580695 Opened 5 years ago Closed 5 years ago

[regression] YouTube forces HDR on some videos (on a non-HDR screen)

Categories

(Core :: Audio/Video: Playback, defect, P2)

67 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla72
Tracking Status
firefox-esr68 --- fixed
firefox69 --- wontfix
firefox70 + wontfix
firefox71 + verified
firefox72 --- verified

People

(Reporter: yoasif, Assigned: jya)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: regression)

Attachments

(3 files)

As seen on reddit: https://www.reddit.com/r/firefox/comments/d33st1/why_does_firefox_force_you_to_watch_youtube_in/

STR:

  1. Navigate to https://www.youtube.com/watch?v=b5oTiLmEdgU
  2. Play video

What happens:

The video plays back in HDR, and the resolution switcher in YouTube does not allow the user to switch back to SDR video. This results in washed out video.

Expected result:

I don't have an HDR display; I don't expect YouTube's player to serve me HDR content.

17:20.35 INFO: Last good revision: a7b675fcb8d31cbbdfcf9179303d49ec294647e0
17:20.35 INFO: First bad revision: 43b78a85f3266f65c0ed4045e28c16dec90b480c
17:20.35 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a7b675fcb8d31cbbdfcf9179303d49ec294647e0&tochange=43b78a85f3266f65c0ed4045e28c16dec90b480c

[Tracking Requested - why for this release]:

This is a regression on video content on the top video site on the web.

Has Regression Range: --- → yes
Has STR: --- → yes
Regressed by: 1533129
Attached image FF71 screenshot

Thanks Asif for the report and regression range. I can reproduce this issue in FF Nightly 71 on MacOS, doesn't reproduce in FF58.

Attached image FF58 screenshot

Nils, could you have someone take a look at this please?

Flags: needinfo?(drno)

I can repro as well. Looks better in ESR 60.0.8.

Alastor could you please have a look on what we could do not have YouTube (and other sites) give us HDR content without HDR support?

Flags: needinfo?(drno) → needinfo?(alwu)

According to this article [1], when websites want to play HDR content, they should not only check MediaSource.isTypeSupported(), but also check if user's screen supports showing HDR or not. I think Youtube only checks MediaSource.isTypeSupported(), which could only tell that we can decode HDR content, but not ensure that we can show HDR video. I'll contact them and ask them to add more checking before providing video content.

[1] https://developers.google.com/web/updates/2017/12/chrome-63-64-media-updates#hdr-video-playback-windows-10

Flags: needinfo?(alwu)
Blocks: HDR

I have reported this issue to them on mozilla-youtube-discussion, so now we need to wait for their response.

This bug is similar but not a duplicate of bug:1576020. I have an HDR monitor and a video card capable of HDR so for me the YouTube HDR content does not display properly.

oh, sorry, I will remove a duplicate.

(In reply to Alastor Wu [:alwu] from comment #5)

According to this article [1], when websites want to play HDR content, they should not only check MediaSource.isTypeSupported(), but also check if user's screen supports showing HDR or not. I think Youtube only checks MediaSource.isTypeSupported(), which could only tell that we can decode HDR content, but not ensure that we can show HDR video. I'll contact them and ask them to add more checking before providing video content.

[1] https://developers.google.com/web/updates/2017/12/chrome-63-64-media-updates#hdr-video-playback-windows-10

I'm the one who reported this issue on reddit. I was just wondering: since you don't support HDR playback yet through Firefox, could you not for the moment serve SDR to everyone? No matter what display they use? Since I understand from Bug 1576020 that HDR playback on an HDR monitor is simply broken as well (or at the very least for some of the users).

So for now you could simply let YouTube now through the browser that you don't support HDR yet?

Priority: -- → P2

(In reply to dusty-2011 from comment #10)

I'm the one who reported this issue on reddit. I was just wondering: since you don't support HDR playback yet through Firefox, could you not for the moment serve SDR to everyone? No matter what display they use? Since I understand from Bug 1576020 that HDR playback on an HDR monitor is simply broken as well (or at the very least for some of the users).

So for now you could simply let YouTube now through the browser that you don't support HDR yet?

On playback side, we're good to decode and play HDR content, but I'm not really familiar how the graphic engine renders those HDR frames and not sure what the progress of the project to support rendering HDR currently is. However, from Chrome's article [1], website should check all these properties to ensure that the user agent is able to render HDR content. For now, only MediaSource.isTypeSupported() would return true, and other two would be false. So based on those criteria, Youtube should not provide HDR content to us.

[1] https://developers.google.com/web/updates/2017/12/chrome-63-64-media-updates#hdr-video-playback-windows-10

Alastor, are you still waiting for answers from YouTube?
Too late for a fix in 70 but we could still take a patch for 71/72.

Yes, I believe the problem is on their side, Youtube should check all possible HDR related attributes to decide whether the user side supports playing HDR content.

Flags: needinfo?(alwu)

Sounds like YouTube has now added a check, though I'm not sure of the timing of their fix.
yoasif, or dusty, do you still see the issue or is it fixed for you now?

Flags: needinfo?(yoasif)
Flags: needinfo?(dusty-2011)

Unfortunately still seeing the reported video as HDR only.

Flags: needinfo?(yoasif)

Nothing has changed here. I tried several HDR videos on YouTube and was served HDR instead of SDR for all of them. The videos are still washed out.

Flags: needinfo?(dusty-2011)

We're discussing possible solutions with Youtube for this.

As per discussion with :astevenson ; going to remove the support for those extra mime parameter, they aren't per spec and MediaCapabilities should be used.

Assignee: nobody → jyavenard

This change was a workaround a Youtube bug that expected a particular behaviour from old TV and that we were exploiting. It was adding support for unsupported, unofficial code.

MediaCapabilities is how things should be done.

Making this code to work conditionally is too much effort. Reverting it entirely is easier.

I think removing our ability to handle YT's non-spec args here means that the YT code moves us back to the "this browser gives bogus answers, so just serve them the default options". However, I think there's another issue here, which is that the stated HDR filtering mechanism used by YT does not seem to work as they state.

If nothing else Firefox will, as far as I can tell, never report true for the following:

window.matchMedia('(color-gamut: p3)').matches

We do not implement color-gamut yet for matchMedia (see https://bugzilla.mozilla.org/show_bug.cgi?id=1422237) -- we will return false for any such checks. If this is used to gate serving of HDR content, Firefox should never pass that gate.

I've followed up on the mailing list about this. I'd like to see if there's any movement there before moving forward.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72

Given that this is tracking+ for Fx71, we should probably not call this wontfix yet. Would be good if we could get verification that things look better on Nightly now, though.

YouTube no longer forces HDR for the test page in STR for me in the latest Nightly.

Please nominate this for Beta and ESR68 approval when you get a chance. It grafts cleanly as-landed.

Flags: needinfo?(jyavenard)

Hi, I will update the flags since this issue seems to be Fixed in our latest Nightly build based on Comment 24.

Comment on attachment 9101731 [details]
Bug 1580695 - Revert bug 1533129.

Beta/Release Uplift Approval Request

  • User impact if declined: people get served content that they can't play properly (washed up colours)
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Described in the bug description
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The only known regression is when running on a FireTV, geckoview will get served 1080p instead of 4K. This is now an unsupported platforms.
  • String changes made/needed: none

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration:
  • User impact if declined:
  • Fix Landed on Version:
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky):
  • String or UUID changes made by this patch:
Flags: needinfo?(jyavenard)
Attachment #9101731 - Flags: approval-mozilla-esr68?
Attachment #9101731 - Flags: approval-mozilla-beta?
QA Whiteboard: [qa-triaged]

Comment on attachment 9101731 [details]
Bug 1580695 - Revert bug 1533129.

Long standing regression for some youtube videos, has testrs and was on nightly for close to 3 weeks, uplift approved for 71 beta 10, thanks.

Attachment #9101731 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Confirmed issue with 70.0.1
Fix verified with 72.0a1 (2019-11-13), and 71.0b10(task cluster build) on Windows 10, macOS 10.0.5, Ubuntu1 18.04.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Comment on attachment 9101731 [details]
Bug 1580695 - Revert bug 1533129.

Fixes a Youtube video playback issue on some devices. Approved for 68.3esr.

Attachment #9101731 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: