webrtc audio latency

1,084 views
Skip to first unread message

titho...@gmail.com

unread,
Feb 7, 2014, 5:27:04 AM2/7/14
to chromi...@chromium.org
I've implemented asio with the standalone webrtc. Chrome's got much lower latency compared to standalone and firefox. What are the relevant code changes?

Tommi

unread,
Feb 7, 2014, 7:30:37 AM2/7/14
to titho...@gmail.com, Chromium-dev
Hi,

You should be able to get lower latency or at least as low as we get with Chrome by using ASIO.  Maybe it's a configuration issue (buffer sizes)?

Maybe you can clarify exactly what latency it is that you're measuring? It could be that it's not related to ASIO vs whatever else Chrome uses (e.g. WASAPI on Windows).


On Fri, Feb 7, 2014 at 11:27 AM, <titho...@gmail.com> wrote:
I've implemented asio with the standalone webrtc. Chrome's got much lower latency compared to standalone and firefox. What are the relevant code changes?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

titho...@gmail.com

unread,
Feb 7, 2014, 11:18:59 AM2/7/14
to chromi...@chromium.org, titho...@gmail.com
Hi,

currently I'm getting higher latencies with standalone windows core than with chrome. I was hoping someone knows how many buffers are in the stack before I have to dig in deep without documentation.
There has to be at least one more besides AudioDeviceBuffer, as there's delays up to a few seconds.

Tommi

unread,
Feb 8, 2014, 3:48:46 AM2/8/14
to titho...@gmail.com, Chromium-dev

Can you help me understand exactly what latency you are measuring and what exact stack you're referring to?

If you're getting seconds of delay then it sounds like the network might be in the picture and Asio vs wasapi makes little difference there.

--

titho...@gmail.com

unread,
Feb 10, 2014, 6:57:15 AM2/10/14
to chromi...@chromium.org, titho...@gmail.com, to...@google.com
The long delays are probably due to the NetEQ jitter buffer.
I've got 129ms round trip with chrome html5, no fx. Web Audio might be even faster once implemented (what's the implemenation difference between the two?).
Faster than standalone webrtc, so i assume the audio stack is tweaked. Is there a way to pull out chromiums' webrtc?

Tommi

unread,
Feb 10, 2014, 5:54:59 PM2/10/14
to titho...@gmail.com, Chromium-dev
By processing the audio via WebAudio you would rather be adding latency than reducing.  WebAudio is a separate API that can be used with WebRTC but it does not replace any parts of it.

Regarding the audio stacks of standalone WebRTC vs Chrome's, they are completely different.  Chromium uses webrtc APIs but overrides capture and rendering components (does not use the standalone equivalents) with Chrome specific implementations.  Here's a place to start: WebRtcAudioDeviceImpl.  From there you can trace the audio path from the renderer over to the browser (and vice versa).

Re: "Is there a way to pull out chromium's webrtc?": Yes,see webrtc.org for all the details.  Also, by downloading the chromium source code and dependencies, you will also pull down the webrtc source code + libjingle (see third_party/werbtc and third_party/libjingle).

Hope this helps.

titho...@gmail.com

unread,
Feb 11, 2014, 10:51:08 AM2/11/14
to chromi...@chromium.org, titho...@gmail.com, to...@google.com


On Monday, February 10, 2014 11:54:59 PM UTC+1, Tommi wrote:

Hope this helps.

Indeed, thanks.
I'm not entirely clear about the relationship standalone - chrome.The way I currently understand it is, for the media part, chrome builds upon and improves libjingle/webrtc (difference between the two?).
Are there any plans for the standalone to track chrome's progress? Do I have to fetch the whole chromium project for the audio part - esp. since there's some chromium build defines in the standalone.

Tommi

unread,
Feb 12, 2014, 3:02:20 PM2/12/14
to titho...@gmail.com, Chromium-dev
On Tue, Feb 11, 2014 at 4:51 PM, <titho...@gmail.com> wrote:


On Monday, February 10, 2014 11:54:59 PM UTC+1, Tommi wrote:

Hope this helps.

Indeed, thanks.
I'm not entirely clear about the relationship standalone - chrome.The way I currently understand it is, for the media part, chrome builds upon and improves libjingle/webrtc (difference between the two?).

Chrome uses the libjingle and webrtc libraries.  It doesn't 'improve' them per se since they are still separate projects.  Chrome does provide its own implementation for rendering and capturing audio which work for the multiprocess model that Chrome implements.

Are there any plans for the standalone to track chrome's progress?

These are two unrelated implementations of a set of interfaces.  I think that as you gain better understanding of the architecture you'll see that it doesn't make much sense to compare these implementations in terms of progress.  They each have their purpose and goals.
 
Do I have to fetch the whole chromium project for the audio part -

Yes, that's what I recommend so that you can get the whole picture.  Be warned that it's a pretty big picture :)
 
esp. since there's some chromium build defines in the standalone.


Those are actually checks for whether or not the libraries are being built with Chrome.

Reply all
Reply to author
Forward
0 new messages