New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 698860 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 699123
Owner: ----
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug
59



Sign in to add a comment

<video>.captureStream() changes the colours of the original <video> when being played back

Project Member Reported by mcasas@chromium.org, Mar 6 2017

Issue description

See demo https://webrtc.github.io/samples/src/content/capture/video-video/,
in Mac, the colours of the original video seem to have the chrome channels
swapped?  Observed only on Mac Canary. See attached file.
 
Screen Shot 2017-03-06 at 1.38.11 PM.png
467 KB View Download
Components: -Blink>MediaStream>CaptureFromElement Blink>MediaStream Blink>WebRTC>Video
After further investigation, captureStream() might not be the culprit
here: if we just do <video1>.captureStream() and do not plug it into 
the <video2> tag, the source <video1> _does not get affected_. E.g. 
if we plug the captured MediaStream into a MediaRecorder, the source
video tag is not corrupted.

This seems to point to some bug in MediaStreamVideoRendererSink and/or
WebMediaPlayer_MS.

Codepen illustrating the bug:
http://codepen.io/miguelao/pen/OpXVVK?editors=1010#0


Codepen with MediaRecorder, showing no bug:
http://codepen.io/miguelao/pen/oZzQLO?editors=1000
Blockedon: -619625
Cc: guidou@chromium.org mcasas@chromium.org dcasta...@chromium.org foolip@chromium.org
Labels: -Pri-3 59 Pri-2
Owner: ----
Status: Available (was: Assigned)
Adding some peeps.

dcastagna@ do you know if we're (re)using some resource in 
WebMediaPlayerMS [1] that corrupts a "normal" WebMediaPlayerMS
(or its internal SkCanvasVideoRenderer...) ?


[1] https://cs.chromium.org/chromium/src/content/renderer/media/webmediaplayer_ms.h?q=WebMediaPlayer_MS&dr=CSs
Summary: <video>.captureStream() changes the colours of the original <video> when being played back (was: capture from <video> changes the colours of the original <video>)
Is this a regression? Is this happening only on Mac?

We save a cache of the last converted VideoFrame in SkCanvasVideoRenderer::last_image_, do you think it could be related to this issue?

ccameron@ has been working on video color conversion on Mac lately, any chance this could be related to  crbug.com/676054 ?
Cc: ccameron@chromium.org
1) this is a regression: although this feature is not shipped,
it was announced and the demo worked back then (~EOQ216).

It's positively only happening on Mac, at least as far as I
have tested, Linux and Win are OK.

+ccameron@ for more inputs
Cc: hubbe@chromium.org
Can you quickly check with --disable-features=video-color-management (and --enable-features as well)?
I'm running 

./out/gn/Chromium.app/Contents/MacOS/Chromium \ -vmodule="*html_*_element_capturer*=2,*HTMLMediaElementCapture*=1,*video_track_recorder*=3"  \ --enable-blink-features=MediaCaptureFromVideo \ https://codepen.io/miguelao/full/OpXVVK --disable-features=video-color-management

but still the original <video> goes bananas colour-wise.
Can you bisect if it's a regression?
I'm also taking a look as soon as my local build completes...
I have a local repro too.
Bisect isn't running any recent builds, complaining that

dlopen /private/var/folders/00/191h0000h01000cxqpysvccm005460/T/bisect_tmpSXkMIn/chrome-mac/Chromium.app/Contents/MacOS/../Versions/58.0.3027.0/Chromium Framework.framework/Chromium Framework: dlopen(/private/var/folders/00/191h0000h01000cxqpysvccm005460/T/bisect_tmpSXkMIn/chrome-mac/Chromium.app/Contents/MacOS/../Versions/58.0.3027.0/Chromium Framework.framework/Chromium Framework, 261): no suitable image found.  Did find:
	/private/var/folders/00/191h0000h01000cxqpysvccm005460/T/bisect_tmpSXkMIn/chrome-mac/Chromium.app/Contents/MacOS/../Versions/58.0.3027.0/Chromium Framework.framework/Chromium Framework: file too short
Is anyone having luck bisecting this?
Mergedinto: 699123
Status: Duplicate (was: Available)
Fix ready.
Just tried r455269 which includes the fix in
https://bugs.chromium.org/p/chromium/issues/detail?id=699123#c7
and I cannot repro, all looks normal, thanks ccameron@ !

Sign in to add a comment