Zurück zum Blog
tutorial 2026-06-14

Trim Videos Online Without Re-Encoding (Lossless, 2026)

Trim Videos Online Without Re-Encoding (Lossless)

You filmed an hour-long lecture and need just the 5-minute segment where the speaker addressed your question. Or you recorded a Zoom call and want to clip the demo without the 20 minutes of "can you hear me?" intro. Every desktop video editor — iMovie, Premiere, DaVinci Resolve — happily does this, but each requires installation, re-encoding (which both takes ages and loses quality), and at least a $0-99 price tag depending on which feature you actually need.

This guide explains how lossless video trimming actually works under the hood, why it's so much faster than what most online "video editors" do, and how to do it in your browser using Ai2Done's Trim Video tool — without uploading personal footage to a stranger.

TL;DR

  • Lossless trimming cuts a video without re-encoding — output quality is byte-identical to the source.
  • It's roughly 100× faster than re-encoding because the CPU just copies existing frames instead of decoding + re-encoding each one.
  • Use Ai2Done Trim Video for browser-side lossless trimming with frame-accurate scrubbing.
  • Trade-off: lossless cuts can only happen on "keyframe boundaries" (typically every 2-10 seconds). For frame-perfect cuts, you must re-encode (which the tool also supports as an option).
  • Privacy: cuts run entirely in your browser; the source video never uploads.

Why this is harder than it looks

You'd think "cut this video from 3:24 to 8:17" would be trivial — just snip the file at those byte offsets. The reality is that modern video files are highly inter-frame compressed: most frames are stored not as full images but as diffs from a nearby reference frame (a "keyframe" or I-frame).

The structure looks roughly like:

[Keyframe]  [P-diff]  [P-diff]  [B-diff]  [P-diff]  [Keyframe]  [P-diff]  ...
   ↑                                                    ↑
   2 second mark                                        4 second mark

If you naively chop the file at 3:24, you land in the middle of a sequence of diff frames that reference a keyframe that's no longer in the file. The playback breaks — you see the last keyframe smeared and stuttering until the next one arrives.

Lossless trimming solves this by snapping your cut points to the nearest keyframe. The output is technically slightly different from your requested timestamps (maybe 3:23.4 instead of 3:24.0), but it plays correctly everywhere, takes a few seconds, and loses zero quality.

Frame-accurate trimming does what you literally asked for — cuts exactly at 3:24.0 — but requires decoding every frame from the previous keyframe forward, re-encoding them to construct a new keyframe at exactly 3:24, then continuing with the rest of the segment. This takes ~5-10× the duration of the source clip to process and applies one round of lossy re-encoding.

For 90% of trimming use cases, you don't actually need frame-perfect accuracy — being off by a fraction of a second from your scrub point is invisible to viewers. Lossless is the right default.

Method 1: Ai2Done Trim Video (browser-side lossless)

The Ai2Done Trim Video tool runs entirely in your browser using FFmpeg.wasm:

  1. Open /tools/trim_video in any modern browser.
  2. Drop your MP4, MOV, MKV, or WebM into the upload area.
  3. The timeline appears with a video preview, scrubbing bar, and two draggable handles (in and out points).
  4. Drag the handles to set your in/out points. The preview snaps to actual frames at typical playback resolution.
  5. Pick "Lossless" (fast, snaps to keyframes) or "Frame Accurate" (slower, re-encodes the affected segment).
  6. Click Trim — lossless trims complete in 2-10 seconds regardless of source length; frame-accurate takes longer.
  7. Download the result. Original file format and codec are preserved.

The whole thing runs in your browser tab. Even a 4 GB raw camera dump never leaves your device — useful for confidential meeting recordings, family videos, and anything you wouldn't email to a marketing-funded SaaS.

Pro tip: if you're trimming several clips from the same long source video, use the tool's "Add cut" → "Add cut" → "Export all" flow. Each cut is processed independently and you get a ZIP with all the clips. Much faster than running the trimmer once per cut.

Method 2: FFmpeg command line (for the terminal-comfortable)

If you already have FFmpeg installed:

# Lossless trim (fastest, snaps to keyframes)
ffmpeg -ss 00:03:24 -to 00:08:17 -i input.mp4 -c copy output.mp4

# Frame-accurate trim (slower, one re-encode pass)
ffmpeg -i input.mp4 -ss 00:03:24 -to 00:08:17 -c:v libx264 -crf 18 -c:a aac output.mp4

The first command is exactly what every "lossless trim" tool does under the hood. Note the order matters — -ss before -i makes it seek by keyframe (fast and lossless); -ss after -i makes it decode every frame from the start (slower but frame-accurate).

