10

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.)

7
  • 2
    Aren't .m4a and .aac just two different filename extensions for the exact same container file format and codec? Did you try just changing the filename extension and seeing if your app is just been too picky about filename extensions?
    – Spiff
    Commented Apr 20, 2016 at 20:24
  • 1
    @Spiff I tried that. It crashes the app. Also winamp plays .aac and .m4a, but not an .m4a file with extension changed to .aac.
    – H.v.M.
    Commented Apr 20, 2016 at 20:32
  • 5
    So in case anyone else was confused the same way I was, it turns out that even though AAC was developed as an audio codec for MPEG, and thus most natively seen inside .m4a MPEG-4 container files, apparently a .aac file is more likely to be a pure AAC bitstream, not wrapped in an MPEG-4 container. stackoverflow.com/questions/18110399/…
    – Spiff
    Commented Apr 21, 2016 at 21:46
  • 1
    it's impossible to do lossless conversion between two lossy formats. A small decrease in quality is always introduced on each encoding step. You can only convert with minimal quality loss
    – phuclv
    Commented Nov 5, 2018 at 4:37
  • @phuclv Right, so if there are no encoding steps...
    – H.v.M.
    Commented Nov 5, 2018 at 8:06

1 Answer 1

11

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
pause 

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .