Convert m4a to aac without quality loss

aacaudioaudio conversioncodecm4a

I wanna use a program on an .m4a file, but the program can't handle .m4a. It can handle .aac, however, and the codec of the file is MPEG-4 AAC. Is there a way to convert to .aac (and preferably converting back) without reencoding?

(Alternative solution: does anyone have a good program for lossless splitting of .m4a files? mp3DirectCut kicks ass, but can't handle .m4a.)

Best Answer

I found the answer from the creator of mp3DirectCut. He gives three options. Relevant part of his post follows:

I use the "DSM converter" of an old version of the "Media Player Classic" (1.3.1249.0). Also "FFmpeg" can demux (command line: ffmpeg.exe -i inputfile.mp4 -acodec copy outputfile.aac).

There is also MP4Creator which is much smaller. This small batch file can be used for easy decoding by dropping files on it:

mp4creator demux.bat:

@echo off
mp4creator.exe -list %1
echo Demux which track (usually 1 or 2)?
set /p track=
mp4creator.exe -extract=%track% %1

The extension output file must be renamed to AAC - and you got it.

I went with ffmpeg. To convert back to AAC it appears that an additional option is needed. The commands for converting to and from AAC are like below:

ffmpeg -i in.m4a -acodec copy out.aac
ffmpeg -i in.aac -acodec copy -bsf:a aac_adtstoasc out.m4a