Trim a Video Segment Without Re-encoding (FFmpeg)

Extract a time range from a video by copying the existing stream data, which finishes in seconds and keeps the original quality intact.

LinuxvideoffmpegcuttrimLow risk
Run ffmpeg -ss 00:02:30 -to 00:05:00 -i input.mp4 -c copy output.mp4 to cut the 02:30-05:00 section instantly without quality loss.

01Command

Command
$ ffmpeg -ss 00:02:30 -to 00:05:00 -i input.mp4 -c copy output.mp4

02What it does

Placing -ss before -i makes ffmpeg seek directly to the start time instead of decoding everything up to it, so a two-hour file is cut in seconds. The -c copy option streams the compressed packets into the new file untouched — no re-encoding, no quality loss. The tradeoff is that cuts snap to keyframes, so the exact start point may shift by a fraction of a second; re-encode only if frame-accurate cutting matters.

03Risk

RiskLow risk
Requirementsffmpeg
!Warning: With -c copy the cut lands on the nearest keyframe; if you need frame-perfect trimming, drop -c copy and accept a full re-encode.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • FFmpeg Wiki: Seeking
    FFmpeg · community · 2026-09-17
    Evidence: Explains -ss before input for fast seeking and that -c copy cuts at keyframes without re-encoding.
  • FFmpeg Documentation
    FFmpeg · vendor-doc · 2026-09-17
    Evidence: Official documentation of the -ss, -to, and -c copy options.

Last verified: 2026-09-17 · Category: Media