Re: [rtcweb] Working group last call for draft-ietf-rtcweb-audio

Roman Shpount <roman@telurix.com> Wed, 27 January 2016 17:43 UTC

Return-Path: <roman@telurix.com>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 20E761AD063 for <rtcweb@ietfa.amsl.com>; Wed, 27 Jan 2016 09:43:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J_IPi0i7UuTO for <rtcweb@ietfa.amsl.com>; Wed, 27 Jan 2016 09:43:28 -0800 (PST)
Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4DAA41AD05F for <rtcweb@ietf.org>; Wed, 27 Jan 2016 09:43:28 -0800 (PST)
Received: by mail-io0-x229.google.com with SMTP id g73so27426107ioe.3 for <rtcweb@ietf.org>; Wed, 27 Jan 2016 09:43:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telurix-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7wWd4c/sztPkWAi08EuGxsbwXMP5Os4mOQL3vkAi8X0=; b=r3ZSXKxb/nW4+GnFBN8hTsktoADMLX5AaQB7n5dydRJ7f3omNmQ2qFrzcGnwCP+8IH F7RwW839RW3bjM6LU41s6cFkBQQkEVNQroDrcXSBX/ZMSxvhTd7i+8XY68jHs2hXtRSw K7ok3zcOpHsHG/5DT6OplPe+ee1MkyboOfIotzCHTbDdgTLR3M2MLXoKCG1RC5+7Tsfr TQVe1qR6NXJcyE0aSgwc8SESfwOXa+ol6cUHDCpj0ii2neXLyVOAZlXMVHyYBxJQTGb1 dyAZSl+H2GlUQbf6hpGD7u/U4Jx3hSTk8lkE7Rrwk/GlNwwBpAO6rvO7Os7VO6OeZQRx bJOA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=7wWd4c/sztPkWAi08EuGxsbwXMP5Os4mOQL3vkAi8X0=; b=LmNiLq5z/JhqyVEn/MV6zyKAIZCf5mdEemx3bocH/i2/oSLp0Fd5R2TYsnhzS24EjR u7A7K+iqmwYz8bBKrpAGsmUS1/UBqVAYVP0iq8Lg/kD2sdNsH8qs3W4T2WiwdbVFUzuZ HnHv6tLTw7XchXiwQGw6CHcR0hQEmX/oDQXe3yCmlPVYkYqRlxcPnAgEVHf98u45pMlL JayCTtqhA5mfv+LDnRVX96aljROOji/4FuJYlzKCbFJVWmkS926V73C4LWpyRoCawwg2 EwT/KSN47Nsf1Ik7nmsBqiqrQlTvZbd/41OwUuZ6f2AyVHdjO4hDJLVqZmj9gTNEd2Cs Oq6g==
X-Gm-Message-State: AG10YOQ9XyDdY/j1aue3SreFcGyv3ao0+pdT9f1sChHQTRMePMm23C+ojYZYG7uMdLLwEQ==
X-Received: by 10.107.1.5 with SMTP id 5mr27570487iob.85.1453916607695; Wed, 27 Jan 2016 09:43:27 -0800 (PST)
Received: from mail-ig0-f174.google.com (mail-ig0-f174.google.com. [209.85.213.174]) by smtp.gmail.com with ESMTPSA id vf11sm3480704igb.20.2016.01.27.09.43.26 for <rtcweb@ietf.org> (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Jan 2016 09:43:26 -0800 (PST)
Received: by mail-ig0-f174.google.com with SMTP id h5so16785023igh.0 for <rtcweb@ietf.org>; Wed, 27 Jan 2016 09:43:26 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.50.155.65 with SMTP id vu1mr30934638igb.2.1453916605647; Wed, 27 Jan 2016 09:43:25 -0800 (PST)
Received: by 10.36.105.77 with HTTP; Wed, 27 Jan 2016 09:43:25 -0800 (PST)
In-Reply-To: <56A8FBC6.5090304@mozilla.com>
References: <CA+9kkMDAL1mKqt7cTRmU4YqX2S5QN4RKn2cfbPaBeDgx=yiN0Q@mail.gmail.com> <CAD5OKxtvhaqx=H10=fUiGAjvnGAb_g89p2TZT9iNEg2F9k+6FA@mail.gmail.com> <CA+9kkMApyK4YPaWbQATy9zGfCOd3Dyfr8cY2amODgFE4XQCA=A@mail.gmail.com> <CAD5OKxtDGUv3akJTe6ZRYNhQN=SMY_R+GeV_Kg67Y6EYq+aV=A@mail.gmail.com> <CA+9kkMCvAcxnc=QdGvTm3=VNOQ3TtO+d8PfbfVA8sLeEA6rRqg@mail.gmail.com> <CAD5OKxtu-dsahdwL7t7Br34V-guqKmsdTsztOK_8sSsvWYsF=g@mail.gmail.com> <CA+9kkMBxbmGggCUaBPVtsJ7o3ZvBS=xvDKkmvfJxdVbM8NgiEQ@mail.gmail.com> <CAD5OKxvaJTRtfDQLwpvi+etdh8ZQvP5eRROSvRY2Hg-Uasisww@mail.gmail.com> <F9264ABC-E856-44B4-9E7E-8359B5D39A55@cisco.com> <78C957DC-4659-49A9-B4B9-EFAD5641574F@phonefromhere.com> <CAD5OKxu9_W97uc_rN_1c=Q8Dz713wDe5ccA2zFfPM-3a3YwznQ@mail.gmail.com> <56A7D683.2010807@mozilla.com> <CAD5OKxt4e2DBm4QrrtHo3cYaeMptSnsoA5xOD_Z9h+nrZTkQYA@mail.gmail.com> <56A8FBC6.5090304@mozilla.com>
Date: Wed, 27 Jan 2016 12:43:25 -0500
X-Gmail-Original-Message-ID: <CAD5OKxtzg8HW686vv7_Ss8mFTKsF6CS6o2pORY4sq+2ZW8GWKQ@mail.gmail.com>
Message-ID: <CAD5OKxtzg8HW686vv7_Ss8mFTKsF6CS6o2pORY4sq+2ZW8GWKQ@mail.gmail.com>
From: Roman Shpount <roman@telurix.com>
To: Jean-Marc Valin <jmvalin@mozilla.com>
Content-Type: multipart/alternative; boundary="001a11346410d01769052a54565e"
Archived-At: <http://mailarchive.ietf.org/arch/msg/rtcweb/HRp2GR_aOx_4ZOTjf9S2bGUtnUc>
Cc: "Cullen Jennings (fluffy)" <fluffy@cisco.com>, "rtcweb@ietf.org" <rtcweb@ietf.org>
Subject: Re: [rtcweb] Working group last call for draft-ietf-rtcweb-audio
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
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: <https://mailarchive.ietf.org/arch/browse/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: Wed, 27 Jan 2016 17:43:30 -0000

On Wed, Jan 27, 2016 at 12:17 PM, Jean-Marc Valin <jmvalin@mozilla.com>
wrote:

> The problem I see is that unlike G.711, modern codecs (not just Opus)
> aren't stateless. It's not a simple thing to just stop and restart
> transmission during telephony events -- especially if you want to
> avoid glitches and want all implementations to behave the same. You
> need to consider look-ahead (6 ms for Opus, with 5-10 ms being
> typical), but also the "memory" from the previous frame.
>

In this regard Opus is no different then G.729 which was used with
telephone-events for ages. Sending a telephone-event packet is an audio
codec switch. Its behavior should be no different then switch from Opus to
PCMU or from Opus to CN and back. I assume statefull codec such as Opus
should reset its state before starting to send audio after such switch
occurs. Is this correct? From what I know this was never defined anywhere
and it might be a good idea from the codec designers to specify what is the
best behavior for codec switches from telephone-event or CN. Since most of
codecs converge very quickly I see this implemented equally often with or
without codec state reset. Also, since telephone-events are normally
followed by a period of silence (intertone gap), codec state plays much
smaller role in practice.

> Packet boundaries of audio encoded using codecs such as G.711 or
> > Opus should create a continuous stream as far as RTP timestamps are
> > concerned with RFC 4733 telephone event packets unless
> > discontinuous RTP is used. It should be possible to align decoded
> > audio and telephone-events based on RTP timestamps.
>
> What do you mean "create a continuous stream"? I thought you wanted
> the codec to stop transmitting.
>

Yes, I do want the code to stop transmitting. I want the clean codec switch
from non-event audio codec to telephone-event and back. What I mean here is
if you have PCMU packet with timestamp 1000 and duration 160 the following
telephone-event start timestamp should be 1160. The transition in other
direction should also happen without the timestamp gap so that if
telephone-event start timestamp is 1160 and the total tone duration is 800
then next non event audio packet should start with timestamp 1960.
Furthermore, I like to recommend to switch from non-event to
telephone-event and back on the regular packet boundary. This means no
partial audio packets (17 ms audio packet before telephone event) and no
gaps or overlaps after telephone-event (no telephone events with duration
117 ms which causes subsequent audio packet either start before the end of
the telephone-event or with a 3 ms gap after the event or exactly after the
telephone event but with 3 ms offset in comparison with audio packets
before telephone events).

Sorry for spending so much time on telephone-event generation but equipment
generating broken telephone-event streams and then causing havoc in the
phone network is something that is something that wasted couple of weeks of
my time this month alone. I simply want to provide the list of
recommendations for rtcweb which will cause the least amount of interop
trouble in the future.

Regards,
_____________
Roman Shpount