-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined how video dimension constraints are met #495
Comments
More than "how", the spec doesn't mandate downscaling, so this won't work across browsers. The sole mention of downscaling in the entire spec appears in this paragraph about concurrent use: "Multiple tracks can be attached to the same source. User Agent processing, such as downsampling, MAY be used to ensure that all tracks have appropriate media." We're implementing that paragraph in Firefox, to abstract away knowledge of other tabs, which is good for privacy. However, this is separate from boosting the fitness distance pool. We're open to figuring out how to interpret rescale intent from constraints, as you can see in #472.
The only spec way to do that today is to downscale in the encoder, using scaleResolutionDownBy. An implementation would have to be careful to avoid rescaling twice. How sure are we we want the |
@jan-ivar thanks for your input, I agree this is related to #472
I think the important thing here is that we have |
@stefhak I think you're thinking of "constraining" = rescaling, which is not the spec definition. For instance, If The spec defines Firefox and Edge implement discrete settings dictionaries. Chrome implements a continuous space. |
@jan-ivar I may very well have gotten things wrong, that happens all the time :) Could you explain what you think should happen if
|
Correction: I found one more, in this note. One has to search for "downsampling" and "resampling". |
#502 seems to be solving this question. |
As far as I read the spec, it is not defined how constraints on (video track) width, height and aspectRatio are met. Will the video be scaled down, cropped, a combination? Will it be letterboxed/pillarboxed?
A concrete use case that has been discussed is one where square 100x100 thumbnails are to be shown (at a remote end point). Say the camera produces a 16:9 high resolution video feed, applying constraints
width:100, height:100
should ideally scale down to height 100 and then crop the width to 100 in this use case. Applying (only)aspectRatio:1
should crop the width to 1080 (at least for this use case).We should discuss this at TPAC.
The text was updated successfully, but these errors were encountered: