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

einpoklum
  • 10,666

4 Answers4

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

grawity
  • 501,077
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.

r2d3
  • 4,050
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"
-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.

harrymc
  • 498,455