Video tools

Resize / crop video

Resize and/or crop a video, in the browser only, like video-convert (src/tools/video-convert.ts), because mediabunny decodes and re-encodes through WebCodecs, which Node has no equivalent of. Always outputs MP4. Nothing is uploaded.

Runs on your device. The file is never uploaded.

Resize / crop video rescales or crops a clip and writes MP4 with a -resized.mp4 ending. Set width or height alone and the other follows the source aspect; set both and the fit option decides, contain by default. Leaving every field blank is refused, and re-encoding needs WebCodecs, which Node lacks, so this one works on the page only.

Input

Options

Questions

Does resizing re-encode the video?

Yes. Changing the picture size means decoding every frame, scaling or cropping it and encoding it again, all through WebCodecs. That costs one generation of quality and takes real time on long files. There is no way to resize without re-encoding, which is why this tool is browser only while Trim, Merge and Rotate are not.

How do the width, height and fit options work together?

Set width alone or height alone and the other dimension follows the source aspect ratio. Set both and the fit option decides the rest: contain (the default) fits inside the box, cover fills it, fill stretches. Every value is in pixels and must be a positive number. Leave both blank and only the crop region is applied.

How do I crop a region?

Fill in cropWidth and cropHeight, plus cropX and cropY for the left and top offsets, which default to 0. cropWidth and cropHeight must be set together, and the tool says "cropWidth and cropHeight must be set together" if only one is filled in. You can crop and resize in the same run: the crop is applied first, then the target size.

Why did it say there is nothing to resize or crop?

Because you left every field blank. The tool refuses with "specify at least a width, a height, or a crop region" rather than spending minutes re-encoding a file into an identical copy. Fill in at least one of width, height, or a crop region and run it again.

What format do I get out?

Always MP4. The output format is fixed, so a WebM or MOV input comes back as MP4, named after your input with -resized.mp4 on the end. Both a resize and a crop produce that same single file. Because the frames are re-encoded, the video codec is whatever your browser can encode into MP4, not necessarily the one the source used.

Why does the command line refuse it?

Because it decodes and re-encodes through WebCodecs, which Node has no equivalent of. The CLI and MCP surfaces stop it up front with "video-resize-crop needs a browser (OffscreenCanvas). Use it at /video/video-resize-crop instead." On that page the work happens in a Web Worker in your tab, and the file is never uploaded.

Related Video tools

n→nConvert videoChange videos between MP4 and WebM, in the browser only. It encodes with WebCodecs, which Node has no equivalent of, so the CLI and MCP surfaces refuse it.Runs on each file you dropn→nCompress videoShrink a video by re-encoding it at a lower quality, in the browser only, like video-convert (src/tools/video-convert.ts), because mediabunny encodes through WebCodecs, which Node has no equivalent of. Always outputs MP4.Runs on each file you dropn→nTrim / cut videoCut a video down to a start-to-end range without decoding a single frame. Packets are copied straight from the source into a new MP4, so this runs in Node, the CLI and MCP as well as the browser. The cut snaps back to the nearest keyframe before the start you asked for, the same trade-off ffmpeg -c copy makes.Runs on each file you dropn→1Merge videosConcatenate two or more videos, one after another, into a single MP4. A packet-level copy with no decoding, so this runs in Node, the CLI and MCP as well. Every input must share the same video codec (and audio codec, if present); mixed-codec inputs need re-encoding first, which this tool deliberately does not do.Combines the files you dropn→nRotate videoRotate a video by a multiple of 90° by writing rotation metadata into the container, the same trick phones use for orientation, rather than re-encoding every frame. A packet-level copy, no decoding, so this runs in Node, the CLI and MCP as well as the browser. Most players honour this metadata; a player that ignores it will show the original orientation.Runs on each file you dropn→nChange video speedSpeed a video up or down by rescaling the timestamp on every packet. A packet-level copy, no decoding, so this runs in Node, the CLI and MCP as well as the browser. Audio speeds up with the video and its pitch shifts along with it, the same trade-off most simple speed-change tools make; correcting pitch back to normal needs decoding and resampling the audio, which this tool deliberately does not do.Runs on each file you drop