Skip to main content

Topic: iTunes tags gone after Replaygain (Read 12358 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Doktor_Lorenz
  • [*][*]
  • Members (Donating)
iTunes tags gone after Replaygain
Many thanks to the Nero team for releasing neroaacenc, it is much appreciated and i'm sure many more people will be thankful for your hard work [even if it took me a little while to get the hang of using it thru eac].

I do have one question, I am currently encoding my m4a file using eac and atomic parsley for the tagging part [for itunes this is important for my dad not for me] but why is it when I replaygain my files using foobar 0.9 that my tags that were fine in itunes before then just defaults to the filename.
Morality, like art, means drawing a line someplace. (Oscar Wilde)

Doktor Lorenz

  • torok
  • [*][*][*][*]
iTunes tags gone after Replaygain
Reply #1

  • Doktor_Lorenz
  • [*][*]
  • Members (Donating)
iTunes tags gone after Replaygain
Reply #2
Yea, same deal here:

http://www.hydrogenaudio.org/forums/index....showtopic=44454


Actually I'm not too bothered about Foobar not being able to read the tags, but what i am bothered about is the fact that when I apply replaygain thru foobar that it totally destroys the tag that atomic parsley applied in the first place so I could use it thru iTunes.
Me and my dad both have iPods where as he uses and insists on using iTunes i prefer using foobar to upload to my nano, the problem lie in that I want to rip both dads cd and mine to at least iTunes standard so dad can pick and chose what he wants in his ipod using itunes [he loves the fact you can apply album art as well, prolly bragging rights etc etc]
Ideally i'd like to be able to rip as i do now but find a way of applying replaygain without totally destroying the tags that atomic parsley creates.

thanks for quick replay anyway
Morality, like art, means drawing a line someplace. (Oscar Wilde)

Doktor Lorenz

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
iTunes tags gone after Replaygain
Reply #3
[deleted]
  • Last Edit: 27 August, 2015, 03:09:13 PM by TrNSZ

  • MelOFlow
  • [*]
iTunes tags gone after Replaygain
Reply #4
I read the buglist the day the new version of AP came out. Unless I am incapable of deciphering plain english, I am unconcerned by those minor issues. The only one that I may come up against is the MAXPATHLEN issue for win32. What bugs are you referring to that I should watch for?

As for whatever tags you say AP writes that are corrupted or invalid, I haven't seen it. I have used it extensively in both a wrapped form and on the command line. I find the ability to set the great abundance of tags better than anything out there. The only problem is that there are SO many options. The 3gp options are especially copious, but I only glanced at them. But I suppose that provides for increased flexibility, so I can't complain too much. Every tag I set gets picked up by iTunes, which ones are you talking about? Can you provide an example command to create such an invalid tag?

Nero found problems everywhere else except in their own house. It's kind of hard to argue with "You can't create your own atoms" and "Use this mechanism to extend functionality" and Nero doesn't do it. So your problem was that it was brought to their attention that they weren't compliant? Since Nero people didn't dispute that it used libmp4v2 from mpeg4ip, that must be what they use. Even mp4tags which uses libmp4v2 picks up the right info, so I doubt its an AtomicParsley issue.

If you actually used libmp4v2 with any frequency, you would find that libmp4v2 does have a few issues of its own - issues that don't affect AP. I'm not saying AP is perfect - it has different issues, but if you think that NO software has hacks... you are on the wrong OS. Your "hack" may be someone's "accommodation". For example, you either include things by explicitly listing them, or allow everything and specifically exclude things. Its a matter of perspective - perhaps you are lacking it. There is 1 big hack that I see in the code, but since it writes files that everything I have picks up fine, I'll live with it. But here is someone else take on libmp4v2 - perhaps you missed it as well:

http://forum.doom9.org/showthread.php?p=830119#post830119

I believe the problem of foobar2000 not picking up tags lies in foobar2000 itself. As an example I tagged a number of files with both foobar2000 & AP. Foobar didn't pick up the tags that were modified by AP (or iTunes) - but as soon as I erased the 'tags' atom with an enema, Foobar did pick them up. The lesson here is that if you have 2 tagging systems, which one takes precedence? If Nero's tagging only writes the encoder tag for both tagging systems, and then AP writes everything else (valid tags mind you, but only iTunes-style tags), then Foobar has to pick a tagging scheme. Seems it leans towards its own implementation, rather than the one everything else uses. Go try it yourself - please post your findings and where the blame belongs.

As an example, use this on a file encoded with the free Nero encoder (to be sure it has the 'tags' atom in question; or alternatively with a file tagged by foobar2000):
Code: [Select]
AP.exe file.m4a --artist "The Artist" --title "A Title" --comment "A Comment"

then try
Code: [Select]
AP.exe file.m4a --artist "The Artist" --title "A Title" --comment "A Comment" --foobar2000enema

iTunes & my iPod can get the right metadata - does foobar2000? Yes, but only with the 2nd one. Since I'm not about to give up my iPod, iTunes, I know which side of the fence I'm on - the side of iTunes-style metadata. Perhaps if you directed some of that venom towards figuring out WHY it was happening instead of scrutinizing every line of code, you would have too. BTW, the first enema switch was there before AP was even cross platform - and probably before foobar2000 was even on the AP radar. To be honest, it makes me smile. Must be my liberal upbringing.

As for redundancy of tags - lots of users are trying to make their files smaller & smaller. Say they want to embed artwork. 400k for 4 pix is a whole lot less than 800k when doubled. Over a dozen files, that amounts to an extra song. That's a penalty that doesn't exist yet, but will soon.

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
iTunes tags gone after Replaygain
Reply #5
[deleted]
  • Last Edit: 27 August, 2015, 03:16:45 PM by TrNSZ

  • spoon
  • [*][*][*][*][*]
  • Administrator
iTunes tags gone after Replaygain
Reply #6
>Atomic Parsley is writing corrupt ND tags, but writing otherwise correct Apple tags,

Can you clarify this, all m4a ID Tags are standardized around iTunes (or the older Quicktime) tagging. What are Nero Digital tags? (not talking unique atoms here, but standard tags), if ND writes an artist tag, iTunes should read it?

  • MelOFlow
  • [*]
iTunes tags gone after Replaygain
Reply #7
You've seen the AP code - what line number nulls out the tags? It doesn't even touch them - it skips over them. When write out time comes, all it does is copy the entire 'tags' atom. You clearly didn't look at the code very well - and yet you found bugs all over the place. I doubt your abilities to spot bugs then.

Work it from a different angle - have you looked at the file in a hex editor? search for 'tags' on a before & after. Your thoughts on the identical contents? Still sticking to it being NULLed out?

The reason why foobar2000's tagging scheme is non-compliant was already given. That you don't want to understand it is another issue. Say AP wanted to  use 'tags' for something. What if everybody decided to start with their own atoms? What use is a 'standard' if everyone is adding their own crud. ISO stands for something you know.

edit: in fact, when it comes to removing atoms, AP doesn't even null out the whole tag - all it NULLs out is the atom name and the order it comes in. The contents of an atom aren't read in at all unless final writeout time comes (when their are copied unaltered), or for non-descructive reading. You may want to refer to the 'APar_EliminateAtom' function for verification. Anything you care to get *right*?
  • Last Edit: 26 May, 2006, 10:51:28 AM by MelOFlow

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
iTunes tags gone after Replaygain
Reply #8
[deleted]
  • Last Edit: 27 August, 2015, 03:16:49 PM by TrNSZ

  • spoon
  • [*][*][*][*][*]
  • Administrator
iTunes tags gone after Replaygain
Reply #9
>Apple's own "invented" atoms are any more or less valid than ones created by another company?

They sort of got there first (2 years ago) and they are arguably creating more m4a tagged files than anyone else, what good is two standards?

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
iTunes tags gone after Replaygain
Reply #10
[deleted]
  • Last Edit: 27 August, 2015, 03:10:17 PM by TrNSZ

  • MelOFlow
  • [*]
iTunes tags gone after Replaygain
Reply #11
trnsz:

You are incorrect. Please provide a line number if you can. Or look at it in a hex editor. A dodgeball master.... MASTER!!! Just look in a hex editor - you will see they are still there. Man, that's some hardcore denial!

spoon:
There are at least 5 known ways of tagging ISO base Media files:

Quicktime style metadata "moov.udta.XXXX" in utf8/utf16 with language code
iTunes-style metadata "moov.udta.meta.ilst.XXXX" utf8, 'data' child carries the tag
3GPP-style assets "moov.udta.XXXX" very much like QT tags, but a differntly named set
ID32-style tags that were recently added; aims to incorporate id3v2.x tags
f2k-style tags - "moov.udta.tags" which you have to to ask Nero about since they are such staunch defenders. Looks to replicate iTunes-style tags but more string-like
[jpeg2000 files may do exif metadata]
[mpeg21]

Only foobar2000 (and the upcoming neroAActags presumably) will be able to use the new tagging scheme. Both do not incorporate their own taggers, but instead use libmp4v2 to write tags. Lets not kid ourselves, they aren't that hard to figure out. Only they will be able to read them at first. They must be having a "meeting of the minds". What probably doesn't help is that libmp4v2 doesn't have support for the uuid mechanism (at least I don't remember seeing it) that SHOULD be used. That might have influenced why they went another way.
  • Last Edit: 26 May, 2006, 11:24:18 AM by MelOFlow

  • menno
  • [*][*][*][*][*]
  • Developer (Donating)
