1. home
  2. tutorials
  3. trim-a-clip-without-re-encoding-ffmpeg-stream-copy-in-60-seconds
featured

Trim a clip without re-encoding: ffmpeg stream copy in 60 seconds

Hana Sato Tutorials 1 min read 9 comments 365 views

Re-encoding a video to trim it wastes time and quality. With stream copy, ffmpeg just rewrites the container, which takes a fraction of a second.

The command

ffmpeg -ss 10 -i trailer.mp4 -c copy trimmed.mp4 cuts from the nearest keyframe after ten seconds. Put -ss before -i for speed; after it for accuracy at the cost of a slower seek.

  • Stream copy cannot cut between keyframes.
  • Check keyframes with ffprobe -show_frames.
  • Use -avoid_negative_ts make_zero if players show a black first frame.

$ cat /comments 9

E
Elif Kaya Apr 7, 2026 · 8:22 PM

The benchmark table alone is worth the read.

L
Lucy Tran Apr 15, 2026 · 11:28 PM

I would love a follow-up on how this interacts with Time Machine.

H
Hana Sato author Jun 15, 2026 · 1:58 AM

Thanks! Good catch, I have updated the post.

J
Jonas Becker Jun 13, 2026 · 3:04 PM

Switched after reading this and my battery life noticeably improved.

K
Kenji Mori Jun 18, 2026 · 5:15 AM

Try clearing the cache first, that fixed it for me.

E
Elif Kaya Jul 27, 2026 · 8:03 AM

Try clearing the cache first, that fixed it for me.

G
Grace Kim Jul 3, 2026 · 4:57 AM

Clear, short, and no fluff. More of this please.

M
Marco Bellini Jul 4, 2026 · 4:34 AM

Saved this to my dotfiles notes. The tip at the end is gold.

S
Sofia Lind Aug 7, 2026 · 5:38 AM

Counterpoint: I have had the opposite experience on a Mac mini, but my workload is very different.

$ echo "leave a comment"