Tested how-to

How to cut a video without losing quality (and where the cut really starts)

Updated Tested October 31, 2026One H.264 MP4 clipffmpeg 6.1.1

Glowing scissors cutting a video timeline comparing a ragged mismatched frame edge to a clean exact cut at a keyframe.

Short answer

To cut a clip with no quality loss, copy the streams instead of re-encoding them: ffmpeg -ss START -i in.mp4 -t LENGTH -c copy out.mp4, with -ss placed before -i. In our test this kept 300 of 300 requested pictures bit-identical to the source and took 0.1 seconds. The catch is the start: a copy can only begin cleanly at a keyframe, so our file stored about 5 seconds of hidden lead-in, which some players show. With -ss after -i the picture started 3.3 seconds late. A re-encode starts on the exact frame, but it is lossy: SSIM 0.987 at CRF 23 and 0.995 at CRF 18.

Trim a video (free, in your browser; re-encodes once, exact start)

Key takeaways

  • Stream copy (-c copy) does not decode or re-encode the pictures. In our test the cut with -ss before -i matched the source frame by frame for all 300 requested pictures (our test, one clip).
  • The cut still began at the asked time because the MP4 stores an edit list that hides the lead-in. The file holds about 5.000 seconds of pictures before the first one you see, from the keyframe at 5.833 s to the asked start at 10.833 s, so a player or tool that ignores the edit list shows them.
  • With -ss after -i and -c copy, the first picture was the keyframe at 14.167 s, 3.334 s after the asked time, while the audio began at 0.004 s. Put -ss first.
  • A re-encode is frame-accurate but not lossless: SSIM 0.9867 at CRF 23 (2,040,014 bytes) and 0.9953 at CRF 18 (3,637,995 bytes). The copy was 2,834,283 bytes, 38.9% larger than the CRF 23 file.
  • The Koldflux Trim a video tool re-encodes once: its file scored SSIM 0.9866 and was 2,047,391 bytes, the same as our CRF 23 cut. It took 36.9 seconds for 10 seconds of video in headless Chromium. It is not lossless.
  • We tested one H.264 High clip with B-frames in MP4, with ffmpeg 6.1.1, Chromium 153 and Firefox 155. Phones, editors, QuickTime, VLC, other codecs and platform re-processing were not tested.

What is the command that cuts a video without re-encoding?

Find the keyframes first, then cut with the stream copy. A keyframe is a picture that can be decoded on its own; every other picture depends on pictures around it. A copy can only start cleanly on a keyframe, so you want to know where they are.

Put -ss before -i. The ffmpeg documentation says that used as an input option, -ss "seeks in this input file to position" and that "ffmpeg will seek to the closest seek point before position". For a stream copy the same page says the extra segment between that seek point and your position "will be preserved". That preserved segment is the hidden lead-in we measured below.

Source: our run on October 31, 2026 (public/hub-media/cut-video-without-losing-quality/test-results.txt) and the ffmpeg documentation, read October 31, 2026.

# 1. list keyframe times (seconds) of the first video stream
ffprobe -v error -select_streams v:0 -skip_frame nokey -show_entries frame=pts_time -of csv=p=0 in.mp4

# 2. cut 10 seconds starting at 10.833 s, no re-encode (-ss BEFORE -i)
ffmpeg -ss 10.833 -i in.mp4 -t 10 -c copy out.mp4
Step 1 lists keyframes. Step 2 is the lossless cut we tested as method A.

What did each way of cutting do to the same clip?

We cut 10 seconds starting at 10.833 s out of a 40 second 1080p H.264 clip. That start lies inside an 8.334 second gap between two keyframes (5.833 s and 14.167 s), which is the hard case for a copy. Method E is a control that asks for the keyframe time itself.

Same 10 second cut, five ways, plus the Koldflux tool
MethodSizePictures shownFirst picture (asked 10.833 s)Match with the sourceTime
A copy, -ss before -i2,834,283 bytes302 (300 asked)10.833 s300 of 302 identical0.1 s
B copy, -ss after -i1,923,547 bytes20214.167 s (3.334 s late)200 of 202 identical0.1 s
C re-encode, CRF 232,040,014 bytes300exact frameSSIM 0.9867, 39.6 dB2.0 s
D re-encode, CRF 183,637,995 bytes300exact frameSSIM 0.9953, 40.9 dB4.0 s
F Koldflux Trim tool2,047,391 bytes300exact frameSSIM 0.9866, 39.6 dB36.9 s
E control: copy at the keyframe time 5.833 s2,455,003 bytes3025.833 s300 of 302 identical0.1 s

