Trim a Video Segment with ffmpeg on Windows
Cut a portion of a video by timestamps in seconds, using stream copy so quality is untouched.
Place -ss and -to before -i and add -c copy to trim without re-encoding.
01Command
Command
$ ffmpeg -ss 00:01:30 -to 00:03:00 -i input.mp4 -c copy output.mp402What it does
With -c copy ffmpeg just remuxes the selected packets, so the cut finishes in a second and is lossless — but the start point snaps to the nearest keyframe, which can be up to a few seconds off on long-GOP footage. Move -ss after -i (or drop -c copy to re-encode with a codec like libx264) for frame-accurate cuts at the cost of processing time.
03Risk
!Warning: Stream copy cuts snap to keyframes; the clip may start a little earlier than requested.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- FFmpeg Wiki: SeekingEvidence: Explains -ss/-to placement: putting -ss before -i seeks by keyframe and with -c copy produces a fast stream copy with minimal accuracy loss.
- FFmpeg DocumentationEvidence: Documents the -ss, -to and -c copy options used for timestamp-based stream copying.
Last verified: 2026-09-17 · Category: Media