How to cut an audio file on Linux

I had an .m4a file and I wanted to cut a one-minute chunk starting at second 156. Turns out you can easily use ffmpeg for this.

WARNING: Argument order matters here. Specifically, the -t 60 has to be after the -i input.m4a specifier to indicate that the output file should be at most 60 seconds.

ffmpeg -ss 156 -i input.m4a -t 60 -acodec copy out.m4a

That’s all folks!

Written on November 17, 2015