W3C home > Mailing lists > Public > public-web-and-tv@w3.org > June 2018

Re: [media-and-entertainment] Color on the Web

From: Daiz via GitHub <sysbot+gh@w3.org>
Date: Fri, 15 Jun 2018 12:21:28 +0000
To: public-web-and-tv@w3.org
Message-ID: <issue_comment.created-397603899-1529065287-sysbot+gh@w3.org>
[I guess this would be relevant here?](https://daiz.github.io/yuv-to-rgb-in-html5-video/) There's some notable issues on the subject of YUV to RGB conversion and colorspaces on the web between browsers and video formats.

[Old post I made on HN](https://news.ycombinator.com/item?id=12022163) relevant to the linked test case (though my initial discovery of this issue dates further back):

>Basically, if the Result doesn't match up with Expected, the browser is doing it wrong. Ideally browsers should handle YUV colorspaces like so:
>H.264 video - look for colorspace tagging in the video by default and use it if available, otherwise fall back to guessing based on resolution. SD video (up to 1024x576) should be converted with Rec.601, HD video (width >1024 or height >576) with Rec.709.
>VP8 video - VP8 is defined as Rec.601 only, so always use it.
>Theora - Same as VP8.
>How browsers actually fare today (tested on Windows 10):
>IE11/Edge - Always assumes Rec.601 for H.264 video. Doesn't support VP8/Theora.
>Chrome - No colorspace tagging support for H.264. Converts HD video with Rec.709, SD video with Rec.601. 1024x576 is treated as HD already. VP8 is always converted with Rec.601 as it should. Theora gets Rec.601 in SD but incorrectly uses Rec.709 in HD.
>Firefox - No colorspace tagging support for H.264. HD uses Rec.709, SD uses Rec.601, 1024x576 treated as HD like in Chrome. VP8 and Theora both always use Rec.601 as they should.
>The unfortunate conclusion from this is that color accuracy is pretty much a crapshoot when dealing with HD video on the web. The only way to guarantee accurate results right now would be to convert your video to Rec.601 (if you're mastering HD video chances are you're using Rec.709 by default), serve VP8 video by default and have a Rec.601 H.264 fallback for IE/Edge (I haven't tested how Flash video playback handles this matter so you might also need a Rec.709 H.264 fallback for that).

As I see it, this issue is only going to get more pressing with BT.2020, 10-bit color and such coming into play.

GitHub Notification of comment by Daiz
Please view or discuss this issue at https://github.com/w3c/media-and-entertainment/issues/2#issuecomment-397603899 using your GitHub account
Received on Friday, 15 June 2018 12:21:30 UTC

This archive was generated by hypermail 2.3.1 : Friday, 15 June 2018 12:21:31 UTC