11/11/2025

Learn the fastest and easiest way to cut or trim any video using a simple FFmpeg command. Get the code, understand each parameter, and solve common issues.

How to Cut or Trim a Video with FFmpeg? (The Easiest Command)

Ever had a long video file but only needed one golden clip from it? Whether you're making a GIF or just want to share a key moment, knowing how to trim a video is a fundamental skill. Forget the complex and expensive video editing software! This article will show you how to do it in a flash with a single FFmpeg command line.

🚀 Quick Access: The FFmpeg Command

To cut a video starting from the 1-minute mark and ending at the 2-minute mark, just copy and run the command below, changing the filenames to match yours.

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

This command will trim your video in the fastest way possible (without re-encoding).

🧠 The Breakdown: Understanding Each Parameter

Let's break down the command to understand what each part does.

Parameter Explanation
ffmpeg This calls the FFmpeg program itself.
-i input.mp4 -i stands for "input". It's followed by your source video file name.
-ss 00:01:00 Stands for "seek start". This defines the start time for the trim. The format is HH:MM:SS (hours:minutes:seconds).
-to 00:02:00 This defines the end time for the trim. The format is the same as -ss.
-c copy This is the secret to the speed! It tells FFmpeg to directly copy the video and audio streams instead of re-encoding them. This makes the process nearly instant and preserves the original quality.
output.mp4 The name of the new, trimmed video file you want to save.

FAQ & Variations

1. Can I specify a start time and a duration instead of a start and end time?

Absolutely! If you want to start at the 1-minute mark and clip a 30-second segment, you can use the -t (duration) parameter instead of -to.

# Start at 00:01:00 and cut a 30-second long clip
ffmpeg -i input.mp4 -ss 00:01:00 -t 30 -c copy output.mp4

2. Why does my trimmed video have a black screen or artifacts at the beginning when using -c copy?

This is a classic issue related to "Keyframes." For maximum speed, -c copy mode can only start cutting at a keyframe. If your specified start time 00:01:00 isn't a keyframe, FFmpeg will seek to the previous keyframe to start the cut. This can result in a few extra seconds or playback glitches at the beginning of your output file.

The Solution: If you need frame-perfect accuracy, the only way is to re-encode the video. Simply remove the -c copy part, and FFmpeg will handle it automatically. This process is slower but guarantees your cut will be precise to the exact millisecond.

# Re-encode for a perfectly accurate cut
ffmpeg -i input.mp4 -ss 00:01:00 -to 00:02:00 output.mp4