This is the right answer for batch scripting or when you have FFmpeg open already. It's overkill for "I just need to clip 5 minutes out of this Zoom recording."

Method 3: QuickTime Player (macOS, the one-click option)

For Mac users with a single quick cut, QuickTime Player has the simplest possible workflow:

  1. Open the video in QuickTime Player.
  2. Edit → Trim (or press ⌘ T).
  3. Drag the yellow handles to set in/out points.
  4. Click Trim.
  5. File → Export As → 1080p (or whatever resolution).

QuickTime's trim is lossless when the source is compatible with QuickTime's native trim (H.264 in a MOV container is the happy path). It re-encodes for other formats. There's no batch support, no multiple-cut workflow, and no fine-grained quality control — but for one quick cut on a Mac, it's the path of least resistance.

How we built the browser trimmer (technical deep-dive)

The Ai2Done Trim Video tool is built on:

  • FFmpeg.wasm 0.12 for the actual trimming. The lossless path uses -c copy to avoid any re-encoding; the frame-accurate path uses libx264 at CRF 18 for the re-encoded segment.
  • MP4Box.js for parsing the source file's metadata before the trim. This is what lets us show "the nearest keyframes to your scrub point are at 3:23.4 and 3:25.1" — we know where every keyframe is without decoding the file.
  • HTML5 <video> element for the preview. We use currentTime for fast scrubbing; for very fine scrubbing on H.265 (HEVC) files where the browser might lack a decoder, we fall back to extracting one frame at a time via FFmpeg.wasm.
  • In-memory virtual filesystem. The browser can't write to your filesystem, so the upload goes into FFmpeg.wasm's in-memory FS, gets trimmed there, and streams back as a Blob for download.
  • SharedArrayBuffer + Cross-Origin Isolation for the multi-threaded FFmpeg build (~3× faster than single-threaded).

The interesting design choice: we deliberately default to "lossless" instead of "frame accurate." Users who want frame accuracy can opt in, but the default behavior is the one that's faster, smaller, and indistinguishable in 90%+ of real use cases.

Why browser-side instead of a backend? Two reasons. Privacy — Zoom meetings, family videos, confidential interviews, and creator material shouldn't need to traverse a third-party server for what's literally a file copy with adjusted byte boundaries. Scalability — every user's CPU does their own trim, so we don't pay for backend compute and you never share a slow worker with 1000 other concurrent users.

FAQ

Q: What's the difference between lossless and frame-accurate trimming? A: Lossless trim snaps your in/out points to the nearest keyframe in the source video (usually within ~2 seconds). It's instant (no re-encoding) and produces byte-identical quality. Frame-accurate trim cuts at the exact requested timestamp by re-encoding the affected segment — slower (~5-10× the clip duration) and one round of lossy compression. For most use cases, lossless is the right default.

Q: My trim came out a few hundred milliseconds off. Why? A: You used the lossless option, and the requested timestamp didn't land exactly on a keyframe. The tool snapped to the nearest keyframe — that's the trade-off for instant, lossless trimming. If you need exactly the requested timestamp, switch to frame-accurate mode.

Q: Will the trimmed file still play in QuickTime / VLC / Premiere / my CMS? A: Yes. The output is a properly-formed MP4 (or whatever container the source was). All standard players, editors, and platforms accept it.

Q: Can I trim the audio independently of the video? A: Not in the same tool — for audio-only edits, extract the audio first with the Extract Audio tool, then trim the audio separately, then re-mux. This is a workflow we're considering combining; let us know if you need it.

Q: My video is 8 GB. Can the browser handle it? A: For lossless trim (no re-encoding), yes — the operation streams through, peak RAM usage is roughly 200 MB regardless of source size. For frame-accurate trim, peak RAM scales with the length of the affected segment; you can comfortably do frame-accurate trims of 10+ minute segments on 2022+ hardware.

Q: Can I trim multiple segments from one video and concatenate them into one output? A: Yes — use Add cut → Add cut → Concat output. Each segment is trimmed losslessly (if they all start/end on keyframes) or re-encoded (if any frame-accurate cuts are involved), then joined into a single output file.

Try it now

Trim videos in seconds, without re-encoding, completely in your browser:

Open the Trim Video tool →

Drop a file, drag the handles, click Trim. No upload, no signup, no watermark.

Related reading


Last updated 2026-06-14. The Trim Video tool runs 100% in your browser — your videos never leave your device. We never collect, log, or analyse the files you process.