Lossless Video Trimming: Why Cuts Snap to Keyframes (and When to Re-encode)
Lossless video trimming copies streams instead of re-encoding, so the cut must start on a keyframe. Why, what it costs, and when re-encoding is right.
On this page
Lossless video trimming means copying the compressed video and audio into a new file instead of decoding and encoding them again, so the picture is exactly the same as the source. The catch is that a copied cut can only begin cleanly on a keyframe (an I-frame), so the clip usually starts a little before the point you marked. If you need the first frame to be exact, you have to re-encode at least the start of the clip.
This guide explains why that happens, what each choice costs, and how to pick. The measured numbers come from the FFmpeg tests in our FFmpeg trim guide and the HLS tests on our HLS recorder page, run on an Apple M4 Mac in October 2026. Codec facts are linked to their specifications. This guide is the “why”. For commands, see the FFmpeg guide; for a graphical app, see LosslessCut on Mac.
Key takeaways:
- Stream copy keeps the source bit for bit. In our FFmpeg test, a copied 20-second cut took 0.02 s; re-encoding the same cut took 1.2 s and added a second round of lossy compression.
- A copied cut starts on a keyframe. Asking for 1:01 when the nearest earlier keyframe was 1:00 produced a file that carries the extra second.
- The overshoot is at most one keyframe interval. Apple’s HLS spec asks for a keyframe every 2 seconds; on our HLS test stream a 15-second range came out at 15.12 s.
- Whether you see the extra lead-in depends on the player. An MP4 can hide it with an edit list; an MKV or TS file plays it.
- Re-encode only when the first frame must be exact or you need a filter (crop, scale). You can still copy the audio.
What lossless trimming is
Lossless trimming (also called stream-copy trimming, a “keyframe cut” or a “smart cut” when only the start is re-encoded) takes the compressed packets for the range you want and writes them into a new container. Nothing is decoded, so nothing is lost. FFmpeg’s documentation puts it plainly: stream copy has no decoding or encoding, so it is very fast and there is no quality loss.
The opposite is a re-encode: decode the frames to pictures, cut at any frame you like, then compress them again. That gives exact cuts, at the cost of time and a second generation of lossy compression.
Why video has keyframes at all
Raw video is huge. One 1920×1080 frame in 8-bit RGB is 1920 × 1080 × 3 = 6.2 MB, so 60 frames a second would be about 373 MB every second. Codecs such as H.264 and HEVC get that down to a few megabits a second with two tricks:
- Within a frame, they compress the picture much like a JPEG.
- Between frames, they store only what changed since another frame.
The frames are arranged in a repeating group of pictures (GOP):
[ I ] → [ B ] → [ B ] → [ P ] → [ B ] → [ B ] → [ P ] → … → [ I ]
full needs needs needs next
frame I and P I and P the I full frame
I-frames, P-frames and B-frames
| Frame | What it holds | Can it be shown on its own? |
|---|---|---|
| I-frame (keyframe) | A complete picture | Yes |
| P-frame | Changes since an earlier frame | No, it needs that frame |
| B-frame | Changes relative to frames before and after it | No, it needs both |
How often keyframes appear is up to the encoder. For streaming, Apple’s HLS authoring specification says each segment must start with one and that they should come every 2 seconds. Files from cameras, screen recorders and editors can space them much further apart, so check yours (see below).
Why a copied cut can’t start anywhere
Say you mark the start on a P-frame. Copying from that frame gives the player a list of changes with no picture to apply them to. Depending on the player, you’d see a frozen or garbled picture until the next keyframe, or the audio starting before the video.
So stream-copy tools start from the keyframe before your mark instead. There are two ways to handle the extra frames:
- Hide them. FFmpeg writes them into the MP4 and adds an edit list telling players to skip them. In our test, Apple’s AVFoundation honoured it and showed 1:01.000, exactly as requested.
- Play them. MKV and MPEG-TS can’t mark frames as hidden. The same cut written as MKV started at 1:00.000 and ran 21.2 s instead of 20.
Note: “the clip starts early” isn’t a bug in your tool. It’s the cost of not re-encoding. The FFmpeg guide has the full table of what each container did.
What re-encoding costs
Re-encoding lets you cut on any frame. It also costs you three things:
- Quality. The source was already lossy. Compressing it again throws away more detail, which shows first in dark gradients, fine text and film grain. A high-quality setting (for example
-crf 18in FFmpeg) makes the loss hard to see, not zero. - Time. In our test, a 20-second re-encode took 1.2 s of wall time and about 9.5 s of CPU time, against 0.02 s for the copy. That gap grows with resolution and length.
- Size and settings. The re-encoded clip was 9.4 MB against 7.7 MB for the copy, and it no longer has the source’s exact codec settings.
Keyframe cut vs re-encode: which to use
| You need | Use | Why |
|---|---|---|
| B-roll, quotes, archive copies | Stream copy | Same quality as the source, near-instant |
| A clip that goes into an editor (Final Cut Pro, Resolve, Premiere) | Stream copy, trim the last frames in the editor | Avoids an extra generation before your final export |
| The first frame exact, for a finished deliverable | Re-encode | The only way to start on a non-keyframe |
| An exact start without re-encoding everything | Start on a keyframe | Pick the time from the keyframe list |
| A crop, scale or burned-in caption | Re-encode the video, copy the audio | Filters need decoded frames |
How to find your keyframes
FFmpeg’s ffprobe lists every keyframe time in a file:
ffprobe -v error -select_streams v -skip_frame nokey \
-show_entries frame=pts_time -of csv=p=0 input.mp4
Start a copied cut on one of those times and it begins exactly there. On our test file, a cut from a keyframe at 1:00 to 1:20 came out 20.083 s long, with no hidden lead-in.
How VidNeat handles it
VidNeat is our app; it trims from a link, not a local file. It cuts by stream copy, snaps the start back to the keyframe before your In point and says so in the trimming runbook. On a 60-second HLS test stream, a 0:20 to 0:35 range produced a 15.12-second file, and only 4 of the 10 segments were requested.
Limits, plainly: In and Out move in one-second steps, the start can land up to one keyframe interval early, and VidNeat doesn’t re-encode to make a cut frame-exact. It doesn’t open files already on your Mac, so for those use FFmpeg or LosslessCut. More on the controls: stream-copy trimming.
When a re-encode is still the right call
If the clip is the finished product, such as an ad, a social post that has to open on a specific frame, or anything with a crop or captions, re-encode it. A good encoder at a high-quality setting is fine for one generation. Stream copy earns its keep earlier in the chain, when you’re collecting material you’ll edit later.
Common questions
Does lossless trimming lose any quality?
No. The packets are copied unchanged, so the video and audio are identical to the source for the range you keep.
Why does my trimmed clip start earlier than I set?
The copied cut had to begin on the keyframe before your start point. The extra frames are either hidden by an MP4 edit list or played, depending on the container and the player.
What is a keyframe (I-frame)?
A frame stored as a complete picture. Every other frame in a group of pictures stores only changes, so decoding has to begin at a keyframe.
How far apart are keyframes?
It depends on the encoder. Apple’s HLS spec asks for one every 2 seconds for streaming; camera and screen recordings can be much further apart. Use the ffprobe command above to see yours.
Can I cut on an exact frame without re-encoding?
Only if that frame is a keyframe. Otherwise, re-encode, or use a tool that re-encodes just the first few frames and copies the rest.
Is a keyframe cut the same as a smart cut?
Not quite. A keyframe cut copies everything and starts on a keyframe. A smart cut re-encodes the frames from your exact start up to the next keyframe, then copies the rest, so only those first frames lose a generation.
Does trimming in QuickTime re-encode?
Apple doesn’t document how QuickTime’s Trim writes the file. Our QuickTime trim guide covers what Apple does and doesn’t say.
Summary
Lossless trimming copies streams, so it’s fast and keeps the original quality, but the clip starts on the keyframe at or before your mark. Use it for material you’ll edit or archive, and re-encode only when the first frame must be exact or you need a filter. For commands, see FFmpeg trim without re-encoding.
Related guides
How to Trim or Cut a Video with FFmpeg Without Re-encoding: Exact Commands, Tested
FFmpeg commands to trim a video from one time to another, cut out a middle section, or crop, without re-encoding where possible. Measured on a Mac.
LosslessCut on Mac: Which Version to Download, How Keyframe Cuts Work, and the Alternatives
LosslessCut on Mac: App Store vs GitHub, Apple silicon vs Intel, why cuts start at a keyframe, its documented limits, and alternatives.
How to Download Only Part of a Video on Mac (Without the Whole File)
Download only part of a long video on a Mac: set the start and end first, so only that range is fetched. How it works, measured savings and its limits.
How to Clip YouTube Videos on Mac: 3 Ways to Get a Link or an MP4 File
YouTube's Clip button only makes a link. Here's how to clip a YouTube video on a Mac as a link or as an MP4 file you can edit, and the limits of each method.
QuickTime Trim Greyed Out on Mac? What to Check and How to Work Around It
QuickTime Trim greyed out? Apple doesn't say why. See what Apple documents, what Apple Community users report, and workarounds that skip the file.
Stream-copy trimming
Trim to MP4 by copying streams instead of re-encoding, with cuts snapped to the nearest keyframe.
Get the clip you need. Not the entire video.
A native Mac downloader that fetches the range you mark and cuts by copying streams. Requires macOS 14.0 Sonoma or later.
VidNeat is a software tool. You are responsible for having the rights or permission to access, use, edit and export the media you work with.