Source: our measurement on October 31, 2026 with ffmpeg 6.1.1 on a Linux server (script cut_test.py, log test-results.txt). Clip: 40 second excerpt of Big Buck Bunny 1080p 30 fps (Blender Foundation, CC BY 3.0), H.264 High, with the audio re-encoded to AAC 128k. SSIM is reported only for re-encodes; for copies we compared decoded pictures one by one. Controls: the input against itself gave SSIM 1.000000, and a reference shifted by one frame dropped it to 0.986105, so the SSIM values above are aligned (one frame earlier or later gave 0.971 for C). Times are one run each.

Limits: one clip, one start point, one run per method. The two extra pictures at the end of the copies (302 and 202 shown) differ from the source; we did not find out why. The re-encodes use libx264 with the veryfast preset (C) and medium (D), and the tool uses its own settings.

Timeline of the source clip with keyframes at 5.833 and 14.167 s and where each cut method starts its first picture
Where each cut starts inside the gap between two keyframes.

Why does the stream copy start where it does?

Most pictures in an H.264 file are stored as differences from other pictures. To show the one at 10.833 s a player needs the keyframe before it, here at 5.833 s. A stream copy cannot rewrite pictures, so it must keep everything from that keyframe on.

In method A, ffmpeg kept the pictures from 5.833 s and wrote an MP4 edit list that tells players to start showing at 10.833 s. We confirmed it two ways. With the edit list honored, the first picture was source time 10.833 s. With the edit list ignored (-ignore_editlist 1) the first picture was source time 5.833 s, which is 5.000 s earlier (10.833 minus 5.833). The file stores 452 video packets for 302 pictures shown, so the extra packets are the hidden lead-in.

In method B, -ss after -i puts the cut after the decoder, and with -c copy the video started at the next keyframe: ffprobe gave a video start of 3.333 s and the first picture matched source time 14.167 s, while the audio started at 0.004 s. In a player the sound begins 3.3 seconds before the picture. The FFmpeg wiki describes -ss as frame-accurate as an input option only "when transcoding", not when stream copying.

What players showed as the first picture
FileChromium 153Firefox 155
A copy, -ss before -isource 10.833 ssource 10.833 s
B copy, -ss after -isource 14.167 ssource 14.167 s
C re-encode, CRF 23source 10.833 ssource 10.833 s
F Koldflux Trim toolsource 10.833 ssource 10.833 s

Asked 10.833 s.

Source: our test of October 31, 2026 (browser_check.cjs, browser-results.txt): the first picture of each file was matched to reference frames at 5.833, 10.833 and 14.167 s; the nearest one is shown. Both browsers honored the edit list. We did not test QuickTime, VLC, phone galleries, editors or upload sites, and a player or tool that ignores edit lists would show the hidden lead-in of method A.

When should you re-encode instead?

Re-encode when the start must fall on an exact frame in every player, when the file goes into a tool you have not tested for edit lists, or when you also need to shrink it. The copy in our test was 38.9% larger than the CRF 23 re-encode (2,834,283 against 2,040,014 bytes, 28.0% smaller the other way), because it carries the hidden lead-in.

The price of a re-encode is generation loss. At CRF 23 the cut scored SSIM 0.9867 against the source and at CRF 18 it scored 0.9953, with 1.783 times the size of the CRF 23 file. SSIM 1.000 would mean identical pictures. A lower CRF keeps more detail and makes a bigger file. Re-encode once, from your original, and do not stack re-encodes.

Which cut to use
SituationUseWhy (from our test)
You need no quality change and you will play or edit the file in a tool that honors the MP4 edit listStream copy, -ss before -iPictures identical; first picture on time in Chromium and Firefox
The cut must start on an exact frame in any playerRe-encode (CRF 18 to 23)No hidden lead-in; 300 pictures, exact start
You also want a smaller fileRe-encodeCRF 23 was 28.0% smaller than the copy
You cut at a keyframe timeStream copyControl E started at 5.833 s as asked
# frame-accurate cut, one re-encode (our methods C and D used CRF 23 and 18)
ffmpeg -ss 10.833 -i in.mp4 -t 10 -c:v libx264 -crf 18 -preset medium -c:a aac -b:a 128k out.mp4
Re-encode at CRF 18. Lower CRF means higher quality and a bigger file.

