11/11/2025

Cut or trim video with FFmpeg using fast stream copy or accurate re-encoding. Includes start time, duration, end time, keyframe notes, and copyable commands.

How to Cut or Trim a Video with FFmpeg

FFmpeg can cut a clip from a longer video in two main ways. Use stream copy when you want speed and no quality loss. Use re-encoding when you need a frame-accurate cut.

For the short command page, see Cut Video with FFmpeg. For a form-based command builder, use the Cut Video tool.

Fast Trim Without Re-encoding

ffmpeg -ss 00:01:00 -i input.mp4 -t 00:00:30 -c copy clip.mp4

This creates a 30-second clip starting at 1 minute. Because it uses -c copy, FFmpeg copies the existing audio and video streams instead of re-encoding them.

Use this when:

  • You want the fastest possible trim.
  • You want to avoid quality loss.
  • You do not need the cut to start on the exact frame.

Cut by Start and End Time

Use -to when it is easier to think in start and end timestamps:

ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy clip.mp4

This keeps the section from 00:01:00 to 00:02:00.

Accurate Trim

If the fast command starts a little early, shows a black frame, or has artifacts at the beginning, re-encode the clip:

ffmpeg -ss 00:01:00 -i input.mp4 -t 00:00:30 -c:v libx264 -crf 23 -preset medium -c:a aac clip.mp4

This is slower, but it gives FFmpeg the freedom to decode and encode the exact segment.

What the Options Mean

Option Meaning
-ss 00:01:00 Start time for the trim.
-t 00:00:30 Duration of the output clip.
-to 00:02:00 End timestamp for the clip.
-c copy Copies streams without re-encoding.
-c:v libx264 Re-encodes video as H.264 for accurate cuts.
-c:a aac Re-encodes audio as AAC for MP4 compatibility.

Where to Put -ss

Putting -ss before -i is usually faster:

ffmpeg -ss 00:01:00 -i input.mp4 -t 00:00:30 -c copy clip.mp4

Putting -ss after -i can be more accurate when re-encoding, but it may be slower:

ffmpeg -i input.mp4 -ss 00:01:00 -t 00:00:30 -c:v libx264 -crf 23 -c:a aac clip.mp4

For most users, start with -ss before -i.

Common Problems

The clip starts a few seconds early.
That is a keyframe limitation of -c copy. Use the accurate re-encode command.

The beginning has a black screen or artifacts.
Use re-encoding instead of stream copy.

The output has no audio.
Check that the input has an audio stream. If the source audio is unusual, use -c:a aac.

The file is larger than expected.
If you re-encode, increase CRF from 23 to 25 or 28.

Related FFmpeg Pages

Related tool

Cut Video with FFmpeg

Generate FFmpeg commands to trim video clips by start time, duration, end time, or from the end.

Open the command generator