I know this can be googled but after doing that and finding various combinations of switches and options and techniques, some needed some not, I thought it might help MusicBee users to have a statement here of what absolutely worked for this user. You need to have ffmpeg.exe on your PC first.
Pure ADTS AAC audio files can be a problem to tag, especially as there seems to be no "native" tag format for pure AAC. Some taggers add Id3v2.3 or APE tags to them, which may be read by some players and not others, and either way are definitely not "right".
This command line will LOSSLESSY convert all
*.aac files within the directory it is executed
to *.m4a files. No re-encoding of the original stream(s) is done, only the mpeg4/Apple m4a wrapper applied, which then allows any modern tagging application to correctly apply mp4 format tags to the files. Original filenames will be kept, as well as the original *.aac files:FOR %F IN (*.aac) DO C:\ffmpeg\bin\ffmpeg.exe -i "%F" -codec copy "%~nF.m4a"
Replace the sample ffmpeg.exe path to wherever you have it on your PC. For questioning minds (a GOOD thing!!), the funny-looking "~n" preface in the output name means use original input filename MINUS the original extension, or else you end up with a double-extension file. For those questioning if the "-codec copy" needs more switches, the official ffmpeg documentation says, "An empty stream specifier matches all streams. For example, -codec copy or -codec: copy would copy all the streams without reencoding." Folks, this WORKS, try it!
This is for Windows. You can right-click the directory with the .aac files while holding down "shift" and select "Open command prompt", then copy in the string above to the Command prompt window.
You can download a Windows 32 or 64 bit copy of the latest static ffmpeg.exe from this site:http://ffmpeg.zeranoe.com/builds/
All you need is the file "ffmpeg.exe" within the downloaded package.
Note: you can also do a lossless ADTS AAC conversion to M4A using the Mp4box.exe tool, but you can google the procedure(s) for that one!
If you started with an M4A file to begin with and thought you must extract/convert it to AAC first to edit it (like with Mp3DirectCut), you can directly cut out a section of/trim beginning or end of an M4A file as-is by using the app LosslessCut (https://github.com/mifi/lossless-cut/releases
), also based on ffmpeg.
Hope I saved somebody some time.