How the Video Aspect Ratio Changer Works
AnyTool changes a video's aspect ratio entirely in the browser using a self-hosted single-threaded ffmpeg.wasm engine — the core (ffmpeg-core.js + the 32 MB wasm) is bundled from npm and served as a same-origin asset, so nothing is fetched from a CDN. Three modes drive the ffmpeg filter graph: Fit scales the clip to fit the target frame and pads the remainder — either a blurred scaled copy of the video (a split feeds a gblur, which is then composited under the clip with overlay) or a solid color via pad=color; Fill scales up and crops the overflow with the crop filter; Stretch simply scales to the exact target. Every output dimension is snapped to an even number (H.264 requires it) and re-encoded as H.264 video with AAC audio in an MP4. Single-threaded is deliberate: the multi-threaded core needs SharedArrayBuffer + cross-origin isolation (COOP/COEP), which would block cross-origin ad iframes, so it is avoided.
- Runs client-side — the video is never uploaded
- Self-hosted ffmpeg core (bundled) — no CDN
- Fit (pad), Fill (scale + crop), or Stretch modes
- Padding is a blurred scaled copy (split + gblur + overlay) or a solid color (pad=color)
- Even-dimension snap for H.264; H.264 + AAC MP4 output
- Single-threaded (keeps ads working); no backend, no cap
