Splitting an audio file into multiple smaller pieces

Uncategorized

I was having trouble figuring out how to split up a large audio file into smaller pieces via the command line. I finally found this post and found that I can use the following command:

ffmpeg -i filename.mp4 -f segment -segment_time 1800 -vn -c:a libmp3lame -b:a 128k -ac 2 -ar 44100 filename_03d.mp3

To make sure this works, you’ll need to install ffmpeg first if you don’t have it already:

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265