That ffmpeg command splits an MP3 file into 5-minute chunks without re-encoding. Here’s a clear breakdown:
What each part does#
-i input.mp3Usesinput.mp3as the source file.-f segmentTells ffmpeg to use the segment muxer (for splitting files).-segment_time 300Sets each segment to 300 seconds (5 minutes).-c copyCopies the audio stream as-is (fast, no quality loss).output_%03d.mp3Output filenames like:output_000.mp3 output_001.mp3 output_002.mp3
Important things to know#
⏱️ Cut points depend on MP3 frame boundaries Segments may not be exactly 300 seconds.
⚡ Very fast because it doesn’t re-encode.
Common variations#
Start numbering at 1
ffmpeg -i input.mp3 -f segment -segment_time 300 -segment_start_number 1 -c copy output_%03d.mp3Force exact 5-minute segments (re-encodes audio)
ffmpeg -i input.mp3 -f segment -segment_time 300 -c:a libmp3lame output_%03d.mp3Split into 10-minute chunks
ffmpeg -i input.mp3 -f segment -segment_time 600 -c copy output_%03d.mp3Split by timestamps listed in a file
ffmpeg -i input.mp3 -f segment -segment_times 300,600,900 -c copy output_%03d.mp3