How to trim a video without re-encoding

To cut a video without losing quality, copy the video and sound data into a new file instead of re-encoding them. It is near-instant, but the clip can only start on a keyframe. Our trim tool does this in Fast mode and shows the real start time; use Exact mode when the clip must start on a specific frame.

Trim video

Copying versus re-encoding

A video file stores compressed frames. Most frames only describe what changed since the frames around them; every so often there is a keyframe, a complete picture that decoding can start from.

  • Copying (also called remuxing or stream copy) takes the compressed frames between two points and writes them into a new file. Nothing is decoded, so the picture is exactly the same as before, and even a short clip from a 2 GB file is done in under a second.
  • Re-encoding decodes every frame and compresses it again. It can start on any frame, but it takes much longer and always loses a little detail.

Because a copied clip must begin with a keyframe, a lossless cut moves your start time back to the nearest keyframe before it. The end can be cut almost anywhere.

Trim a video in Fast mode

  1. Open Trim video and select Choose video. The file stays on your computer.
  2. Set the clip with the two handles or type the times in Start and End.
  3. Keep Fast (no re-encoding) and select Trim video.
  4. If your start time is not on a keyframe, the page says where the clip really starts. Download the clip.

In this test, a 10-second 1080p clip with a keyframe every 2 seconds was trimmed from 0:03.5 to 0:07.2. The clip starts at 0:02, the keyframe before 0:03.5, and the page says so:

Trim video in Fast mode: the clip starts at 0:02, the nearest keyframe, with a note to use Exact for 0:03.5

When you need a frame-exact cut

Choose Exact (re-encodes the video) when the extra seconds at the start matter, for example when a clip must begin right on a word or a cut in the music. Exact mode starts on the frame you pick and ends within one frame of your end time.

It costs time and a little quality, so a common trick is to cut in Fast mode with a margin and trim the rest in the editor you use next. If you will compress the clip afterwards, for example to send it on Discord, cut it in Fast mode first: the video compressor re-encodes it anyway, and each re-encode loses a little detail.

Cutting a video into several parts

The same rules apply when you cut a video into pieces. Split video in Fast mode moves each cut to a keyframe and lists the real times of every part. Played one after another, the parts are exactly the original video, with no frame lost or repeated.

Questions

Is trimming without re-encoding really lossless?

Yes for the part you keep. The compressed video data is copied byte for byte, so every frame decodes exactly as in the original. In our test, the packets of the clip were identical to the same stretch of the source file.

What is a keyframe?

A frame stored as a complete picture. The frames between keyframes only store changes from the frames around them, so a player has to start decoding at a keyframe.

How far apart are keyframes?

It depends on the camera or app that made the video. Often 1 to 10 seconds, though some apps put them much further apart. Our test clip has one every 2 seconds.

Why is a frame-exact cut slower?

The tool has to decode the clip and encode it again so that the first frame becomes a keyframe. That takes time and changes the picture slightly, like any export from a video editor.

Files never leave your browser.