12

I have an AAC file which I want to tag with information (artist, title, track number, album title etc.) ; unfortunately - it seems AAC does not support most of these tags, and tagger apps refuse to write them.

Can I perhaps convert the file into a different format, with non-lossy conversion (hopefully copy-only), and such that I can have tags in this alternative format? And also open it easily in various media players?

Edit: As for what kind of AAC this is:

$ mediainfo myfile.aac
Complete name                            : myfile.aac
Format                                   : ADTS
Format/Info                              : Audio Data Transport Stream
File size                                : 1.23 MiB
Overall bit rate mode                    : Variable

Audio
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Format version                           : Version 4
Codec ID                                 : 2
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 1.23 MiB (100%)
8
  • 5
    @YisroelTech OP said lossless. MP3 is not lossless. Commented Jun 15, 2023 at 18:15
  • FLAC the audio format.
    – cybernard
    Commented Jun 15, 2023 at 19:48
  • @cybernard: Why would I recode in a much larger format in order to have meta-data?
    – einpoklum
    Commented Jun 15, 2023 at 20:49
  • 2
    @KalamalkaKid I know he said lossless, but AAC isn't lossless either... (although maybe it's better than MP3.) So my question was basically for the OP to explain if there is any reason why he decided to have it compressed to ACC but not to the more universal MP3 Commented Jun 15, 2023 at 21:09
  • 1
    @einsupportsModeratorStrike The OP wants metadata and did not say anything about space concerns. FLAC stands for Free Lossless Audio Codec The OP also wants a "non-lossy" solution. Hard drive, ssd, usb, or etc is so cheap size is meaningless just buy more, and your done.
    – cybernard
    Commented Jun 15, 2023 at 21:33

4 Answers 4

40

.aac files are just a "raw" audio stream, they do not support MP3-style tag embedding because AAC is meant to be used with a separate "wrapper" container format to carry those tags instead. Typically¹ MP4 container files (.mp4 or .m4a) are used for AAC audio.

So if you have raw ".aac" files, repackage (remux) them into ".m4a" and then you can tag them:

ffmpeg -i Foo.aac -c:a copy Foo.m4a

With -c:a copy being specified, ffmpeg will use the existing audio stream as-is (i.e. it will not do a lossy AAC→AAC conversion). You can also add -metadata options to the same command if you want to attach a few standard fields.

You can get FFmpeg for Windows through the official website; on Linux it is typically available as a distribution package.

(I also found "Xmedia Recode" which appears to be a good GUI around FFmpeg; again, make sure you select copying/remuxing without reencoding.)


¹ (Other container formats such as Matroska .mkv/.mka would be possible too – though it would be highly unusual; AAC almost always goes in MP4.)

4
  • 2
    This command appears to wrap it up in a container format without re-encoding, yes?
    – Yorik
    Commented Jun 15, 2023 at 17:42
  • 9
    Yes, that's what copy as the audio codec does. Commented Jun 15, 2023 at 18:13
  • doesnt work for me, this works: ffmpeg -i "file.aac" -codec: copy "file.m4a" Commented Jan 9 at 16:56
  • submmited an EDIT few weeks ago, but seems the effort was wasted, and seems i'm unable to find the submitted EDIT for reference. Commented Feb 7 at 3:01
5

I have an AAC file which

I am unsure if the term "AAC" file is well defined. Better post the results of a media analyzing software such as GSpot or MediaInfo to determine if your file is

  1. a file containing a raw AAC stream
  2. AAC embedded in a transport stream format (what you get when you are recording some internet radio streams)
  3. AAC embedded in a mp4a (audio) hull.

My case was number two and those songs could not be played by a Shenzen mp4-Player.

I want to tag with information (artist, title, track number, album title etc.) ; unfortunately - it seems AAC does not support most of these tags, and tagger apps refuse to write them.

Your tagger does not get by with the outer hull of your file - if there is any.

Can I perhaps convert the file into a different format, with non-lossy conversion, and such that I can have tags in this alternative format? And also open it easily in various media players?

Try to embed your aac-file in an mp4-container. That could be

  1. a mp4a-container or
  2. a regular mp4-container (allows for video and audio tracks)

and try to tag them. I suppose number two should work. Your tagger will most likely try to tag the container instead of tagging individual tracks.

mp3-conversion requires reencoding your aac source, blowing your target file size up and degrading the audio quality.

2
  • 3
    To complicate matters even further, a "raw" AAC stream can actually be in two completely different formats, ADTS and LATM/LOAS. But I guess that's too much information :-)
    – TooTea
    Commented Jun 16, 2023 at 7:24
  • @TooTea: If you can wrap any of them in an .mwa, then it doesn't matter.
    – einpoklum
    Commented Jun 16, 2023 at 20:21
0

As of 2024 Jan 10, using ffmpeg v1.4.3, below command work for me, the above answer doesn't work.

ffmpeg -i "file.aac" -codec: copy "file.m4a"
3
  • 1
    I believe it would be better to edit the accepted answer to reflect this. Perhaps have both the original command-line (saying that it might be appropriate for older versions of ffmpeg), and your new one. If you just leave your answer here, it won't get enough attention. Also note a commenter on the accepted answer has also said the same.
    – einpoklum
    Commented Jan 9 at 17:00
  • Yea, the commenter is me. Not familiar with edit, let me try Commented Jan 11 at 5:52
  • Tried to make edit, but no one accepts it, hmmmm Commented Feb 7 at 2:59
-2

Files marked as .aac, whatever their container format, do support as many tags as any music file, when using the right tagger product. It's only Windows Explorer that doesn't display them.

Explorer does not show the tags for files with the .aac suffix for some reason, perhaps because .aac is not taken as a multimedia file. Renaming a .aac file to .mp3 (without any conversion) will cause Explorer to show an empty list of all the tags.

Under Windows/NTFS, file-properties can be included in Alternate data stream (ADS), which is a data extension to the file that doesn't modify its visible data. Some Windows taggers use it to append audio tags to multimedia files, although with this technique any file can be tagged.

Specifically for the poster, his files contain audio encoded in the Advanced Audio Coding (AAC) and encapsulated within Audio Data Transport Stream (ADTS) containers. Moving the AAC audio into MP3 containers, may yet have some effect on the quality when playing the music, even if a very small one (the two container formats are not identical in features).

There exist very many tagger products, although the best ones are payware. One free product is the donationware Mp3tag that can manage the tags on many formats of files (in spite of its name).

Converting to MP3 is an option, but I tend to avoid conversions just for the purpose of adding tags, and because the support of Explorer for tags is very minimal. A good tagger product can do much more than Explorer.

19
  • 2
    Not... quite. AAC can mean multiple things. A file with an AAC extension can be a raw AAC stream (no metadata) or an MP4 container containing AAC stream(s) - with metadata.
    – Luaan
    Commented Jun 16, 2023 at 6:22
  • 4
    @harrymc The file extension doesn't reliably tell you what the actual filetype is. A file ending in .aac can still be both of the things Luaan described.
    – marcelm
    Commented Jun 16, 2023 at 15:03
  • 1
    @harrymc But according to other answers here, raw AAC streams (which is what OP may have) don't support tags. If you argue they do, could you cite a source?
    – marcelm
    Commented Jun 18, 2023 at 8:07
  • 1
    "Without being stored inside some container" is generally how MP3 works; the contents of an .mp3 file are nothing more but a series of "raw" MP3 audio frames, with the metadata tags being disguised as invalid frames (not sure if that still applies to ID3v2.4 but that's how ID3 used to work in the past). The same goes for .aac files, at least the specific kind that OP has – they consist of a series of ADTS audio frames without any surrounding "container" structure, but unlike with MP3 there's no agreed-upon way to stash any metadata in that, which is why taggers aren't able to do it. Commented Jun 18, 2023 at 10:48
  • 3
    Right, I see you're going to stick to "I'm not wrong despite specific proof of me being wrong" like you always do. It's insulting. Commented Jun 19, 2023 at 9:46

You must log in to answer this question.

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