Re: [csswg-drafts] [mediaqueries] definition of video width and height (#5043)

I'm not sure what you mean by "video plane" here @frivoal ? I'm not sure there's a good W3C resource that defines the terms properly, which is awkward because there's a crucial difference between the decoded video size and the viewport size. (This has a big impact on subtitle/caption positioning, by the way.)

Encoded video size != Decoded video size != viewport size.

Let's ignore encoded video for the time being, because we're probably not really interested in it. Instead, think about decoded video, and call that the "video" as opposed to the rectangular area displaying that video, let's call that the "viewport".

For example, the video might have an aspect ratio of 4:3 and be shown in a viewport with aspect ratio 16:9. There are any number of ways to arrange for this, but looking at just three approaches that are used:
1. show the full height of the video, and put (maybe black) bars on either side. 
   - video width < viewport width
   - video height == viewport height.
2. fill the viewport with the video, chopping off the top and bottom of the video.
   - video width == viewport width
   - video height > viewport height.
3. zoom the video somewhat so that there are still bars on either side, but they're smaller, and there is still some content chopped off the top and bottom, but not as much. 
   - video width < viewport width
   - video height > viewport height

### How does this affect captions/subtitles?

(not sure how on-topic this is for this issue but it seems likely to be relevant)

I mentioned this really affects subtitle and caption positioning. The typical reason why captions are positioned relative to video, for accessibility, is to avoid having them obscure some part of the video that is important for understanding/experiencing the video. There is a general problem with specs like WebVTT that position captions only relative to the viewport, because the caption author doesn't know how big the viewport is, they only have access to the video.

If we can arrange it, caption positions should be authored relative to the video, in terms of proportional size and position, and then if there's some way to fix up a mismatch between the video aspect ratio against which they were authored, and the presented video aspect ratio, then we have some hope of player code doing something sensible. 

By the way, the IMSC [`activeArea`](https://www.w3.org/TR/ttml-imsc1.1/#ittp-activeArea) feature is designed to allow the caption file to signal something to the player so the player can make some sensible decisions. One possible decision is to set the limits of scaling of the _video_ to deal with examples like those shown above so that relative positioning of captions can be made.

-- 
GitHub Notification of comment by nigelmegitt
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5043#issuecomment-623994480 using your GitHub account

Received on Tuesday, 5 May 2020 11:16:15 UTC