A M4A audio file can contain AAC audio. If so, then such a M4A file is a container format for AAC audio. It seems that most (all?) general conversion programs, do not convert losslessly between AAC and M4A (containing AAC) files.
A lossless conversion between M4A and AAC audio files, can be done with MP4Box (which is part of "GPAC Framework"), as follows:
How do it (1) - Install MP4Box and create batch files (Windows)
- Install only the MP4Box component from GPAC Framework. I used this version: "gpac-0.7.0-rev27-g0639a09-master-win32.exe", which can be found here.
- Create, based on what you prefer, one or more of the following Windows Batch files (scripts). Use Windows Notepad or another simple text editor to create those files. The name of those files should have a ".bat" extension.[A] To convert only the relevant files that are in a single folder, and to create a subfolder in that folder, and to put the converted files in that subfolder:
- To convert from M4A to AAC:m4a2aac.bat@echo offmkdir aacfor %%f in (*.m4a) do "C:\Program Files (x86)\GPAC\mp4box.exe" -raw 1 "%%f" -out "aac\%%~nf.aac"
- To convert from AAC to M4A:aac2m4a.bat@echo offmkdir m4afor %%f in (*.aac) do "C:\Program Files (x86)\GPAC\mp4box.exe" -add "%%f" "m4a\%%~nf.m4a" -new[B] To convert the relevant files in a folder and all its subfolders, and to add the converted files to that folder and subfolders (without creating any subfolders):
- To convert from M4A to AAC:m4a2aac_IncludingSubfolders.batFOR /R %%G in (.) DO (
Pushd %%Gfor %%f in (*.m4a) do "C:\Program Files (x86)\GPAC\mp4box.exe" -raw 1 "%%f" -out "%%~nf.aac"Popd )
- To convert from AAC to M4A:aac2m4a_IncludingSubfolders.batImportant note: The above bat-files only work, when you installed MP4Box in "C:\Program Files (x86)\GPAC\mp4box.exe". If not, change "C:\Program Files (x86)\GPAC\mp4box.exe" in the batch file, into the location where you installed MP4Box. (The batch files work with Windows 7 and later versions of Windows.)FOR /R %%G in (.) DO (Pushd %%Gfor %%f in (*.aac) do "C:\Program Files (x86)\GPAC\mp4box.exe" -add "%%f" "%%~nf.m4a" -newPopd )
How do it (2) - Run batch files
- Place a temporary copy of the relevant batch file in the folder that contains the files to be converted.
- All relevant files in that folder will be converted with "m4a2aac.bat" or "aac2m4a.bat".
- All relevant files in that folder and all its subfolders, will be converted with "m4a2aac_IncludingSubfolders.bat" or "aac2m4a_IncludingSubfolders.bat".
- Double click on the batch file. A temporary progress window will appear, until all relevant files are converted.
- Delete the temporary copy of the batch file.
Why do it
There can be different reasons why one would want to losslessly convert between AAC and M4A audio files. Two such reasons:
The above is based on this. See there for other variations of using MP4Box for a lossless conversion between M4A and AAC, including a way to 'preserve' metadata tags.
- It seems that AAC audio files can only be trimmed or cut losslessly with the program "mp3DirectCut". If you want to losslessly trim or cut a M4A audio file (containing AAC audio), you first have to losslessly convert this M4A file to an AAC file. Then you trim or cut this AAC file losslessly in mp3DirectCut. After that, you losslessly convert the trimmed or cut AAC file back to a M4A file.
- In general, AAC audio files do not support metadata tags, while M4A audio files (containing AAC audio) do support metadata tags. So, if you want to have an "AAC audio file with tags", first convert such an AAC file losslessly to a M4A file, and then add tags to that M4A file.
+ Reply to Thread
Results 1 to 5 of 5
lol, "lossless" conversion where one codec is lossy