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

Issue 659920 link

Starred by 9 users

Issue metadata

Status: Archived
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Regression



Sign in to add a comment

desktopCapture system audio capturing broken on CrOS

Reported by m...@w69b.com, Oct 27 2016

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS armv7l 8743.76.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.79 Safari/537.36
Platform: 8743.76.0 (Official Build) stable-channel daisy_spring

Steps to reproduce the problem:
1. Install example App from attached file or https://github.com/Schibum/chrome-desktop-capture-audio-bug
2. Click on enable capture and make sure "Share audio" is checked.
3. Play some sound on the system (eg. play some youtube video)

What is the expected behavior?
The app uses desktopCapture to capture system audio stream, and plays it a <video> element. So if system audio is captured, this should cause a feedback effect in this demo (as running the demo on Windows and older CrOS versions does).

What went wrong?
No feedback effect, i.e. the captured system audio track is silent. 
Note that the media stream returned does have an audio track (see console logging in example app).

Did this work before? Yes Version 52.0.2743.116, did not test 53

Does this work in other browsers? N/A

Chrome version: 54.0.2840.79  Channel: stable
OS Version: 8743.76.0
Flash Version: Shockwave Flash 23.0 r0

Works as expected on Windows (tested current stable 54 and canary on Win7 and Win10). 
Also worked fine on 52.0.2743.116 on ChromeOS.
Other platforms (Linux, Mac) do not support system audio capturing, there is no AudioTrack on the mediastream at all, which is as expected.
 
chrome-desktop-capture-audio-bug-master.zip
564 KB Download

Comment 1 by m...@w69b.com, Oct 27 2016

Alternative way to reproduce this issue with the integrated cast functionality:
- select ... -> Cast -> Cast Desktop 
- Choose Chromecast device in network, make sure "Share Audio" is checked in the dialog window.
- Play some audio on the system

What went wrong:
Audio is NOT mirrored to the Chromecast device. 

This also worked on older CrOS versions. 

Comment 2 by m...@w69b.com, Oct 27 2016

Additional note: this issue also reproduces on current CrOS dev (55.0.2883.17)

Comment 3 by m...@w69b.com, Nov 7 2016

Also reproduces on 56.0.2905.0 dev (Platform 8953.0.0 (Official Build) dev-channel veyron_minnie)

Also reproduces on a chrome book. With automatic updates I even cannot roll back to a previous version.
The text-to speach API works really well on chrome, but I cannot record the sound with screencastify which is really annoying...
Components: -Blink>GetUserMedia Blink>GetUserMedia>Desktop

Comment 6 by aats...@gmail.com, Dec 22 2016

what the hell!!!!!! im mad as fuck

Comment 7 Deleted

Cc: niklase@chromium.org
Owner: gyzhou@chromium.org
George, can you please take a look?
Owner: qiangchen@chromium.org
Sorry, should have been Qiang
Once upon a time, I fixed a bug that the computer is not muted during audio sharing. 

At that time, I tested, after muting (at system level), the sharing still works well.

One possibility is that CrOS now does not give us the audio stream if we mute the audio at system level. If that's the case, then I will have to revert the previous fix.

I'll take a deeper look.
Status: Started (was: Unconfirmed)
Update:

It is as I expected. If we mute the system audio level, then we are going to get nothing, but previously, we can get the pre-mute audio stream.

niklase@: Do you know anyone we can follow up with on CrOS side? I am not sure whether this is a CrOS bug or by design. 
Cc: dgreid@chromium.org
cc dgreid for #12, could be an optimization
Cc: cychiang@chromium.org
cychiang: Did something change that would mute the system audio before it gets to the loopback device?
Re #14: Not that case. 

It is the chrome browser that actively calls "cras_client_set_system_mute(client_, 1);" before capturing the system audio. (As in one use case we hope that the sender side is mute, and only play out the stream on the receiver side)
Previously, we found it works, we can still capture the audio stream even if the speaker is mute on the sender side. But now nope, we get nothing.
Update: 

I can also reproduce the issue even if we do not mute the sender speaker.
About 90% probability, we cannot capture any system audio, though a slim chance that we can capture the data.

From my code reading and testing:
After CrasInputStream::Start() [1] is called, the callback CrasInputStream::SampleReady is never triggered by CrOS.

Can some one take a look at the function [1], is there anything we miss setting for system audio capturing?

[1]https://cs.chromium.org/chromium/src/media/audio/cras/cras_input.cc?q=SamplesReady&sq=package:chromium&dr=C&l=134
Owner: cychiang@chromium.org
Status: Assigned (was: Started)
Status: Started (was: Assigned)
Looks good on 9134.0.0 image.
I will test previous versions.
Might be this one  https://bugs.chromium.org/p/chromium/issues/detail?id=657510
The fix is not merged to R55. I will check it.

Labels: -Pri-2 Merge-Request-55 Pri-1
With this fix on R55, https://chromium-review.googlesource.com/#/c/415848/
Chromecast and demo app in #0 works fine.

We need to merge it back to R55.
Cc: hychao@chromium.org bhthompson@chromium.org
Hi Bernie, I would like to merge CL in #20 to R55. Currently, CrOS can not cast audio to ChromeCast, it is very annoying for users. Thanks!
Labels: -Merge-Request-55 Merge-Approved-55
Given this landed a while back, and is a small change we can land it on 55 however that may be moot, we are not planning further 55 stable pushes (last one is being tested today). So this is likely to not get out to users on stable until 56 (end of the month). 
Status: Fixed (was: Started)
https://chromium-review.googlesource.com/#/c/425530/ merged
Project Member

Comment 24 by sheriffbot@chromium.org, Jan 13 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Approved-55
Cc: dalecur...@chromium.org
 Issue 664818  has been merged into this issue.

Comment 27 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 28 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 29 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 31 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment