Skip to main content
Topic: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?) (Read 387 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Hey,

I'm currently trying to add metadata to my .aac-music files. I used the linux tool id3v2 to add the standard metadata (title, artist ...) but I also want to add replaygain_track_gain and replaygain_track_peak to my files. The question is:

What is a working and good way to store this information? I want to do this programmatically so I look for a simple commandline tool or nodejs library.

I have tried multiple things to accomplish that. Using id3v2 directly on the aac-files for the TXXX field results in the TXXX field overwritten by the last value I tried to add. When I use id3v2 on the same file, but renamed to .mp3 I can add multiple key-value-pairs to the TXXX-field and the data is correctly read when renaming back to .aac. This behaviour makes no sense to me and I couldn't find a clue to that behaviour in the source (https://github.com/myers/id3v2).

I also tried some other tools to set those values to the TXXX field. They work perfectly with .mp3 but they struggle to do the same thing when the file is .aac. Why is that?

Is there a better mediadata standard for aac, which I can write in a simple way from the terminal?

I hope someone else also came across this problem and solved it. I'm happy to hear you ideas.



Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #3
OK, do you have some more information? I found AtomicParsley which might be able to write metadata. Are there any tools you suggest to write metadata in MP4-container-format(?)?

MP4 is the standard container for AAC files, so anything supporting AAC should work with it.  Specific programs include foobar2000, iTunes, dbpoweramp, tag&rename, etc.

Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #4
MP4 is the standard container for AAC files, so anything supporting AAC should work with it.  Specific programs include foobar2000, iTunes, dbpoweramp, tag&rename, etc.

I know but I'm looking for a commandline tool to edit this. As I cannot do it for a few thousand files by hand in a GUI.

Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #5
Sorry I guess I found the right tool. I can set some mp4-metadata with mp4tag from mp4v2(https://code.google.com/archive/p/mp4v2/).

But actually where would I put replaygain and peek there? The list displayed by this tool does not include such a field or anything near to that

Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #6
I'm looking for a commandline tool to edit this. As I cannot do it for a few thousand files by hand in a GUI.

There are smarter GUIs than that. I use foobar2000 for most tagging purposes: it scans the entire selection (which could be thousands of files, if you want), and asks you to press OK to commit. Also can group albums for RG album gain and peak, which is what I use the most. If you want fb2k under Linux, try Wine. (I have no idea whether the most recent versions work.)

There is mp3gain with AAC support, though: http://mp3gain.sourceforge.net/ for Windows, and maybe https://launchpad.net/~flexiondotorg/+archive/ubuntu/audio is a port of the same?

Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #7
There are smarter GUIs than that. I use foobar2000 for most tagging purposes: it scans the entire selection (which could be thousands of files, if you want), and asks you to press OK to commit. Also can group albums for RG album gain and peak, which is what I use the most. If you want fb2k under Linux, try Wine. (I have no idea whether the most recent versions work.)

There is mp3gain with AAC support, though: http://mp3gain.sourceforge.net/ for Windows, and maybe https://launchpad.net/~flexiondotorg/+archive/ubuntu/audio is a port of the same?
foobar work's fine with wine. But I actually get different data with foobar comparing to the data I already have about my aac-files. (I mean there is a difference between the gain, foobar calculates and the gain I have in my metadat). I prefer to write the gain from my own metadata to the files. For that I need a commandline tool or a good library...

Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #8
I actually get different data with foobar comparing to the data I already have about my aac-files. (I mean there is a difference between the gain, foobar calculates and the gain I have in my metadat).
Yeah, foobar2000 uses the newer EBU128 algorithm, and it uses -18 dB LUFS target. If your data are 5 dB off fb2k's numbers consistently, then the target is the explanation; otherwise, you have likely been using the old algorithm. (Which some think is better.)


I prefer to write the gain from my own metadata to the files. For that I need a commandline tool or a good library...

So you have, say, for each FILE.aac a FILE.tags.txt or something like that? (Something like http://www.m-tags.org/ ?)

AAC and MP4 tagging isn't straightforward, so I'm not going to pretend I know where the RG tags are supposed to go.

Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #9
So you have, say, for each FILE.aac a FILE.tags.txt or something like that? (Something like http://www.m-tags.org/ ?)

Yeah, nearly like this. For each file I have a json file with the according metadata. I can't believe it's that hard to find a tool to do this. But it actually is (if you don't want to start writing your own mediatags library).

That's why I was nearly happy with the Id3Tags because they were at least "simple to write". But as explained in my first post aac and the TXXX field behave really strange. (Yes I could do this renaming strategy, but I don't see why it is that problematic with aac)

Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #10
So you have, say, for each FILE.aac a FILE.tags.txt or something like that? (Something like http://www.m-tags.org/ ?)

Yeah, nearly like this. For each file I have a json file with the according metadata. I can't believe it's that hard to find a tool to do this. But it actually is (if you don't want to start writing your own mediatags library).

The standard way to do this is to write the metadata to the file, and then parse the metadata into a standard database or other data structure for playback/playlists/whatever. 

That's why I was nearly happy with the Id3Tags because they were at least "simple to write". But as explained in my first post aac and the TXXX field behave really strange. (Yes I could do this renaming strategy, but I don't see why it is that problematic with aac)

MP4 has its own metadata format, so putting an ID3v2 tag breaks the MP4 file (although a lot of software may be smart enough to avoid the corrupted part and play the file anyway but not always). 

Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #11
I finally found a working tool to set gain and peak: kid3 is all you need.

There is a kid3-cli which you can use.

Example:
Code: [Select]
kid3-cli -c "set replaygain_track_gain '10'" file.aac

Re: Metadata on aac files (ID3v2 TXXX or APEv2 or something else?)

Reply #12
Too bad most players won't read those tags. And .aac files cannot be gapless.

 
SimplePortal 1.0.0 RC1 © 2008-2018