Skip to content

Why do person-selection boxes land in the wrong place after a video preview resizes?

Store selections relative to the displayed video content rather than outer page dimensions. A containing box can include empty space when it fits the video without cropping. That space does not represent source pixels.

NATIVE SOUNDTRACK AND MEDIA FINISHINGAISwapLab team · Editorial methodPublished 2 min read
See the recorded exampleExplore 67 Image SkillsIndependent finishing · Check the actual file

Separate box and content rectangles

For a 320 by 240 box containing a 16:9 video fitted without cropping, the actual content is 320 by 180 with 30 pixels above and below when centered.

Normalize against content

Subtract the content offset before converting the click to a fractional coordinate. Reject coordinates that land in padding. Account for orientation, mirroring and a deliberate crop separately.

Resize and retest

Use an asymmetric landmark and check that it remains selected after switching between screen widths.

Pass condition

The selection follows the same part of the original frame at different display sizes.

Sources

Review the result in context.

Compare the recorded example and its documented limitations.

See the recorded example