Re: [Sframe] Partial decodability and IDUs

Bernard Aboba <bernard.aboba@gmail.com> Thu, 19 November 2020 23:23 UTC

Return-Path: <bernard.aboba@gmail.com>
X-Original-To: sframe@ietfa.amsl.com
Delivered-To: sframe@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3B7403A0E10 for <sframe@ietfa.amsl.com>; Thu, 19 Nov 2020 15:23:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 gUuwUYludwIZ for <sframe@ietfa.amsl.com>; Thu, 19 Nov 2020 15:22:59 -0800 (PST)
Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (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 A9ADA3A0E0B for <sframe@ietf.org>; Thu, 19 Nov 2020 15:22:58 -0800 (PST)
Received: by mail-lj1-x233.google.com with SMTP id x9so8096991ljc.7 for <sframe@ietf.org>; Thu, 19 Nov 2020 15:22:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GRf2Iz21NxVY5Iv5Y6MiKsaozcvRmPOPu3AutcbEJXA=; b=mk7JL/UkGxd3xbZesob+X4NZMjdHlInhk3/muYsRkWI6aRjhkLTSeoMqPuR+pEkO2t JVhqGQQAjgLcHNZyQHB2YUcbWEGs/ntaaEGaTutbeKLpAQSLC/SJUwAIyxaKTHp8zM7W CFve+GE2G77foeXKQy5/uo71klAj7gu68IlUm8hEkcMZCVdu+jg+BFx/eU5PYGcsr3Fj PGmsh0rlI0kJg16EhAdEPa8kSvkqeVlJKir21xOKZvlMCSSCaFc+N+GHyvL9DXJwRnXJ mvQLvpbjHQdiDsd3cLVCHrMeo3JiDmOL03zrM65GW/6LOh3uVShZI51qCMXEJ65w5pwK z5Wg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GRf2Iz21NxVY5Iv5Y6MiKsaozcvRmPOPu3AutcbEJXA=; b=OfSei+s1ndpckeeHGf8xBi1Wb69jm/hS54lHP7jXHUn3ET6ncTqlO+xld3MNmD03zx 7vTwc1J5/39+nGZX9PsaITNpD201NjEmsWTEuZtJ0qdPFoW3lZbwiovT+b+fBVcarzH5 980WS4Y/+YmeqANc6VR6CUFuwqcZumtst1H3iPNPrFWIUc1DROMIIQ4476lv+nnw3Zr/ BZRkoS6Wm59T9t7aQSUACfd4UbsSwIhl58ZnpJCjeIMKBKsXl0MKwkBjQplE7hObHzVn tTfusUhIjJ1VXpwPmKvTEQuYoe+4zvsX2zNfIN0DphvgAhFk+GhfEmd0REN6oEABzc7M FBEg==
X-Gm-Message-State: AOAM532j1VZSG0cwRzRe+h8Lzhnab9cG8nDsJ25ynp8nmnBhMt69P/Hv aHvEXbntb0t3eNkAYXXEAUjmTWvjPOB6uOS4QAs=
X-Google-Smtp-Source: ABdhPJwJEHdIfc3mu3C0xITIwdf2KwblMJ0Vgm6ycEjwkqdIyYdaZ2os+2TALlTn2TgOt9pCKdEI0n2nFFw6o2IK+ww=
X-Received: by 2002:a05:651c:1246:: with SMTP id h6mr7168949ljh.187.1605828176430; Thu, 19 Nov 2020 15:22:56 -0800 (PST)
MIME-Version: 1.0
References: <e9c91b96-b956-5aa9-b78c-9b9414616c77@gmail.com> <CAOJ7v-3U+dS=V3199yduo6192OF=iXe=et6EYF-ZVFv3drR4kw@mail.gmail.com> <7eadfc25-d326-3a02-f88f-bfdc02b9a42c@cosmosoftware.io> <CAL02cgR4qmAuHzD9mRtOXkTL9+LhN=zNOCynapBcrF=c_e4ZmQ@mail.gmail.com> <2752b6f0-ec61-6a19-e17c-0347c451a17c@cosmosoftware.io>
In-Reply-To: <2752b6f0-ec61-6a19-e17c-0347c451a17c@cosmosoftware.io>
From: Bernard Aboba <bernard.aboba@gmail.com>
Date: Thu, 19 Nov 2020 15:22:46 -0800
Message-ID: <CAOW+2dsSzZBXo3oyKOfkhXQV7LXfymam9Dvu_bzQWJMsn3mcag@mail.gmail.com>
To: Sergio Garcia Murillo <sergio.garcia.murillo@cosmosoftware.io>
Cc: Richard Barnes <rlb@ipv.sx>, sframe@ietf.org
Content-Type: multipart/alternative; boundary="00000000000006cc2e05b47e0270"
Archived-At: <https://mailarchive.ietf.org/arch/msg/sframe/QJvcdKmlWA_GE3bGhybOKKFgIdU>
Subject: Re: [Sframe] Partial decodability and IDUs
X-BeenThere: sframe@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <sframe.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sframe>, <mailto:sframe-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sframe/>
List-Post: <mailto:sframe@ietf.org>
List-Help: <mailto:sframe-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sframe>, <mailto:sframe-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Nov 2020 23:23:01 -0000

Sergio said:

"I am afraid that we end up another doing a per-codec packetizer, which
would be almost the same as just using current packetization formats and
explain how to use encrypted data with them. And all for a feature that we
are not current using in webrtc."

[BA] Some per-codec logic is required.  How else can the metadata be
obtained from the bitstream? But the question is whether it is *required*
to packetize IDUs separately, so they don't share fate.  I'd say this would
depend on the use case. If WebRTC didn't care enough about this to
implement it previously, why should SFrame make a difference?


On Thu, Nov 19, 2020 at 3:15 PM Sergio Garcia Murillo <
sergio.garcia.murillo@cosmosoftware.io> wrote:

> How to actually packetize the IDUs is not a big deal, you only need to
> have a start and end of IDU bits on the header and rely on increasing rtp
> cseq nums (i.e. no IDU interleaving), but at the end of the day someone
> will have to specify what an IDU in h264 means and what is its format (a
> group of nal units?).
>
> I am afraid that we end up another doing a per-codec packetizer, which
> would be almost the same as just using current packetization formats and
> explain how to use encrypted data with them. And all for a feature that we
> are not current using in webrtc.
>
> Best regards
>
> Sergio
>
>
> On 19/11/2020 23:54, Richard Barnes wrote:
>
> This may be too simplistic, but there's also a non-codec-specific approach
> here that occurs to me: Just have the SFrame header have a length field.
>
> I'm imagining a setup where we have the SFrame layer between the encode
> and packetization layers, and:
> - The encoding/decoding layer produces consumes each frame as a sequence
> of IDUs
> - The SFrame layer translates between IDUs and SFrame encrypted enits
> (SEUs? in any case, each SEU is an encrypted IDU)
> - The packetization / depacketization layer packs SEUs into packets
>
> The only thing you need to make that work is (1) a mechanism for the
> receiver to understand what chunks of the SEU sequence he has (e.g., fixing
> reordering), and (2) a way to unpack SEUs if there can be multiple in a
> packet.  It seems like (1) could mostly be a transport assumption.  For
> (2), you would just need something like a length field.
>
> As Sergio points out, there is a need for someone to know where the IDU
> boundaries are, either at the SFrame layer (if the input is a whole frame),
> or at the encode layer (if the encode-SFrame API can talk in terms of
> IDUs).  But especially in the latter case, this framework keeps the
> codec-specific stuff local to the encode layer, which is codec-specific in
> any case.
>
> There is some trade-off here, in that this framework doesn't expose any
> encoded information to the SFU.  But ISTM that if you want that
> functionality, then (a) you're going to have to have codec awareness
> sprinkled all through the stack and (b) you're going to have to be really
> careful designing the which-parts-to-encrypt scheme to avoid undermining
> your security guarantees.  So I'm generally inclined toward the cleaner
> abstraction here.
>
> --Richard
>
> On Thu, Nov 19, 2020 at 5:11 PM Sergio Garcia Murillo <
> sergio.garcia.murillo@cosmosoftware.io> wrote:
>
>> You are right regarding that the SFrame layer does not need to know what
>> is feed in for encryption, but in order to be able to have a working end to
>> end solution for webrtc, someone will need to define what and how this IDUs
>> are generated and reassembled for each codec if we want to have
>> interoperable implementations in different devices.
>>
>> That process is codec-dependant and I would require quite a lot of effort
>> (and also supporting it on the agnostic packetization), so I would prefer
>> to have strong arguments in favor of doing it.
>>
>>
>>
>> On 19/11/2020 22:53, Justin Uberti wrote:
>>
>> The encoder needs to be aware of any mechanism to generate IDUs (e.g.,
>> slices), and typically each of these IDUs will be handed up to the consumer
>> individually. So the SFRAME layer doesn't need to do any splitting, it just
>> knows that it should treat each IDU as something it needs to individually
>> SFRAME and packetize.
>>
>> On Thu, Nov 19, 2020 at 1:40 PM Sergio Garcia Murillo <
>> sergio.garcia.murillo@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>>
>>> As most of you already know, this morning I made a presentation in
>>> AVTCORE introducing the topic about the need to specify an agnostic video
>>> codec packetization format.
>>>
>>>
>>> https://datatracker.ietf.org/meeting/109/materials/slides-109-avtcore-sframe-rtp-encapsulation-00
>>>
>>>
>>> I got an AP for creating an initial draft so it could be reviewed and
>>> accepted.
>>>
>>> However, there were two main concerns that we should address in this
>>> this group:
>>>
>>>    - Historically, avtcore has explicitly designed not to be payload
>>>    agnostic and  declined to standardized codec agnostic payload formats in
>>>    number of cases.  If that is to be changed, needs to be done deliberately.
>>>    - Need to define the "minimum decoding unit" or "independently
>>>    decodable unit", that SFrame will work with.
>>>
>>>
>>> Regarding the second one
>>>
>>>    - Full video frames (just use whatever is the encoder output)
>>>    - Spatial layer frames
>>>    - "independend decodable subframes" like h264 slices, vp8 partitions
>>>    or av1 tiles which allows partial decodability which is mainly aimed for
>>>    enhancing packet loss resilience.
>>>
>>>
>>> Spatial layer frames is the minimum we should target as if not it will
>>> just prevent SFUs for using SVC codecs. So the question is if we should go
>>> deeper and implement lower partitions of the frames or not.
>>>
>>>
>>> AFAIK, currently, libwertc does not support partial decodability and I
>>> personally haven't seen any practical usage of this in the RTC world (while
>>> it makes a lot of sense in streaming/broadcasting world), but would like to
>>> hear what is the view and experience of the other members of this group.
>>> Also note that if we are going to support them on SFrame this will require
>>> a greater effort because we will need to explicitly define how the frames
>>> must be split before being encrypted y SFrame for *each* possible video
>>> codec (h264,h265,vp8,vp9,av1,...).
>>>
>>>
>>> There was also the question about how/if we should support other codec
>>> features like DON/interleaved mode for h264, which I also think we should
>>> not support mainly because we are not currently using it on webrtc
>>> implementations.
>>>
>>>
>>> What do you think?
>>>
>>>
>>> Best regards
>>>
>>> Sergio
>>>
>>>
>>> --
>>> Sframe mailing list
>>> Sframe@ietf.org
>>> https://www.ietf.org/mailman/listinfo/sframe
>>>
>>
>> --
>> Sframe mailing list
>> Sframe@ietf.org
>> https://www.ietf.org/mailman/listinfo/sframe
>>
> --
> Sframe mailing list
> Sframe@ietf.org
> https://www.ietf.org/mailman/listinfo/sframe
>