Skip to the tool
CALCPARK

Video Trimmer

Cut a section out of an MP4, MOV or WebM in your browser: set start and end on a timeline or type exact times; keep the original quality or re-encode for an exact cut.

Files stay on your device
Loading the tool…

How to use it

  1. Drop a video or choose one. The preview shows its length; the first time, the FFmpeg engine (32 MB) is fetched in the background when you cut.
  2. Set the start and end with the two handles, type exact times (1:05.5) or play the video and use “Start at playhead”.
  3. Keep Fast for a lossless cut, or switch to Precise if the clip must begin on the exact frame.
  4. Press Cut video, check the preview and download the clip.

Example

A 4-minute 1080p phone recording (310 MB) trimmed to 1:20 – 1:50: in fast mode the clip is written in about two seconds, weighs 38 MB and, because the phone put a keyframe every 2 seconds, starts at 1:20 exactly or up to 2 s earlier. In precise mode the same 30-second range takes around 40–60 s on a laptop, starts on the exact frame and is re-encoded at CRF 23, typically 15–25 MB.

How the cut works

The tool runs FFmpeg compiled to WebAssembly (@ffmpeg/core0.12.6, single-threaded build) inside a Web Worker in your browser. The engine is fetched from the unpkg CDN on first use and then served from the browser cache; the video file itself is written into FFmpeg’s in-memory file system and never uploaded. Fast mode is a stream copy:

ffmpeg -ss START -i input.mp4 -t LENGTH -c copy -avoid_negative_ts make_zero -movflags +faststart output.mp4

-ss before -i seeks the input first (fast, no decoding), -t sets the clip length, and -c copy keeps the compressed frames untouched. Compressed video can only start on a keyframe (I-frame), so the copied clip begins at the last keyframe at or before the start time; the end is accurate to one frame. -avoid_negative_ts make_zero shifts timestamps so the first packets are not negative, which otherwise shows up as a frozen or black start in some players. Precise mode instead decodes from the keyframe, discards frames up to the start and re-encodes:

ffmpeg -ss START -i input.mp4 -t LENGTH -c:v libx264 -preset veryfast -crf 23 -pix_fmt yuv420p -c:a aac -b:a 160k output.mp4

Dimensions are rounded down to even numbers (required by 4:2:0 chroma). Re-encoding is CPU-bound and single-threaded here, so 1080p material typically runs at 0.5–1× real time. WebM sources (VP8/VP9 + Opus/Vorbis) cannot be stream-copied into MP4, so fast mode keeps them as WebM; precise mode always produces MP4. If a source codec cannot be copied into the target container, the tool reports it and suggests the precise method.

Sources: FFmpeg documentation – main options (-ss, -t, -c copy, -avoid_negative_ts), FFmpeg wiki – Seeking, ffmpeg.wasm documentation.

Questions

Why does my fast cut start a few seconds before the time I set?
Stream copy cannot split a video between keyframes, so FFmpeg starts at the last keyframe before your start time. Phones and screen recorders usually place a keyframe every 1–5 seconds; some streaming downloads only every 10 s. Use the precise method when the exact start matters.
Does trimming reduce the quality?
Not in fast mode – the frames are copied byte for byte. The precise method re-encodes the clip with libx264 at CRF 23, which is visually close to the source but is a second generation of compression; it also shrinks most phone recordings because their bitrate is higher than CRF 23 needs.
Is my video uploaded anywhere?
No. The only download is the FFmpeg engine itself (about 32 MB from the unpkg CDN, cached by your browser afterwards). The file is processed in your browser’s memory and the result is a local download link that disappears when you close the tab.
How large a video can I trim?
The WebAssembly engine can address at most 2 GB, and the input, the output and FFmpeg’s working buffers all share it. Files up to a few hundred MB are fine on a laptop; on a phone stay below about 300 MB. For long 4K recordings, trim on the computer with desktop FFmpeg or a video editor.