Why does my Shorts video show different dimensions in a safe-zone checker?
A browser checker may report the video element’s intrinsic dimensions, while a file inspector may show encoded frame dimensions. Those values can differ because browser intrinsic sizing accounts for media metadata such as aspect ratio and clean aperture. In this tool, the displayed dimensions and canvas bitmap follow the browser’s videoWidth × videoHeight values; they are not a promise about the encoded raster.
What this checker actually reads
In the local app code, the video path assigns w = el.videoWidth and h = el.videoHeight after the media has loaded. It then sets canvas.width = w and canvas.height = h, and shows w × h in the source information and result-size labels. The image path uses naturalWidth and naturalHeight instead. That is a concrete implementation choice, not a general rule for every checker.
MDN defines videoWidth and videoHeight as the video’s intrinsic dimensions in CSS pixels. It says the browser starts with raw pixel width and height and may account for aspect ratio, clean aperture, target-device resolution, and format-specific factors. So “the number shown by the checker” answers what dimensions this browser exposes to the page; a file inspector may answer a different question about the encoded stream.
Separate the three dimension questions
| Question | What it refers to | Where to check |
|---|---|---|
| What raster is encoded? | Frame dimensions recorded in the media stream/container | A media inspector or trusted metadata tool |
| What intrinsic size does this browser expose? | videoWidth × videoHeight, after browser interpretation of the media | This checker’s source-size label |
| What bitmap does this tool export? | The canvas width and height assigned by this code | Open the exported PNG’s image properties |
Trace the dimensions from upload to PNG
For this implementation, the dimension flow is:
loaded video → W = videoWidth; H = videoHeight → canvas = W × H → PNG canvas export.
The guide’s pixel edges are calculated from those canvas dimensions. With left margin L%, right margin R%, top margin T%, and bottom margin B%, the usable rectangle is:
x₁ = W × L / 100x₂ = W × (1 − R / 100)y₁ = H × T / 100y₂ = H × (1 − B / 100)
For an illustrative browser-reported size of 540 × 960 and the app’s default side margins of 48/1080 × 100% left and 192/1080 × 100% right, the guide edges calculate to x₁ = 24 px and x₂ = 444 px. These are derived guide coordinates for that example, not measurements of YouTube’s interface. Because the margins are percentage-based, a different reported canvas size produces different pixel edge values while retaining the same proportions.
How to diagnose a mismatch
- Read the dimensions shown after the video has loaded; the page waits for video data before reading them.
- Compare them with a media inspector’s encoded-frame dimensions, keeping the labels separate.
- Export the preview PNG and inspect its bitmap dimensions. In this app, the canvas dimensions are set directly from the browser-reported values.
- If one value is zero or the video cannot decode, try another supported file/browser; the app rejects a frame without readable dimensions.
Do not resize a clip merely to make two labels match. First identify which dimension each tool is reporting and whether the media metadata changes the browser’s intrinsic interpretation. This checker is a visual guide; it does not certify encoding, playback compatibility, or platform UI placement.
Questions and answers
Does the checker display the encoded frame size?
It displays the browser’s videoWidth × videoHeight values for video input. A media inspector may expose encoded frame dimensions separately.
Why might browser dimensions differ?
MDN notes that intrinsic dimensions can take aspect ratio, clean aperture, target-device resolution, and format details into account.
What dimensions does the PNG use?
The app sets its canvas width and height to the browser-reported dimensions before exporting the PNG.
Open the local Shorts frame checker · Browse all guides
Watch the short explanation
Original walkthrough of the checker’s dimension path.
References: MDN: videoWidth and MDN: videoHeight explain browser intrinsic dimensions. The implementation trace and percentage-to-pixel calculation above come from this site’s app.js; the 540 × 960 input is an illustrative calculation. Competitor pages used for topic context: OrsonLord, CreateComfy, and Kreatli. No claim about a universal Shorts interface specification is made here.