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.
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.mp402What 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
!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: SeekingEvidence: Explains -ss before input for fast seeking and that -c copy cuts at keyframes without re-encoding.
- FFmpeg DocumentationEvidence: Official documentation of the -ss, -to, and -c copy options.
Last verified: 2026-09-17 · Category: Media