Re: [rtcweb] JSEP question: How to set up simulcast for server-originated calls?

Harald Alvestrand <harald@alvestrand.no> Mon, 05 November 2018 22:54 UTC

Return-Path: <harald@alvestrand.no>
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 948EA130DCA for <rtcweb@ietfa.amsl.com>; Mon, 5 Nov 2018 14:54:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=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 76EYrK69iXYB for <rtcweb@ietfa.amsl.com>; Mon, 5 Nov 2018 14:54:40 -0800 (PST)
Received: from mork.alvestrand.no (mork.alvestrand.no [IPv6:2001:700:1:2::117]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9C3B1128CE4 for <rtcweb@ietf.org>; Mon, 5 Nov 2018 14:54:39 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mork.alvestrand.no (Postfix) with ESMTP id 127307C0C76; Mon, 5 Nov 2018 23:54:38 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at alvestrand.no
Received: from mork.alvestrand.no ([127.0.0.1]) by localhost (mork.alvestrand.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iv2v1sKDGh82; Mon, 5 Nov 2018 23:54:36 +0100 (CET)
Received: from [IPv6:2001:67c:1232:144:e6a7:a0ff:fe0b:6b0c] (unknown [IPv6:2001:67c:1232:144:e6a7:a0ff:fe0b:6b0c]) by mork.alvestrand.no (Postfix) with ESMTPSA id 366567C078E; Mon, 5 Nov 2018 23:54:34 +0100 (CET)
To: Iñaki Baz Castillo <ibc@aliax.net>
Cc: Sergio Garcia Murillo <sergio.garcia.murillo@gmail.com>, rtcweb@ietf.org
References: <185c8d1d-3971-ad09-eee0-a26bed446a96@alvestrand.no> <CALiegfmbghnBtDt=wfCAbOWi5SDFTi2qPgDOuXHRazKSvvCKNQ@mail.gmail.com> <CA+ag07YD3oSuL=R=h-28waha4b7xf7haU+-oWuNbzO_sBY4MQw@mail.gmail.com> <e567832e-1918-d51c-6f00-a732547c0a8e@alvestrand.no> <CA+ag07byo1vReeo2uMKxmF1tnzW+4CJSMPLaJO79H0s9j0PO0g@mail.gmail.com> <31fb92c1-2934-c33f-a3cf-552f027eacda@alvestrand.no> <bb7f863b-510c-f460-c9b0-843d500784b8@gmail.com> <5db76ada-b896-7eba-b42e-85b2e239dc42@alvestrand.no> <db90e287-145b-5ffe-18c0-f38faed76c07@gmail.com> <CALiegf=7yJJEbGT9SrbcEBBo9cnBbPimDP_oaTzJL63hrnXGoQ@mail.gmail.com> <CA+ag07ZuGYBhr=djPP=nLXLX96Yp2O4H8rJT2z8RVvNTiky2qw@mail.gmail.com> <CALiegfmOsLgeO-jkj20qKa0=w-xwHJdKD12Py_Dvades8Jjnrw@mail.gmail.com> <fe3e1b27-ba9f-4403-6835-8e7faebb4362@gmail.com> <CALiegf=o6z-HpU+Dr=KbJJss6pYenEnKo620gEyvkJ6PubvWRA@mail.gmail.com> <e2ba2ad8-a3eb-fa99-3a77-2ea7131237a8@alvestrand.no> <CALiegf=1gvE04pWL_aKiw9q=N7iF2Max17Hb+vhkd9On4dp7Kg@mail.gmail.com>
From: Harald Alvestrand <harald@alvestrand.no>
Openpgp: preference=signencrypt
Autocrypt: addr=harald@alvestrand.no; prefer-encrypt=mutual; keydata= xsFNBFRpbhYBEADXu8uE7LDQgrEB/zclYiwWRb50FnuJjIdK5Q7t68tSxx+LU8HTfxwOgHo9 vMyQvntoRBOHQZDJzvdAnZj/7vtl9RDfWvhUz+o9jSMyORzrt0kiW2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hYCGwwFCQlmAYAACgkQawFW3omifDRKhg//eHcjvxcA ENNe66f5R3ULi5pMbrHGLMGirVX9pHTRf5+5OFaGr8bwXeYkCHpptpxr2Kk/PUzpUWOL2uvL lh7QhPw3+GoEWubXOAgHiQW5iIzkA9wYw/nctZ+5veHN7InVqJ7djhtTN7K9Luj4nDR1T7Vf 61zpCKLlEW6W5MAp4slRVzRiFfaMfMYkxLm6MBxC961j8Lrqx2XNMGugaYh1QzcFYTbFmGKX 5SY4EQsETiB0PeE3IBVtXfiabrk8YX2IuL9BrEgD6GngXTd78hUMnZeqjvnS772bjRgwLCz7 Hab6hQESrFCNXfxzb39y5DLHwXtB/HruYqVD48XvPnNV0UNsWcS+7rtPFMmkd3MTvoAOWjkV zeQHpvF71IlwWginXbkf9aR/QsAbMIQDZWhsd+ma67V6g6KH41r6mNXAgK2JlA1CqgblM7iB hl01vL0V5bkbInZq2sB505Hn1DSc4NoP2WHlwe8Bm8vVG5oyfyPw9ReS9WLVY9w7fK4EKOgk VnOsIQuE0WIPT0Ak+hJ0UigOduuCX7s7NIVaOgWQe1q4Xytgj1RHjg9qlA6eQiTUrAx7Mu7s eliWCFuWsQXoaktVEDjoWVbP9dgozanL5kwWh/sJNtHVQbgu3IG4w8D3QvvOE83+jAdzgOzv pqHJkrqlWu+R9ZqBucZLqjQvQZk=
Message-ID: <ffad83c9-f14b-4cdd-2d58-b0c56e547053@alvestrand.no>
Date: Mon, 05 Nov 2018 23:54:30 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <CALiegf=1gvE04pWL_aKiw9q=N7iF2Max17Hb+vhkd9On4dp7Kg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Content-Language: en-GB
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/tdUHv7LhtBcbQcVtYQTXGdf0VWI>
Subject: Re: [rtcweb] JSEP question: How to set up simulcast for server-originated calls?
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.29
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: Mon, 05 Nov 2018 22:54:42 -0000

On 11/05/2018 10:37 PM, Iñaki Baz Castillo wrote:
>> I think the text would have to say that we discard encodings from either
> the beginning or the end of the list (I'd suggest the end).
> Sorting is going to make some of the people unhappy, some of the time.
>
> If in my example above the browser discards encodings at the
> beginning, those would remain:
>
> - 400kbps
> - 750kbps
> - 1000kbps
>
> which are not good for common simulcast usage.
>
> If in my example above the browser discards encodings at the end,
> those would remain:
>
> - 150kbps
> - 120kbps
> - 400kbps
>
> which are not good for common simulcast usage.

If in your example, the writer of the SDP knew that the browser would
discard encodings at the end, it would send

- 150kbps
- 400kbps
- 1000kbps
- 120kbps
- 750kbps

That's predictable.

If it thought "biggest and smallest are most important", it could also
choose to send

- 120kbps
- 1000kbps
- 400kbps
- 150kbps
- 750kbps

If it thought "most clients are 400kbps, or 1000kbps, the 120kbps client
is only seen occasionally, and handles 3 streams anyway",
it could send

- 400kbps
- 1000kbps
- 120kbps
- 150kbps
- 750kbps

If the behavior of the responder is predictable, the initiator can
achieve the result it wants.

>
> :)
>
>
> On Mon, 5 Nov 2018 at 22:33, Harald Alvestrand <harald@alvestrand.no> wrote:
>> On 11/05/2018 03:33 PM, Iñaki Baz Castillo wrote:
>>> On Mon, 5 Nov 2018 at 15:21, Sergio Garcia Murillo
>>> <sergio.garcia.murillo@gmail.com> wrote:
>>>> By the way, according to the simulcast draft that should not be a problem at all:
>>>>
>>>>    An answerer that receives an offer with simulcast that lists a number
>>>>    of simulcast streams, MAY reduce the number of simulcast streams in
>>>>    the answer, but MUST NOT add simulcast streams.
>>> Not sure if that also covers "recv" simulcast items in the offer.
>>> Probably yes, so ok.
>>>
>>> However still useless IMHO. Imagine an SFU that wants to receive, at
>>> least those bitrates (because somehow it knows that all devices can
>>> handle at least 3 simulcast streams):
>>>
>>> - 150kbps
>>> - 400kbps
>>> - 1000kbps
>>>
>>> Imagine there are also some devices supporting up to 5 streams, so the
>>> SFU produces this simulcast settings in the offer for receiving:
>>>
>>> - 150kbps
>>> - 120kbps
>>> - 400kbps
>>> - 750kbps
>>> - 1000kbps
>>>
>>> If a device that just supports 3 simulcast streams receives such an
>>> offer, it would discard 2. Which ones? ok, the SDP can include info
>>> about the desired max-bitrate per rid, and we may think: oh, we can
>>> get the list of rids and bitrates  after pc.setRemoteDescription() by
>>> calling pc.getTransceivers()[1].receiver.getParameters().encodings, so
>>> the app can decide which ones to enable.
>>>
>>> But that's not true since receiver.getParameters() should not contain
>>> more rids than those supported by the device. Well, this constraint is
>>> really about sender.getParameters(). So you may say: ok we somehow
>>> read the maximum simulcast streams that our browser/device can send
>>> and then choose the appropriate ones from the receiver can call
>>> transceiver.sender.setParameters() with them.. Error! there is no API
>>> for knowing the max number of simulcast streams the browser can
>>> produce.
>>>
>>> Too many assumptions and non existing features in this text to make
>>> this scenario really possible.
>> I think the text would have to say that we discard encodings from either
>> the beginning or the end of the list (I'd suggest the end).
>> Sorting is going to make some of the people unhappy, some of the time.
>>
>>
>> --
>> Surveillance is pervasive. Go Dark.
>>
>

-- 
Surveillance is pervasive. Go Dark.