W3C home > Mailing lists > Public > public-media-capture@w3.org > December 2015

Re: Need clarification: Does the spec allow varying the video resolution sent to the sink per-frame?

From: Martin Thomson <martin.thomson@gmail.com>
Date: Fri, 11 Dec 2015 10:05:35 +1100
Message-ID: <CABkgnnWJDB9YsSpU-o+Ct+W2Z1GoM2ivHdAT7NpexZS49SKw2Q@mail.gmail.com>
To: Yuri Wiitala <miu@chromium.org>
Cc: "public-media-capture@w3.org" <public-media-capture@w3.org>
In general, media capture recognizes that sources can change in size
dynamically.  See

I don't think that there is any implicit assumption about limits on
this, so per frame changes are perfectly reasonable (in theory,
changes could be even more frequent than that, but you would never see

Constraints do establish limits on this, but they can be as loose as
you like.  There is no need to fix a resolution (or frame rate, or
aspect ratio, etc...).

On 11 December 2015 at 08:39, Yuri Wiitala <miu@chromium.org> wrote:
> For screen capturing use cases, such as desktop or tab capture, the source
> content can be resized during a capture session (e.g., the user resizes
> their browser window).  However, a video stream whose resolution changes
> dynamically (i.e., possibly per-frame) at the sink is not discussed nor in
> the examples.
> From what I can tell, the spec seems to always assume one fixed video
> resolution is chosen at the beginning, within what is allowed by the
> MediaTrackConstraints.  Then, only by using applyConstraints() can a
> different fixed resolution be set (by evaluating the new constraints).
> Or, am I wrong, and because it's not explicitly stated, that there is NO
> assumption about video resolution to the sink being fixed?  For what it's
> worth, in the Chrome implementation today, the resolution can vary
> per-frame.
> Details on my use case: In Chrome, our tab capture implementation uses the
> min and max width and height constraints to produce video frames of any
> resolution within range.  It can also provide a fixed aspect ratio, with
> letter-boxing added where needed, or use any aspect ratio.
> In addition, video resolution can change, not just because of source content
> resizes, but also depending on system performance (CPU/GPU availability) and
> other external conditions (e.g., network bandwidth when remoting content).
> For example, on a low-end machine, video resolution will be decreased in
> order to maintain a smooth frame rate.  For further details, please see:
> https://www.chromium.org/developers/design-documents/auto-throttled-screen-capture-and-mirroring
> Thanks,
> Yuri
Received on Thursday, 10 December 2015 23:06:04 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 10 December 2015 23:06:05 UTC