In any video crop tool, X and Y are pixel offsets that mark where the top-left corner of your new rectangle starts, measured from the top-left corner of every source frame. X controls horizontal position and moves the rectangle to the right as the value grows, while Y controls vertical position and moves it downward as the value grows. The other two numbers — width and height — decide how far the rectangle extends from that starting point. All four values use the same unit, source pixels, so X plus width must not exceed the source width and Y plus height must not exceed the source height. Every value must be a nonnegative whole number, and width and height each have to be at least two pixels. The Video Cropper reads those four numbers as a single fixed rectangle and re-records the selected region as a WebM, so understanding X and Y is the first step to getting a clean export without shifts, clipping, or failed runs.

what do x and y mean when i use video crop
What Do X and Y Mean in a Video Crop Tool?

X and Y Are Pixel Offsets From the Top-Left Corner

Video frames use a coordinate system where the origin sits at the very top-left pixel of the frame. That pixel is coordinate (0, 0). From there, pixel positions are counted rightward along the horizontal axis and downward along the vertical axis. X is the horizontal offset from that origin, and Y is the vertical offset. There is no negative direction available in the crop tool, so X and Y can only be zero or positive whole numbers.

Setting X = 0 and Y = 0 means the crop rectangle starts exactly at the top-left corner of the frame. Setting X = 200 means the rectangle's left edge begins 200 pixels in from the left side of every frame. Setting Y = 80 means the rectangle's top edge begins 80 pixels down from the top of every frame. Both offsets apply uniformly because the Video Cropper draws the same rectangle into the Canvas for every frame the source plays, so the crop region cannot drift or animate. The same coordinate convention is documented in the WHATWG HTML specification for the Canvas drawImage operation, which is the operation the cropper uses to position source pixels into a smaller recording surface.

How the Four Numbers Fit Together

X and Y only describe a starting point. To define a usable rectangle, you also need width and height. Width controls how far the rectangle extends to the right from X, and height controls how far it extends downward from Y. The four edges of the crop rectangle are calculated automatically from these values:

  • Left edge: X pixels from the source's left side
  • Top edge: Y pixels from the source's top side
  • Right edge: X + width pixels from the source's left side
  • Bottom edge: Y + height pixels from the source's top side

Here is what each input controls inside the Video Cropper:

InputWhat it controlsDirectionUnit
XLeft edge positionRightward from top-leftWhole pixels, ≥ 0
YTop edge positionDownward from top-leftWhole pixels, ≥ 0
WidthHorizontal extent of the rectangleRightward from XWhole pixels, ≥ 2
HeightVertical extent of the rectangleDownward from YWhole pixels, ≥ 2

For example, if the source frame is 1920 × 1080 and you enter X = 240, Y = 120, width = 1280, height = 720, the rectangle starts 240 pixels right and 120 pixels down from the top-left, and extends 1280 pixels across and 720 pixels down. The right edge ends at 240 + 1280 = 1520, which is still inside 1920, and the bottom edge ends at 120 + 720 = 840, which is still inside 1080, so the rectangle fits without clipping.

How to Crop Using X and Y in the Video Cropper

  1. Open the Video Cropper and choose a browser-decodable source file such as MP4, WebM, MOV, M4V, or Ogg. Wait until the tool reports the decoded source dimensions; you need those numbers before any X, Y, width, or height value will make sense.
  2. Calculate the rectangle you want. Write down the source width and source height, then pick X and Y as offsets from the top-left corner that leave room for the width and height you need. Confirm X + width ≤ source width and Y + height ≤ source height, and check that width × height does not exceed 3840 × 2160.
  3. Enter the four values as untrimmed whole pixels into the X, Y, width, and height fields. The defaults already select the full frame, so the rectangle you type replaces those defaults.
  4. Select Crop video. Keep the browser tab open while the source plays through once at real time. The cropper draws the same region into Canvas, captures the stream as WebM, and patches a finite Matroska Duration into the container using timestamp-scale ticks.
  5. Download the resulting WebM, then fully review it in your destination player before deleting the original. Confirm duration, the cropped region, audio behavior, and compatibility.

