CommandFFmpeg

Trim a clip without re-encoding

Cuts a clip to a start time and duration by stream-copying instead of re-encoding, finishing almost instantly at the source's full quality.

Last updated

Commandffmpeg
ffmpeg -ss 00:00:30 -i input.mp4 -t 00:00:15 -c copy output.mp4

How it works

-ss 00:00:30 placed BEFORE -i tells ffmpeg to seek the input to that timestamp before decoding starts, which is fast because it skips straight there instead of decoding every frame from zero. -t 00:00:15 then sets how much to keep after that point — 15 seconds of output, starting at the 30-second mark. -c copy stream-copies both video and audio rather than re-encoding, which is what makes the whole operation finish in roughly the time it takes to read and write the bytes.

Because nothing is decoded and re-encoded, the trimmed output is bit-for-bit identical in quality to the source for the frames it keeps — there's no generational quality loss the way there would be with a re-encoded trim.

Watch out for

  • -c copy can only cut on keyframes, so with a fast-seeking -ss before -i, the actual start point may snap to the nearest keyframe rather than land on the exact frame requested — sometimes a second or so off. For frame-accurate trims, drop -c copy and let ffmpeg re-encode instead.
  • -t is a DURATION relative to the start point, not an absolute end time — use -to 00:00:45 instead if you'd rather specify where the clip ends.
  • Placing -ss after -i (rather than before) does slower, frame-accurate output seeking instead of fast input seeking — useful if precision matters more than speed for a particular cut.

Related in Commands