What does the Koldflux Trim tool do?

We ran the live Trim a video tool in headless Chromium with the same range (10.833 s to 20.833 s). It returned in-out.mp4 after 36.9 seconds, with 300 pictures, an exact start and SSIM 0.9866 against the source. Its file was 2,047,391 bytes, 1.0036 times our CRF 23 file.

So it behaves like a single re-encode, not like a stream copy: the cut is exact and the file is not lossless. Its page says the size limit depends on browser memory. For a lossless cut use the ffmpeg command above.

Source: our run on October 31, 2026 (tool_run.cjs, tool-run-log.txt). The 36.9 seconds is from upload to download link for a 40 second 1080p input on our server.

How do you check your own cut?

Ask ffprobe for the start time of each stream and for the number of packets and pictures. A large video start time with a small audio one, as in method B, means the picture is late. More packets than pictures, as in method A, means hidden lead-in. Then open the file in the player or editor you will actually use.

ffprobe -v error -show_entries stream=codec_type,start_time,duration,nb_read_packets -count_packets -of csv=p=0 out.mp4
# does the first picture change if the edit list is ignored?
ffmpeg -ignore_editlist 1 -i out.mp4 -frames:v 1 first.png
Compare start times; compare first.png with a normal export of the first frame.

What are the limits of this test?

One clip: H.264 High with B-frames in an MP4, a cartoon with scene changes. Other containers (MOV, MKV), other codecs (HEVC, VP9), screen recordings, phone and camera files and variable frame rate were not tested. We did not test QuickTime, VLC, Premiere, iPhone Photos or any editor, and we did not upload the files to any platform, so we do not know what a platform does to a copy. Keyframe spacing differs between files; your gap may be shorter or longer than 8.334 seconds.

Do it in your browser

Free Koldflux tool, no account needed.

Trim a video (free, in your browser; re-encodes once, exact start)

Questions people ask

Does ffmpeg -c copy lose quality?

In our test the decoded pictures of the cut matched the source for all 300 requested pictures, so nothing was lost. The two extra pictures at the end differed, and the start depends on keyframes. See the table above.

Why does my cut start a few seconds late or early?

A copy can only start on a keyframe. With -ss after -i our video started 3.334 s late while the audio did not. With -ss before -i the start was exact in Chromium and Firefox, thanks to an edit list that hides about 5 seconds of lead-in.

Should I put -ss before or after -i?

Before -i for a stream copy: in our test that was the only placement that started on time. The FFmpeg wiki says -ss as an input option is also frame-accurate when transcoding; we tested the re-encodes with -ss before -i only.

Is the Koldflux Trim tool lossless?

No. It re-encoded our clip once and scored SSIM 0.9866, like our CRF 23 cut. It cuts on the exact frame.

How do I find keyframes?

Run ffprobe with -skip_frame nokey and -show_entries frame=pts_time as in the first code block. Our clip had keyframes at 2.733, 4.167, 5.833, 14.167, 18.333 and 26.667 s among others.

Related

More guides on this topic

Sources and how we checked

  1. Koldflux test log: five cuts, controls, tool run (our measurement, October 31, 2026) (checked 2026-10-31)
  2. Koldflux browser check: first picture shown in Chromium 153 and Firefox 155 (October 31, 2026) (checked 2026-10-31)
  3. Koldflux derived numbers with a control (October 31, 2026) (checked 2026-10-31)
  4. FFmpeg documentation: ffmpeg, the -ss option (official, read October 31, 2026) (checked 2026-10-31)
  5. FFmpeg wiki: Seeking (read October 31, 2026) (checked 2026-10-31)
  6. Blender Foundation: Big Buck Bunny, CC BY 3.0 (source of the test clip) (checked 2026-10-31)

We cut a 40 second H.264 MP4 excerpt of Big Buck Bunny (1080p, 30 fps, CC BY 3.0) five ways with ffmpeg 6.1.1 and ran the live Koldflux Trim tool in headless Chromium. We measured size, packets, pictures shown and stream start times with ffprobe, compared decoded pictures one by one for copies, and measured SSIM and PSNR for re-encodes with a one-frame alignment check. Controls: a cut at the keyframe time, the input against itself and a one-frame shift. We checked the first picture in Chromium 153 and Firefox 155. Every derived number comes from derived.py with a known control. We read the ffmpeg documentation and the FFmpeg wiki on October 31, 2026 and matched each quoted phrase to the page text with a script. One clip, one run per method.