Re: [rtcweb] Call for Consensus Regarding Selecting Recommended Audio Codecs

Tim Panton <tim@phonefromhere.com> Mon, 24 December 2012 11:29 UTC

Return-Path: <tim@phonefromhere.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 800A621F85AC for <rtcweb@ietfa.amsl.com>; Mon, 24 Dec 2012 03:29:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=-0.001, BAYES_00=-2.599, HTML_MESSAGE=0.001]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WzYtUQxESdD6 for <rtcweb@ietfa.amsl.com>; Mon, 24 Dec 2012 03:28:57 -0800 (PST)
Received: from smtp004.apm-internet.net (smtp004.apm-internet.net [85.119.248.54]) by ietfa.amsl.com (Postfix) with ESMTP id B17F821F8555 for <rtcweb@ietf.org>; Mon, 24 Dec 2012 03:28:56 -0800 (PST)
Received: (qmail 57312 invoked from network); 24 Dec 2012 11:28:54 -0000
X-AV-Scan: clean
Received: from unknown (HELO zimbra003.verygoodemail.com) (85.119.248.218) by smtp004.apm-internet.net with SMTP; 24 Dec 2012 11:28:54 -0000
Received: from [192.67.4.33] (unknown [192.67.4.33]) by zimbra003.verygoodemail.com (Postfix) with ESMTPSA id 753A418A0996; Mon, 24 Dec 2012 11:28:54 +0000 (GMT)
Mime-Version: 1.0 (Apple Message framework v1283)
Content-Type: multipart/alternative; boundary="Apple-Mail=_2B55E4F4-7282-4C74-B1F8-364442A00130"
From: Tim Panton <tim@phonefromhere.com>
In-Reply-To: <CAD5OKxtQ_Z6QW6gPpHEV7Pf1F+n-J2XSFpukAKb1wL2jAcs2HA@mail.gmail.com>
Date: Mon, 24 Dec 2012 11:28:54 +0000
Message-Id: <C48FF74B-EE3D-49BC-A45A-0DFA81D29FA5@phonefromhere.com>
References: <BLU404-EAS275E7E8B948E07ECF8847C193340@phx.gbl> <50D6C2C9.80004@omnitor.se> <8A68C6DA-B603-4450-A4B8-A72E99996AA5@phonefromhere.com> <CAD5OKxtQ_Z6QW6gPpHEV7Pf1F+n-J2XSFpukAKb1wL2jAcs2HA@mail.gmail.com>
To: Roman Shpount <roman@telurix.com>
X-Mailer: Apple Mail (2.1283)
Cc: rtcweb@ietf.org
Subject: Re: [rtcweb] Call for Consensus Regarding Selecting Recommended Audio Codecs
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Dec 2012 11:29:00 -0000

On 24 Dec 2012, at 10:52, Roman Shpount wrote:

> On Mon, Dec 24, 2012 at 5:25 AM, Tim Panton <tim@phonefromhere.com> wrote:
>  
> Looks like I'll be a lone voice again.
> 
> And I thought I was the lonely voice of reason saying exactly the opposite. 

Perhaps ;-)

>  
> I'm against any recommendation of use of g722 in webRTC
> If implementers want to provide it that's fine but it should not be in the standard.
> Even if it is available it always be at a lower preference than Opus
> 
> I agree it should be lower preference by default, but the application developer can change this if needed.

How? by dipping into the SDP or with an API ? - see my point 4) 

>  
> 1) The spec for g722 contains a historical error, so it's sample rate gets
> declared as 8khz even though it is actually 16khz - this means that the rtp/audio processing code is littered with if( codec == CODEC_G722) {} else {} clauses to try and implement this mistake. I've seen g722 mis-implemented more often than any other codec.
> 
> I've seen more G722 implementations then of any other wide band codec. In fact this is the most commonly implemented and used wideband codec right now, may be with an exception of SILK. 

And almost every one of them got this wrong the first time, and then had a regression 6 months later. Lets admit it - it's a mess.

>  
> 2) g722 is a fixed rate codec - it uses 64kbits/sec irrespective of what is available - it won't play nice with any congestion management that is specified with webRTC
> 
> So does G.711, but it still supported for interop reasons. In most cases 64kbps is little enough not to worry about it.

Ah. now there we disagree. We can run opus over lossy Edge but not g722 - many people's only internet connection is Edge at best.
On the other side if I'm on a 50Mbps fibre I'll still only get 64kb/s 722 quality even though I could have been in CELT stereo. Non adaptable codecs
aren't fit for the modern internet (IMHO). (- I also voted against 711 being mandatory for exactly that reason).

>  
> 3) g722 sounds ok  (despite using 14 or the available 16 bits)
> - provided there is no packet loss - it has no built in FEC or PLC modes, so falls apart at quite low loss levels (especially compared to opus).
> 
> That is simply not true. PLC for G.722 is defined in Appendixes III and IV. It is not as good as OPUS but it is acceptable. 

I sorry, I forgot that - do all those legacy endpoints actually implement that?

>  
> 4) if we mandate g722 then we need to make some  methods  in the constraints API to ensure that 2 browser endpoints that say they want wideband don't get g722 when they could both be doing opus in full CELT mode for the same bandwidth.
> 
> This should be up to the application developers, not a standard comity.  By default OPUS should have higher preference.

Agreed. I'm not saying implementors cant add it. I just say the standard shouldn't even recommend something that isn't even close to the best we can do.

>  
> The often stated advantage is that there are many existing g722 endpoints out there. This is irrelevant - there is only 1 platform I know of that implements ICE+DTLS-SRTP and g722 but not opus (asterisk for the curious and there's an opus patch available).
>  
> It is not irrelevant. If SRTP is supported there are a lot of end points that support ICE+SRTP+G.722.

Interesting - I can't think of many full ICE clients that do SRTP and g722 and not opus - Jitsi perhaps - but that couldn't swallow chrome's SDP last 
I tried. My experience with legacy interop is that you _always_ need a gateway.

If the consensus is to make (non-dtls) SRTP support mandatory I might change my mind I suppose.


> 
> P.S. A saner, more conservative approach would have been to make G.722 a MUST and OPUS a SHOULD. Unfortunately, this ship has sailed together with such things like support of plain RTP, due to worrying about political appearences first and stable product later.

I can't agree that the reasons were about political appearance. Speaking purely for myself they were about security and quality. 
Phonefromhere was a start-up that built webrtc-like functionality into browsers (using a java applet). So we have quite a bit of experience of
what worked and what didn't - my views are shaped by that experience and that of running a security startup westpoint.ltd.uk .  

What works for the deskphone on a managed secure LAN does not necessarily work for someone in a cafe in India on the wi[l]der internet.

T.