Skip to content

Instantly share code, notes, and snippets.

@moaazsidat
Created July 20, 2017 19:19
Show Gist options
  • Save moaazsidat/ff480ef13b7bbea637ef1ccda15cc9de to your computer and use it in GitHub Desktop.
Save moaazsidat/ff480ef13b7bbea637ef1ccda15cc9de to your computer and use it in GitHub Desktop.
Split mp3 audio files by duration

This worked for me when I tried it on a mp3 file.

$ ffmpeg -i somefile.mp3 -f segment -segment_time 3 -c copy out%03d.mp3 Where -segment_time is the amount of time you want per each file (in seconds).

References

Splitting an audio file into chunks of a specified length 4.22 segment, stream_segment, ssegment - ffmpeg documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment