WebRTC Audio performance issue on iPhone

1,224 views
Skip to first unread message

arik

unread,
Jul 18, 2012, 12:03:39 PM7/18/12
to discuss...@googlegroups.com
Hello all,

I'm running an adio call on iPhone 4s and the CPU utilization is 50%! Divided equally between capture and rendering. As a result my app stucks on iPhone 4 and iPhone 3GS.

Has anyone encountered this issue?

Thanks,
Arik

Caragea Silviu

unread,
Jul 18, 2012, 3:28:48 PM7/18/12
to discuss...@googlegroups.com
My implementation use around 30 %. To give you some hints:

1. ILBC performs better on ios than iSAC. using ISAC I have the same
performances like you around 50 %. You can test isac_fix if you want
wide band codec.
2. Personally I'm using Voice-Processing I/O AGC and echo canceller .
The ones from webrtc I have disabled. From webrtc I'm using only NS
and high-pass filter. The quality is excellent. I also tested webrtc
echo cancellation and AGC and there is no potential performances
issue, but AECM it's cutting off the voice sometimes.

I hadn't applied the neon optimization yet but this probably will
bring better improvements.
> --
>
>
>

Zack Coder

unread,
Jul 18, 2012, 8:19:31 PM7/18/12
to discuss...@googlegroups.com
I have achieved between 22-30% CPU depending on usage. In addition to what Silviu mentioned below, one key thing you should consider is re-implementing iLBC using Apple's built-in version (via AudioConverter) which results in far superior performance. Assuming you are using the "community" iOS audio driver you can also completely remove the AudioConverters they have in place on record/play - they are not necessary at all and end up performing a no-op.

Caragea Silviu

unread,
Jul 19, 2012, 12:57:05 AM7/19/12
to discuss...@googlegroups.com
Hello Zack ! Have you compiled webrtc with the neon features?
> --
>
>
>

arik

unread,
Jul 19, 2012, 6:49:12 AM7/19/12
to discuss...@googlegroups.com
Thanks a lot! I managed to drop my CPU usage to 30%, however the mediaserver is still high at 30+%.

That's about 20% more then another voip application I have which causes the media server to consume 10-% of CPU.

Any idea what could be causing this? Is this some configuration?

Thanks,
Arik

Zack Coder

unread,
Jul 19, 2012, 6:53:23 AM7/19/12
to discuss...@googlegroups.com
No, but I eagerly look forward to seeing your results if you do choose to press on with it. Which libraries are you planning on optimizing? All? system_wrappers?


On Thursday, July 19, 2012 12:57:05 AM UTC-4, silviu.cpp wrote:
Hello Zack ! Have you compiled webrtc with the neon features?

YL

unread,
Jul 24, 2012, 6:55:19 PM7/24/12
to discuss...@googlegroups.com

May be you can try setting kAUVoiceIOProperty_VoiceProcessingQuality property of voice processing audio unit? I think that it has effect on mediaserverd CPU usage.

arik

unread,
Jul 25, 2012, 2:21:02 AM7/25/12
to discuss...@googlegroups.com
Tried the following:


        UInt32 inQuality =  kRenderQuality_Min;

    

        AudioUnitSetProperty(_audioUnit, kAUVoiceIOProperty_VoiceProcessingQuality, kAudioUnitScope_Global, 1, &inQuality, sizeof(inQuality));      

    

CPU improved by about 5% but that's not enough. Audio Quality was still acceptable though.


Arik

arik

unread,
Jul 25, 2012, 8:22:32 AM7/25/12
to discuss...@googlegroups.com
Solved by applying the patch described in this link: https://webrtc-codereview.appspot.com/524001/

Regards,
Arik 

YL

unread,
Jul 25, 2012, 12:06:21 PM7/25/12
to discuss...@googlegroups.com
What is the mediaserverd CPU usage using drivers in that patch? You are using iPhone 4S, right?

Thanks,

- Yevgeni
Reply all
Reply to author
Forward
0 new messages