iTunes tags gone after Replaygain
Reply #12
Both do not incorporate their own taggers, but instead use libmp4v2 to write tags.


False

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
iTunes tags gone after Replaygain
Reply #13
[deleted]
  • Last Edit: 27 August, 2015, 03:11:00 PM by TrNSZ

  • spoon
  • [*][*][*][*][*]
  • Administrator
iTunes tags gone after Replaygain
Reply #14
> I say that whoever publishes first is the real "winner" here.

No, the winner is who has the greater % of tagged files at any time, Apple are the clear winner right this second.

Here is my take on it:

>iTunes-style metadata "moov.udta.meta.ilst.XXXX" utf8, 'data' child carries the tag

Apple do themselves no favours by not publishing documents, the universe revolves around Apple no?

>3GPP-style assets "moov.udta.XXXX" very much like QT tags, but a

These files are supposed to end .3gp, or .3gp2, no conflics there.

>ID32-style tags that were recently added; aims to incorporate id3v2.x tags

Super idea...<sigh>

>f2k-style tags - "moov.udta.tags" which you have to to ask Nero about

Ok I am hearing you "such as the ability to work with metadata on a per-chapter level.", so you have a file that is tagged by Nero (with both tags, for compatibility), then it is imported into iTunes and the tags altered, now you have a file with two different tags, great!

Why not extend the iTunes tag from within, ie chapter 1 is always the iTunes tag, chapter 2, etc can be anything - new atoms, does not matter.

Too much unilateral action being taken, it is turning into a debacle which will only damage the mp4 perception, or the perception of programs working on those files…

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
iTunes tags gone after Replaygain
Reply #15
[deleted]
  • Last Edit: 27 August, 2015, 03:11:15 PM by TrNSZ

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
iTunes tags gone after Replaygain
Reply #16
[deleted]
  • Last Edit: 27 August, 2015, 03:12:01 PM by TrNSZ

  • menno
  • [*][*][*][*][*]
  • Developer (Donating)
iTunes tags gone after Replaygain
Reply #17
What's the problem with just skipping the "tags" atom? Is AP trying to parse the "tags" atom for more child atoms? That is just plain wrong.

  • MelOFlow
  • [*]
iTunes tags gone after Replaygain
Reply #18
Oh, I see you have posted lines finally, so I know you can do it. They weren't the ones that NULLs out the contents of your atom like you claim, but at least you muddled through it. It's futile - it doesn't happen.

So, if you look in the hex you posted, at location 0x0b7b (or there abouts), search for the word 'tags' there. That's a highly stylized NULL - why, it seems to spell out "Nero AAC codec / May 1 2006". If it wasn't nulled out, and was sitting there all the time, that would mean the problem would be elsewhere. You should use a hex editor with a search feature - you would find thing a WHOLE lot faster.

If you feel your implementation should be not be criticized, then you should play by the rules as spelled out in the specification. I quote:

Code: [Select]
Type fields not defined here are reserved. Private extensions shall be achieved through the uuid type.


tnrsz: if you have a problem with that, the address your concerns  through mp4ra.org I imagine so you can register your atom(s) when there. I'm sure unglamorous comments would be removed once you accommodated the 2 sentences above. fyi: a "field type" is the atom name - as in 'tags'. If you have a problem with Apple, take it to Apple. They can be reached at connect.apple.com. I don't represent them - your issues with 'ilst' rest with Apple.

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
iTunes tags gone after Replaygain
Reply #19
[deleted]
  • Last Edit: 27 August, 2015, 03:12:26 PM by TrNSZ

  • menno
  • [*][*][*][*][*]
  • Developer (Donating)
iTunes tags gone after Replaygain
Reply #20
AtomicParsley.cpp line 2127:
Code: [Select]
                    } else if ( strncmp(atom, "tags", 4) == 0 ) { //oh dear, we have foobar2000's prison-rape tags; thick white gelatinous goo oozes out of this atom

                        if (!scan_for_tree_ONLY) { //latch onto scan_for_tree_ONLY as it signals whether we are *really* writing or just getting the tree.
                            
                            jump += dataSize;
                        } else { //we'll just be *showing* the tree, no harm in showing what foobar does to the files...
                            if ( APar_TestforChildAtom(data, dataSize, atom) ) {
                                jump += 8;
                            } else {
                                jump += dataSize;
                            }
                        }


When scanning the tree you try to scan the "tags" atom for child atoms. There are no child atoms in the "tags" atom.

  • TrNSZ
  • [*][*][*][*][*]
  • Developer
iTunes tags gone after Replaygain
Reply #21
[deleted]
  • Last Edit: 27 August, 2015, 03:12:36 PM by TrNSZ

  • menno
  • [*][*][*][*][*]
  • Developer (Donating)
iTunes tags gone after Replaygain
Reply #22
Code: [Select]
//we'll just be *showing* the tree, no harm in showing what foobar does to the files...


Funny, in older versions of AtomicParsley.cpp it also scans when not just showing the tree.

  • MelOFlow
  • [*]
iTunes tags gone after Replaygain
Reply #23
Which AP version are you using? I don't know what version created your file. I don't believe the new one does whatever you think it does. Lemme know if it does and I will endeavor to get it accommodated.

  • menno
  • [*][*][*][*][*]
  • Developer (Donating)
iTunes tags gone after Replaygain
Reply #24
I looked at 0.8: scans everything for child atoms

I looked at 0.8.8: only scans child atoms in "tags" when showing the tree

You should never scan for child atoms in ANY atom you don't know. Simple as that. Teach your parser all the atoms in the spec, and teach it which ones have child atoms, then you can try to scan the whole tree (but still skip the ones you don't know).
It would also be pretty nice if you could remove all the stupid comments from your code.
  • Last Edit: 26 May, 2006, 04:32:43 PM by menno