W3C home > Mailing lists > Public > public-webrtc@w3.org > February 2016

Re: maxHeight and maxWidth

From: Stefan Håkansson LK <stefan.lk.hakansson@ericsson.com>
Date: Fri, 12 Feb 2016 12:59:20 +0000
To: Adam Roach <adam@nostrum.com>, Peter Thatcher <pthatcher@google.com>, Randell Jesup <randell-ietf@jesup.org>
CC: "public-webrtc@w3.org" <public-webrtc@w3.org>
Message-ID: <1447FA0C20ED5147A1AA0EF02890A64B3748314C@ESESSMB209.ericsson.se>
On 10/02/16 20:31, Adam Roach wrote:
> On 10/12/15 10:37, Peter Thatcher wrote:
>> ​ My point was that if you think we should have ".maxWidth" and
>> ".maxHeight" in RTCRtpEncodingParameters, that's a separate proposal.
>>   So, if you want it, please propose it.
>
> This didn't seem particularly important at the time, but we've gotten
> some implementor feedback that indicates otherwise.
>
> Specifically, we've heard from implementors that the use of the current
> proposed (sole) control for resizing simulcast streams is problematic in
> the face of streams that can change size (such as captured windows, or
> rotating cameras on mobile devices).
>
> The scenario under consideration is one in which each media source
> generates two streams: one full-size, and one which must be exactly 90
> pixels tall. These are being sent to a media switch, which has no
> ability to decode and re-encode streams. Some of the recipients
> (non-web-browsers) do not have the ability to resize incoming streams.
>
> In the optimal (and admittedly typical) case, would be possible to do
> something like this:
>
>    params.encodings[1].scaleResolutionDownBy =
> videoTrack.getSettings().height / 90;
>
> Where this falls apart is when the height of the video track *changes*.
>
> By contrast, if they could simply do something like:
>
>    params.encodings[1].maxHeight = 90;
>
> Then the problem goes away.
>
> This seems relatively straightforward to spec out, and -- given that we
> see real implementor need for it -- I think it makes sense to go ahead
> and add it at this point.
>
> So, what are the arguments against maxHeight and maxWidth?

(Contributor hat:)

We've introduced maxBitrate and maxFramerate in the 
RTCRtpEncodingParameters dictionary, so adding maxHeight and maxWidth 
would not look that strange IMO.

Further, we already have to have text (if any more is needed - I'm not 
sure) explaining the relation between a track's frameRate 
constraint/setting and maxFramerate of the EncodingParameters, so doing 
the same for maxWidth/Height vs. the track's width/height constraint 
should be straightforward.

The odd bird would then actually be "scaleResolutionBy". While what it 
means when the track is constrained to a narrow range regarding width 
height is clear, I think we may need some more text on what happens when 
the input track is unconstrained (and can vary a lot).

We also need to clarify what would happen if both maxWidth/Height and 
scaleResolutionBy are set (and are contradicting in some way).

>
> /a
Received on Friday, 12 February 2016 12:59:54 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:47 UTC