[Webkit-unassigned] [Bug 181445] WebGL video texture black in Safari 11.0.2 and wrong colored in Safari Preview 11.1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 10 17:19:19 PST 2018
--- Comment #19 from Jer Noble <jer.noble at apple.com> ---
(In reply to Klaus Reinfeld from comment #18)
> (In reply to Jer Noble from comment #17)
> > However, if you add the ffmpeg flags to make the colorspace, primaries,
> > transfer function, and range explicit (rather than implicit from the pixel
> > format), the color comes out correctly in a sample WebGL test:
> > ffmpeg -r 30 -f image2 -s 1920x1080 -i SMPTE_Color_Bars_16x9/%d.png -vcodec
> > libx264 -crf 25 -pix_fmt yuvj420p -color_primaries bt709 -color_trc bt709
> > -colorspace bt709 -color_range pc test-colorspace-bt709-420f.mp4
> I have added an additional video ('yuvj420p-bt709') encoded with these
> settings to the test case:
> and yes, with these settings the colors are correct.
> > You can verify that these metadata flags are added to the output file with
> > mediainfo:
> > > mediainfo test-colorspace-bt709-420f.mp4
> > ...snip...
> > Color range : Full
> > Color primaries : BT.709
> > Transfer characteristics : BT.709
> > Matrix coefficients : BT.709
> Sorry, I don't know about 'mediainfo'
mediainfo is a command-line (or GUI) tool that pulls metadata out of media files. <https://github.com/MediaArea>
It's not important in and of itself except that it verifies that color metadata is present in the file.
> but here the video files from the
> above example for downloading (~30mb per file):
> > So you probably just need to make your colorspaces explicit, so that UAs can
> > apply the correct transforms when generating RGB output.
> Okay, but that can't be the solution, or?
If you want correct colors, it has to be. The matrices to generate RGB data from the media's YCbCr data are different depending on what those color metadata values are.
Tagging media files with color metadata is a best-practices thing, and not including it means you're going to have a bad time.
> All other videoplayers (also the Quicktime player) are showing the color
> correct also without that settings.
> So maybe a kind of 'default behavior' when these settings are missing is
> wrong in the Safari WebGL video texture color conversion?
That's true. And I do need to figure out what's causing the green cast. But note that the different video players and UAs are showing "correct" colors, but not necessarily the same colors. Hence the point above.
> Btw - about the BLACK texture problem in Safari 11.0.2 with that example:
> Could that be related to this bug?:
> A broken OpenGL state could explain the behavior why some codes/examples are
> working and some others not...
That's also true. I never really determined what specific piece of state was getting trampled on, so I don't have an easy answer for you about how to work around this behavior. It might be useful to use the OpenGL Profiler on a simplified test case to see the GL commands (both from WebGL and from the TextureCopierCV) during execution and try to spot what state may have been overwritten.
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-unassigned