Trim an Audio Clip with FFmpeg (-ss / -to)
Cut a section out of an MP3/WAV audio file between two timestamps directly from the command line.
Run ffmpeg -i song.mp3 -ss 00:01:30 -to 00:03:00 -c copy clip.mp3 to keep the audio from 1:30 to 3:00.
01Command
Command
$ ffmpeg -i song.mp3 -ss 00:01:30 -to 00:03:00 -c copy clip.mp302What it does
Placing -ss and -to after -i makes FFmpeg seek on output and drop everything outside the range. With -c copy the cut is instant and lossless but snaps to the nearest frame boundary — usually accurate to a fraction of a second on audio. For a sample-exact cut, drop -c copy so the segment is re-encoded.
03Risk
!Warning: Output overwrites an existing clip.mp3 without asking — check the filename first.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Seeking (FFmpeg wiki)Evidence: Explains -ss/-to input and output seeking: seeking on output with -c copy cuts at the nearest keyframe, and re-encoding gives sample-accurate cuts.
Last verified: 2026-09-18 · Category: Media