Because processing matches playback speed, a one-minute source takes about one minute to crop. Closing the tab, switching focus aggressively, or letting the device sleep can interrupt the recording, so plan to leave the tab active and visible until the download appears.

Rules Every X, Y, Width, and Height Value Must Follow

The Video Cropper validates the four numbers as a single rectangle. If any rule fails, the tool rejects the rectangle and does not shift, clip, round, or produce a partial file. The rules come directly from the product contract:

  • Every value is parsed as an untrimmed whole pixel count. Decimals, letters, or stray spaces fail validation.
  • X and Y must be nonnegative. There is no off-frame direction because the rectangle must sit inside the source.
  • Width and height must each be at least 2 pixels. A one-pixel strip is too narrow to record a useful region.
  • X + width must be less than or equal to the source width. Y + height must be less than or equal to the source height. The rectangle must stay entirely inside every decoded frame.
  • The output rectangle may not exceed 3840 × 2160 pixels of area, even when the source itself is larger.
  • The source shares the explicit video safety budget: a positive file up to 500 MiB, decoded duration above zero and no more than five minutes, no source side above 4096 pixels, and no source area above 3840 × 2160. An accepted file extension does not guarantee codec support; decoding depends on what the current browser can play.

Invalid rectangles return an error without producing a WebM, so a failed input never overwrites your original. Object URLs, timers, recorder tracks, and playback are stopped or released on replacement, error, stale completion, or unmount, which keeps the tab clean between attempts.

What X and Y Don't Do

X and Y describe one fixed rectangle that applies to every frame of the source. They do not create a moving crop, a tracking region, or a per-frame adjustment. If you need the rectangle to follow a subject, change size, or animate, the Video Cropper is not the right tool. The cropper also is not a trim-by-time, resize, compress-only, redact, blur, or object-removal operation. It changes the visible frame region; it does not edit the timeline.

Coordinates start at the top-left corner of the source frame and are written into source pixels, not target pixels or screen pixels. If the source is 3840 × 2160 and you want a 1920 × 1080 output, you enter source pixels directly: X = 960, Y = 540, width = 1920, height = 1080 places the rectangle in the middle of the frame at native source resolution.

Subtitles, chapters, attachments, rotation tags, HDR signaling, color metadata, and other container features are not preserved. Audio is included only when the browser exposes a capturable track through media capture, which varies by browser and source, and the source may play audibly during real-time processing. Verify both the picture and the sound in the downloaded WebM before deleting the original.

ScenarioWhat X and Y meanWhat happens
Source is 1920 × 1080, you enter X = 100, Y = 50, width = 800, height = 600Top-left corner of the rectangle sits 100 px right and 50 px down from the frame's top-leftValid: rectangle ends at 900 × 650, inside the source
Source is 1920 × 1080, you enter X = 1500, Y = 0, width = 600, height = 400Top-left of the rectangle starts 1500 px inInvalid: X + width = 2100 exceeds source width 1920
Source is 1280 × 720, you enter width = 1, height = 1Single-pixel rectangleInvalid: width and height must each be at least 2
Source is 3840 × 2160, you enter width = 3840, height = 2160, X = 0, Y = 0Full-frame rectangle at maximum output areaValid: rectangle matches the source at the 3840 × 2160 output ceiling
Source is 1920 × 1080, you enter X = -10Off-frame starting pointInvalid: X must be nonnegative

Common mistakes, such as swapping width and height or using target size instead of source size, can wreck an export. The common mistakes guide walks through those traps with concrete examples.

Why Pixel-Exact Coordinates Matter

Pixel-exact input is the point of using X and Y instead of dragging a visual selection box. Visual selection tools often snap to grid lines, scale to fit the viewport, or report coordinates in screen pixels rather than source pixels. The Video Cropper skips all of that: it asks for source pixels directly, validates them against the decoded frame dimensions, and applies the same rectangle to every frame without rounding. This matters when a platform requires a known frame size (for example, a 1080 × 1920 vertical export), when unwanted edges are static throughout a clip, or when you need to reproduce the same crop on a second source that shares dimensions. Enter the same four numbers and the WebM will look the same, which is the core promise of a coordinate-driven cropper.

Related reading: What the 500 MiB Limit Means in Video Compression.