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

Issue 686077 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Audio Screen Share drops audio data before sending it

Reported by lienra...@gmail.com, Jan 27 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Steps to reproduce the problem:
Share your screen : "Your entire screen" + "Share audio" (the system audio, not microphone audio)

The codec used are :
v=0
o=- 1485524881991615 1485524881991617 IN IP4 127.0.0.1
s=mirroring
t=0 0
m=audio 1 RTP/SAVPF 111
c=IN IP4 1.1.1.1
a=recvonly
a=rtpmap:111 opus/48000/2
a=fmtp:111 maxaveragebitrate=256000
m=video 1 RTP/SAVPF 100
c=IN IP4 1.1.1.1
a=recvonly
a=rtpmap:100 VP8/90000
a=fmtp:100 x-google-max-bitrate=10000
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb

Note : The problem is also present without the line "a=fmtp:111 maxaveragebitrate=256000"

What is the expected behavior?
All audio data is sent.

What went wrong?
Once out of ~5 (with no obvious pattern), Chrome seems to drop audio data before sending it : Chrome sends OPUS packets with 20ms of audio data (confirmed by decoding and timestamp) but at a rate of ~40 packets/s instead of 50.
The sequence numbers are consecutive (no missing packet) and a look at webRTC-internals (see file abnormal.jpg) confirmes that only ~40 packets/s are sent and that the bandwidth is ~ 40/50 * 256 kbps.

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 56  Channel: stable
OS Version: 10
Flash Version: 

To test this, i start a webrtc session and end it a few seconds later. Sometimes the problem appears. It is present during all the session (10 minutes on my longest test). After ending a problematic session, the next one can be with or without the problem.
 
normal.jpg
149 KB View Download
abnormal.jpg
149 KB View Download

Comment 1 by guidou@chromium.org, Jan 30 2017

Components: -Blink>WebRTC Blink>WebRTC>Audio Blink>GetUserMedia>Desktop
Cc: qiangchen@chromium.org
Can you specify the OS on which the problem is observed?
The report marks "Linux", but as far as I know we do not support full screen audio capture on Linux.

Comment 4 by lienra...@gmail.com, Jan 30 2017

I did not write the report with the same OS as the one i test with. The problem is observed on Windows 10.

Comment 5 by ajha@chromium.org, Jan 31 2017

Labels: Needs-Triage-M56
Status: Available (was: Unconfirmed)

Comment 7 by olka@chromium.org, Feb 9 2017

Owner: olka@chromium.org

Comment 8 by olka@chromium.org, Feb 16 2017

Cc: solenberg@chromium.org olka@chromium.org
Owner: m...@chromium.org
Status: Untriaged (was: Available)
miu@ could you PTAL - is it tab audio capture?

Comment 9 by m...@chromium.org, Feb 26 2017

Cc: sergeyu@chromium.org w...@chromium.org
Labels: -Type-Bug M-56 Type-Bug-Regression
Owner: tommi@chromium.org
Status: Assigned (was: Untriaged)
Windows desktop capture *does* support system-wide loopback audio. IIUC, the media::AudioDeviceDescription::kLoopbackInputDeviceId would be specified, and Windows-specific code in win/audio_low_latency_input_win.cc would know what to do with that.

I'm not sure who owns this, but tommi's in the OWNERS file and seems to have been making changes there over the past few weeks. So, let's start with him. :-)

Comment 10 by tommi@chromium.org, Feb 26 2017

Cc: tommi@chromium.org
Owner: mflodman@chromium.org
magnus - can you triage?
Owner: qiangchen@chromium.org
qiang, can you take a look?
Cc: m...@chromium.org
lienrag63@: Can you share me the app that you can reproduce the bug?

I just tried test.webrtc.org/manual/peer2peer/ but I cannot reproduce it, each time, the packet rate stays at 50/s

Another question: does the audio sounds chopped on the remote side? I think another possibility is that webrtc detects your network condition and decides to do resampling and lower bit rate. 
We are a startup and the app or the code's app can't leave our hardware. And for now, i can't make sample code for this case.
But i did some extra tests and noticed:
- Yes the audio is clearly chopped on the remote size.
- It can happen through wireless network as well as through a gigabit wired local network.
- I was not able to reproduce with a windows 7 computer (same chrome version). I don't have access to other windows computers.
- Since i adapted my code from video only to video + audio, the popup "XXX is sharing your screen and audio with YYYYY" is not closed when the streaming is ended by our website, i didn't find why. I have to close it by the blue "Stop sharing" button. When i try multiple times to launch and close a stream, these popups will accumulate if i do not close them and the frequency of the audio problem is clearly higher when there is multiple popup still on the screen.
Thanks. I'll do more investigation.

For last question, you will need to explicitly stop the stream in javascript, otherwise the stream will remain in the memory.

Comment 15 Deleted

Since I cannot reproduce on my windows 10 machine, can you try to install this app and see whether the recorded system audio is chopped or not?

https://chrome.google.com/webstore/detail/screen-recorder/gdamcnkmddbfhaadidkhahllkabienpk

1. Play some music or any audio with any method
2. Launch the app
3. Check "Include system audio"
4. Click "Record Desktop"
5. Click "Share"
6. After some time, click "Stop"
7. Then you can choose either play the record out or save it, either is OK
8. Verify the recorded audio is chopped or not, and let me know

I wish to know whether the problem is on the capture part or the sending part.

Comment 17 Deleted

Comment 18 Deleted

I executed your test a dozen time : all the recordings were correct, no chopping.
As #19, this sounds like that the capture is good, but something is wrong in the webrtc dropping the audio frame. 

But I cannot reproduce the issue on my windows 10 machine, and thus I cannot know what exactly causes this issue. 

To niklase@, is there a way we can escalate it?
Labels: -Needs-Triage-M56 Needs-Feedback
An AEC recording of the problem would help, then you can see exactly what data we get to get encoder. During an active session you open up a new tab at chrome://webrtc-internals/, expand "Create Dump" and check "Enable diagnostic audio recordings". Please attach the recording to the bug.
I joined two files. One with the problem occurring and another without, to detect the difference : the first one is faster (than the other and than the original).
audio_debug.5332.source_input.4_withProblem.wav
5.5 MB Download
audio_debug.5332.source_input.6_withoutProblem.wav
1.9 MB Download
What's the current status on this one?

Comment 24 Deleted

I think this may be related to https://bugs.chromium.org/p/webrtc/issues/detail?id=6915

Max, could you take a look?
Cc: grunell@chromium.org
Hmm, would make sense if it's some kind of sample rate confusion. I don't know how desktop capture works though, I'll have to dig through some code for this. The WebRTC issue sounds similar, so I'll have a look at that in parallel.
Owner: solenberg@chromium.org
Labels: -Type-Bug-Regression Type-Bug
Cc: ossu@chromium.org
Looks like I dropped the ball here. lienrag63@, can you confirm whether this is still happening in Chrome M72?

Sign in to add a comment