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:
to extract the raw aac stream from an m4a file:
mp4box -raw 1 input.m4a -out output.aac
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:
m4a2aac.bat, for converting m4a to aac:
for %%f in (*.m4a) do mp4box -raw 1 "%%f" -out "aac\%%f.aac"
aac2m4a.bat, for converting aac to m4a:
for %%f in (*.aac) do mp4box -add "%%f" "m4a\%%f.m4a" -new