Re: [rtcweb] JSEPbis: Questions about send-only/recv-only codecs and Section 4.2.6

Justin Uberti <justin@fixie.ai> Mon, 04 March 2024 05:57 UTC

Return-Path: <justin@fixie.ai>
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 E6734C14F689 for <rtcweb@ietfa.amsl.com>; Sun, 3 Mar 2024 21:57:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.105
X-Spam-Level:
X-Spam-Status: No, score=-7.105 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fixie.ai
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HUq2gWS8k_2a for <rtcweb@ietfa.amsl.com>; Sun, 3 Mar 2024 21:57:01 -0800 (PST)
Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E1127C14F683 for <rtcweb@ietf.org>; Sun, 3 Mar 2024 21:57:01 -0800 (PST)
Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-dcbf82cdf05so4023901276.2 for <rtcweb@ietf.org>; Sun, 03 Mar 2024 21:57:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fixie.ai; s=google; t=1709531820; x=1710136620; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qTiv4EYrfbVzpYeDLSkX5lS1MEy7SL4UpqPwfuQ52ZE=; b=Pqx1j+hHUOvxmAr36Efefkuaxb8t4UR7OGqE6pIdqIwsRQYyPLiwgFMRlHvzSNvW5Q i4g7msVMaFocPwVhwGy9Gfm7K5MRWQA14xuHWUgZVXXXnAH2HrcVTYy8kFA1RZiJw6Il 82g0+obOHHHOzzLkeCQRBN2gdACJJD8jcwemPgsiKeRmS5DFe+Ydg9GZSvRvC0pMf3uU E+EHiy/jcbhnQ71xGVm75WFPXqtJ15qfySXJcl+n9MujDhUJ73RqPuPktKDzvptuTT7d bSRwT5PIze225tPTILOjhqQ1UNeh02r5nyE0XfAKozmqREIqTx0XGsf4HwmS9kwBBhTA e9nA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709531820; x=1710136620; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qTiv4EYrfbVzpYeDLSkX5lS1MEy7SL4UpqPwfuQ52ZE=; b=WDfNmtZiN+0zx4aby/djY9nw6wESQB+HlVcPys0v0OFuOLGf8aKIxPC7L3MG+eyiAp XNxVyK72RQVxAKmJZ5mN0c8Qp9ZarmyNGPADaHHderASTxmuGcUfBnerDuXD0e2twLW5 /cV1DfU1fJW5HHjwHMujNggAbRDMeGChefmlBUlyxXOD10BxkbPvyzKAeAgEtry5Jilt 0R94eH0nRUabNpKrh6X4z2Ymp2XeCIsHKKv1zFTJZu+3qKuvlrQeBVU6So2GO13MJiwm CgEwUZeOQBKgZxSd9TJ/tVCMRCgzwiv0Rd7uV7W7CN5RFojcHhWq5eeqTRJ6ZHd7tIgN 9m/g==
X-Forwarded-Encrypted: i=1; AJvYcCWv9GR7rw+jiYv0CbLio9AhuLea2O610SZCorhzND5khBoY+ryrnaMUonQNlr0pkHcBaJIw0mSPqbp4ygDbDqo=
X-Gm-Message-State: AOJu0YxYH42P+ihUMuqqGg9Ld1l9JyS/JOXnqaPSrbh6Z5dBBzhB28zB CXYaU2pTyaenplcEhp1pF9UZ0YTYsnQk71zvNRv4jY/FRJP2MZb2syn/HoqelVhsRnPw8tqJbUK 2YNiSDSPOh+B25mgvJg3vqyC0E+LWdf90EpzmTRNGBAA4N/2ZTUE=
X-Google-Smtp-Source: AGHT+IG8gRh7IsXDnDlmowfeRsE628kG5FKB3rp+/dBDiVOIMdEjGRmyrXi7sdvMbD9RYddBydAP03aBdOENNPbDf4o=
X-Received: by 2002:a05:6902:604:b0:dc7:4cff:9165 with SMTP id d4-20020a056902060400b00dc74cff9165mr6580962ybt.59.1709531820264; Sun, 03 Mar 2024 21:57:00 -0800 (PST)
MIME-Version: 1.0
References: <CAOW+2dud=K0TuQ5s-MKgmnuvxR-DebFFhquigUbsiKQB3RjdNw@mail.gmail.com> <CAOqqYVGhwsxxj1AnUU+Qk5A9DcqnaGCc5YGo9ntd-CvrY0v6Nw@mail.gmail.com> <CAOW+2duhtXRx6_kDgS6CvwnwgwGK8JH+QkODNEpa1=0r=TQDeA@mail.gmail.com> <CADxkKi+F-Zu6HQFTtAxUE_UsSiVpV5J_zpNYxK1b44Qg_5i0HA@mail.gmail.com>
In-Reply-To: <CADxkKi+F-Zu6HQFTtAxUE_UsSiVpV5J_zpNYxK1b44Qg_5i0HA@mail.gmail.com>
From: Justin Uberti <justin@fixie.ai>
Date: Sun, 03 Mar 2024 21:56:49 -0800
Message-ID: <CAPn_nMOMPDRCkDxk3qRqhz6xw79NTq8gqJdTMtsehwNtY2U8vQ@mail.gmail.com>
To: Philipp Hancke <philipp.hancke=40googlemail.com@dmarc.ietf.org>
Cc: Bernard Aboba <bernard.aboba@gmail.com>, Harald Alvestrand <hta@google.com>, RTCWeb IETF <rtcweb@ietf.org>, Henrik Boström <hbos@google.com>
Content-Type: multipart/alternative; boundary="000000000000e124270612cf64ba"
Archived-At: <https://mailarchive.ietf.org/arch/msg/rtcweb/yKmay9Kmh1FqBacF7BgUbMv2E5w>
Subject: Re: [rtcweb] JSEPbis: Questions about send-only/recv-only codecs and Section 4.2.6
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.39
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, 04 Mar 2024 05:57:06 -0000

The idea behind the text in red is an explicit callout to the fact that the
implementation may decide to use other mechanisms (e.g.,
RtcRtpSender.setParameters, CPU or bandwidth limitations, etc) to decide
exactly what should be sent over the wire.

Also, this API is intended to directly influence signaling, i.e., the set
of codecs that are offered. It is not intended to directly control
RtpSender settings.

I agree with the point that the operation here may seem a bit weird for a
sendonly m= line. That said, I think it is entirely consistent with RFC
3264 S 5.1, where a) what is offered is primarily intended as a guide for
what the answerer will actually send and b) the answerer may choose to send
whatever it wants as long as it uses a format from the offer.

I think keeping sCP focused on what goes into the actual offer will make it
easier to reason about this API.

On Sat, Mar 2, 2024 at 8:31 AM Philipp Hancke <philipp.hancke=
40googlemail.com@dmarc.ietf.org> wrote:

> I believe there are two reasons the current text says "not directly":
> 1/ the answerer will attempt to match the senders order of media formats:
> "Otherwise, the media formats on the "m=" line MUST be generated in the
> same order as those offered in the current remote description," (section
> 5.3.1, assuming sCP it not used at the receiver).
> 2/ the initial answerer may generate a subsequent offer which leads us to
> "the media formats on the "m=" line MUST be generated in the same order as
> in the most recent answer" (section 5.2.2; note: the most recent answer is
> the current local description)
>
> The order or choice of codecs in (1) does not seem to matter until the
> initial answerer changes the direction and creates a subsequent offer the
> order of media formats on the formerly sendonly m-line would matter.
>
> Am Sa., 2. März 2024 um 17:14 Uhr schrieb Bernard Aboba <
> bernard.aboba@gmail.com>:
>
>> The text in WebRTC-PC also includes statements about sCP() that do not
>> seem to apply to the send-only case. For example, in Section 5.4:
>>
>> *setCodecPreferences
>> <https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences> will
>> reject attempts to set codecs not matching
>> <https://w3c.github.io/webrtc-pc/#dfn-codec-match> codecs found
>> in RTCRtpReceiver
>> <https://w3c.github.io/webrtc-pc/#dom-rtcrtpreceiver>.getCapabilities
>> <https://w3c.github.io/webrtc-pc/#dom-rtcrtpreceiver-getcapabilities>(kind),
>> where kind is the kind of the RTCRtpTransceiver
>> <https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver>** on which the
>> method is called*.
>>
>> For a send-only m-line, does sCP really require a match to codecs found
>> in RTCRtpReceiver.getCapabilities(kind), or should it use
>> RTCRtpSender.getCapabilities(kind)?
>>
>> On Sat, Mar 2, 2024 at 4:29 AM Harald Alvestrand <hta@google.com> wrote:
>>
>>> Attempting to reflect my current understanding:
>>>
>>> The only way I can interpret the current text in a sensible manner is to
>>> focus on the word "directly" - given that the text on processing the
>>> preference list also says that if the responder has no preference, the
>>> codecs in the sendonly media section's preference list should be
>>> interpreted as "the codecs that the offerer wishes that the responder
>>> should respond with as their preference, if they can receive them".
>>>
>>> This *indirectly* influences the choice of codecs, since the receiver's
>>> response will limit the sender's selection of what to send.
>>>
>>>
>>>
>>>
>>> On Fri, Mar 1, 2024 at 9:00 PM Bernard Aboba <bernard.aboba@gmail.com>
>>> wrote:
>>>
>>>> The purpose of this email is to alert the RTCWEB WG to a potential
>>>> issue that has been pointed out in JSEPbis Section 4.2.6, with respect to
>>>> the operation of setCodecPreferences().
>>>>
>>>> Currently, support for the H.265 codec in WebRTC is underway in
>>>> multiple browsers, including Chrome, Firefox and Safari.  Safari Tech
>>>> Preview 189 has enabled by default support for both sending and receiving
>>>> H.265, while Chrome and Firefox are working on enabling reception of
>>>> H.265.  This has lead to discussion of potential interoperability issues
>>>> between browsers that can Offer H.265 on a send/recv m-line, and browsers
>>>> that can only Offer H.265 on a recv-only m-line.
>>>>
>>>> At the AVTCORE WG Virtual Interim on February 13, 2024, we
>>>> discussed Issue 22 relating to the handling of send-only and recv-only
>>>> codecs:
>>>> https://github.com/aboba/hevc-webrtc/issues/22
>>>>
>>>> draft-uberti-rtcweb-rfc8829bis Section 4.2.6 says:
>>>>
>>>> "The setCodecPreferences method sets the codec preferences of a
>>>> transceiver, which in turn affect the presence and order of codecs of the
>>>> associated "m=" section on future calls to createOffer and createAnswer.  *Note
>>>> that setCodecPreferences does not directly affect which codec the
>>>> implementation decides to send. It only affects which codecs the
>>>> implementation indicates that it prefers to receive, via the offer or
>>>> answer.*  Even when a codec is excluded by setCodecPreferences, it
>>>> still may be used to send until the next offer/answer exchange discards it.
>>>> "
>>>>
>>>> Questions arose relating to the (red) text in italics, because it does
>>>> not appear to be consistent with the definition of setCodecPreferences()
>>>> within the WebRTC-PC API specification. In particular, while the text may
>>>> be correct with respect to operation of sCP() on a send/recv or recv-only
>>>> m-line, for a send-only m-line it seems odd to insist that sCP() will only
>>>> affect receive preferences, not send preferences.
>>>>
>>>> Currently within the W3C WEBRTC WG, several issues have been opened
>>>> relating to the behavior of setCodecPreferences():
>>>>
>>>>    -
>>>>
>>>>    w3c/webrtc-pc#2936 <https://github.com/w3c/webrtc-pc/issues/2936>
>>>>    -
>>>>
>>>>    w3c/webrtc-pc#2933 <https://github.com/w3c/webrtc-pc/issues/2933>
>>>>    -
>>>>
>>>>    w3c/webrtc-pc#2935 <https://github.com/w3c/webrtc-pc/pull/2935>
>>>>    -
>>>>
>>>>    w3c/webrtc-pc/#2888 <https://github.com/w3c/webrtc-pc/issues/2888>
>>>>
>>>> _______________________________________________
> rtcweb mailing list
> rtcweb@ietf.org
> https://www.ietf.org/mailman/listinfo/rtcweb
>