samples icon indicating copy to clipboard operation
samples copied to clipboard

Chrome 88 video captureStream not streaming video only audio

Open thomas-yancey opened this issue 3 years ago • 15 comments

Please read first!

Please use discuss-webrtc for general technical discussions and questions.

  • [x] I have provided steps to reproduce
  • [x] I have provided browser name and version
  • [x] I have provided a link to the sample here or a modified version thereof

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed.

Browser affected

Chrome

Browser name including version (e.g. Chrome 64.0.3282.119) Chrome Version 88.0.4324.96

Description

streaming from video element no longer working in newest version of google chrome without disabling hardware acceleration

Steps to reproduce

visit this sample on chrome 88+ https://webrtc.github.io/samples/src/content/capture/video-pc/

Expected results

able to stream the video to the peer connection to the right

Actual results

only audio comes through, the video remains black, works on firefox

thomas-yancey avatar Jan 25 '21 20:01 thomas-yancey

known regression, see https://bugs.chromium.org/p/chromium/issues/detail?id=1171581

fippo avatar Jan 28 '21 09:01 fippo

ahh okay thanks!

thomas-yancey avatar Jan 29 '21 23:01 thomas-yancey

Can you run the same code on Chrome 90.0.4427.5?

guest271314 avatar Feb 28 '21 20:02 guest271314

Working again on macOS Chrome Canary Version 91.0.4432.0 (Official Build) canary (x86_64)

Chrome 91

image

Chrome 88

tuxracer avatar Mar 01 '21 06:03 tuxracer

Not exhibiting consistent behaviour on Chrome 90.0.4427.5.

guest271314 avatar Mar 01 '21 06:03 guest271314

Still existing on Chrome 89.0.4389.72, but could solve the problem by disabling hardware acceleration

Sida63 avatar Mar 04 '21 03:03 Sida63

Still broken on Linux Chromium 91.0.4436.0 (Developer Build) (64-bit) Revision 476f0b1161508673068cf5b1b5ba721c4235b83a-refs/heads/master@{#859461} Screenshot_2021-03-04_05-26-35This appears to be outside of the scope of webrtc/samples, is an implementation bug https://bugs.chromium.org/p/chromium/issues/detail?id=1156408.

guest271314 avatar Mar 04 '21 13:03 guest271314

@guest271314 For what it's worth that same example is working on macOS Chrome Canary Version 91.0.4435.0 (Official Build) canary (x86_64)

Chrome 91

screen7

Chrome 88

image

But yes this is clearly not a bug in the sample but rather in Chrome itself

tuxracer avatar Mar 05 '21 06:03 tuxracer

For what it's worth that same example is working on macOS Chrome Canary Version 91.0.4435.0 (Official Build) canary (x86_64)

Is hardware acceleration enabled?

The same result as described at https://github.com/webrtc/samples/issues/1412#issuecomment-790619837 persists at Chromium 91.0.4440.0 (Developer Build) (64-bit) Revision cd195d11510f86a8a863443a2f3b0bd3c45b71b5-refs/heads/master@{#860605}

guest271314 avatar Mar 07 '21 22:03 guest271314

@guest271314 that's with no settings changed, clean profile. Does not work on macOS Chrome 88 (captured stream is all black), but does work on macOS Chrome 91

tuxracer avatar Mar 08 '21 17:03 tuxracer

Still broken on windows chrome Version 92.0.4515.131 (Official Build) (64-bit)

Exlord avatar Aug 08 '21 07:08 Exlord

Not working for me on macOS with version 94.0.4606.61 (Official Build) (x86_64)

Also, audio is not playing for me at all on both Chrome and Firefox.

unicornsoftwareinc avatar Sep 29 '21 08:09 unicornsoftwareinc

The <video> begins in mute state. You should be able to unmute at the controls.

When hardware accelleration is enabled the video appears as described in https://bugs.chromium.org/p/chromium/issues/detail?id=1156408#c59, and https://bugs.chromium.org/p/chromium/issues/detail?id=1156408#c63.

guest271314 avatar Sep 29 '21 13:09 guest271314

@guest271314, The audio for the streamed player (player on the right) doesn't work if I unmute. Please see the attached screenshot.

Screen Shot 2021-09-30 at 7 54 09 PM

Also, in my own app when I was trying to get captureStream() to work, I had the same issue. The video worked fine (if I disabled hardware acceleration in Chrome and as expected on Firefox) but no sound came through despite the MediaStream object having an audio track.

unicornsoftwareinc avatar Sep 30 '21 23:09 unicornsoftwareinc

Also, in my own app when I was trying to get captureStream() to work, I had the same issue. The video worked fine (if I disabled hardware acceleration in Chrome and as expected on Firefox) but no sound came through despite the MediaStream object having an audio track.

I am not sure how your app uses captureStream(). The code at https://plnkr.co/edit/1HsvQh08tYb24810?preview uses captureStream() and records the received remote MediaStreamTracks in answer.html, where at console a Blob URL of the recording including audio is printed.

guest271314 avatar Oct 01 '21 00:10 guest271314

This same issue appears to be back again in Chrome 106.0.5249.62 (Official Build) (32-bit) Works when Hardware Acceleration is turned off. Does not work when Hardware Acceleration is turned on (default).

https://github.com/webrtc/samples/issues/1412#issue-793691659

Has anyone encountered a similar issue?

giftofyours avatar Sep 30 '22 03:09 giftofyours

The WebRTC page plays videos when hardware acceleration is turn on or turned off on Chromium 108.0.5331.0 (Developer Build) (64-bit).

guest271314 avatar Sep 30 '22 04:09 guest271314

Thanks! Hope the issue will be resolved once 108 is deployed to Official Build (public release).

It now seems a little risky to use canvas.captureStream in production when it breaks in Chrome like when it did in 88+. (was working fine in 104 and 105 before it stopped working in 106)

giftofyours avatar Sep 30 '22 04:09 giftofyours

This demo seems to have an autoplay issue at the moment; pressing "play" in the righthand video will show the content.

alvestrand avatar Sep 30 '22 07:09 alvestrand

This demo seems to have an autoplay issue at the moment; pressing "play" in the righthand video will show the content.

Pressing Play Works when Hardware Acceleration is turned off. However, when Hardware Acceleration is turned on, pressing Play does not work. It remains black.

Tested on Version 106.0.5249.62 (Official Build) (32-bit)

It appears to be a Chrome bug.

giftofyours avatar Sep 30 '22 07:09 giftofyours

The Chromium bug seems to be https://bugs.chromium.org/p/chromium/issues/detail?id=1156408 and the bugs that are listed as blockers.

This tracker isn't for tracking Chrome bugs, so if I'm able to fix the autoplay issue, I'll close this item.

alvestrand avatar Sep 30 '22 08:09 alvestrand

Noted. Thanks for the information!

giftofyours avatar Sep 30 '22 08:09 giftofyours

@alvestrand adding the detection from https://github.com/webrtc/samples/pull/1513 (and the followup) might help with autoplay

fippo avatar Sep 30 '22 09:09 fippo

chrome bug seems fixed so closing. Please holler if wrong.

fippo avatar Nov 21 '22 21:11 fippo