Losslessly trimming and cutting M4A and AAC files on Windows

Losslessly trimming and cutting M4A and AAC files just got easier, at least on Windows. mp3DirectCut added AAC support a few months ago, so now you can use its excellent interface. To enable playback of AAC files within mp3DirectCut, you will need to download libfaad2.dll (e.g. from RareWares).

One important snag is that mp4DirectCut will not work with .m4a files directly. The raw AAC stream first needs to be extracted from the M4A container. I use the command-line tool MP4Box for this. The basic commands are:

  1. to extract the raw aac stream from an m4a file:

    mp4box -raw 1 input.m4a -out output.aac

  2. to repackage the aac stream into an m4a container (after lossless editing in mp3DirectCut):

    mp4box -add input.aac output.m4a -new

Here are two batch scripts I wrote to make the whole process easier: