Extract a segment from an audio file with FFmpeg
How to extract a segment from an audio file by means of FFmpeg on Windows and Linux. Two variants:
Without re-encoding
The faster way, but possibly less precise.
Extracting a segment starting at a specific time with a specific duration:
ffmpeg -ss 00:00:10 -t 00:01:30 -i "input".mp3 -c copy output.mp3
With re-encoding
The slower way, but more precise.
Extracting a segment starting at a specific time with a specific duration:
ffmpeg -ss 00:00:10 -t 00:01:30 -i "input".mp3 -async 1 output.mp3
Links
- Cutting multimedia files based on start and end time using ffmpeg [closed]
Operating systems
- Windows
- Linux