Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Tag Sanitizer component (Read 15320 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Tag Sanitizer component

https://www.foobar2000.org/components/view/foo_sanitizer

Removes excessive or otherwise unwanted tags from your music files.

Use with caution, always make a backup of your files first.

Usage: Select one or more files to operate on, right click, choose Tagging / Sanitize tags...

For best results, make sure you're running foobar2000 1.3.15 or newer before using this component, as version 1.3.15 introduces MP4 tag manipulation improvements meant specifically for Tag Sanitizer use.

[edit] it's "Tagging" not "Utilities", thanks to jazzthieve for pointing out
[edit] added note about 1.3.15
Microsoft Windows: We can't script here, this is bat country.

Re: Tag Sanitizer component

Reply #1
I found it under tagging - sanitize tags instead of utilities - sanitize tags.

Re: Tag Sanitizer component

Reply #2
Foobar has really needed something like this. I've always had to use MP3Tag or another utility to get rid of extraneous tags, which has been a big pet peeve.

However this component still does not seem to do the job.

I just tried a test case on some sloppy files and it did not remove
COMMENT ITUNNORM
COMMENT ITUNPGAP
COMMENT ITUNSMPB
COMMENT ITUNES_CDDB_IDS

Why exactly can't Foobar simply display **all** existing Tags via Properties dialog? It would be far easier to delete them from there.

Here is a sample based on tags I haven't cleaned [MP3Tag (93) vs FB (80)]:




Re: Tag Sanitizer component

Reply #3
Note that the component doesn't touch files by itself but tells relevant file format handler to perform a tag nuke cycle.
If some fields don't go away, it's the decoders that need updating not the component.

As for iTunSMPB, we cannot remove it as it holds gapless info. iTunNORM holds SoundCheck (ReplayGain equivalent). I'll check about the other fields.
Microsoft Windows: We can't script here, this is bat country.

Re: Tag Sanitizer component

Reply #4
As for iTunSMPB, we cannot remove it as it holds gapless info. iTunNORM holds SoundCheck (ReplayGain equivalent). I'll check about the other fields.

I understand that FB will map certain tags, however I would expect the "nuke tags" option to kill those custom tags along with other gapless/RG/... if they were not calculated by FB.

e.g. I've used FB for all of my replaygain info, so I want to ensure consistency in all my tags by using the same "converters/calculators".

also RE: Why exactly can't Foobar simply display **all** existing Tags via Properties dialog?
Sorry, my lightbulb finally went on and I realized that the tags need to be coded in FB parsing before they can be displayed - hopefully the images above help identify some discrepancies.

Re: Tag Sanitizer component

Reply #5
I am not sure if i understand the component: What fields are removed?

Re: Tag Sanitizer component

Reply #6
You see this dialog before it runs...


Re: Tag Sanitizer component

Reply #7
Regarding MP4 fields-
Everything works exactly as intended.
For optimal performance you want to upgrade foobar2000 to version 1.3.15 which contains latest & greatest MP4 tag manipulation fixes - hence the release of this component right after 1.3.15 stable came out.

I'll update the component description to mention this.

Also, no, we're not going to remove iTunSMPB, it would make the file impossible to decode correctly it cannot be trivially recreated.
Microsoft Windows: We can't script here, this is bat country.

Re: Tag Sanitizer component

Reply #8
Is this different than manually deleting fields in the properties dialog?
I'm late

Re: Tag Sanitizer component

Reply #9
This would be great for the transcoding (conversion) options. Often wanted to only retain certain tags in the output during the operation. Problem is the output in my case isn't monitored by fb2k, since it's not intended for the main library, so it's a longer process to strip the tags.

Re: Tag Sanitizer component

Reply #10
Is this different than manually deleting fields in the properties dialog?
Yes, this removes fields that the properties dialog doesn't show. If you for example examine iTunes purchase run through this you should see how much extra data was wiped.

This would be great for the transcoding (conversion) options. Often wanted to only retain certain tags in the output during the operation. Problem is the output in my case isn't monitored by fb2k, since it's not intended for the main library, so it's a longer process to strip the tags.
You can hit Ctrl-A in the converter output dialog to select all files and run the command that way.

Re: Tag Sanitizer component

Reply #11
Is it true that fb2k can read "everything" APE, ID3 and Vorbis, right? So for those tag types, this is no different than using the Properties, is that true? (Or does it delete info tags as well for those, cf. the last item below? Forgot to check, editing ... )

* A feature request: Import exceptions tag list from library. Meaning, click to auto-populate the list of exceptions with the tags that fb2k see in the library files.

* Another: if front cover present, export it to <filename>.jpg (or more accurately, <filename>.<fileextension> in the same directory) prior to deleting.

* A quirk: It seems that if I have the Explorer window with the directory open, then Explorer starts updating itself and reading the tags, and I do often get the error message that the file is already in use. I cannot tell for sure that this is the cause.

* So it seems that for some .m4a files, fb2k can read the tool tag (AtomicParsley: "©too") and display it under %__tool%; others it cannot.  No way to tell the difference with AtomicParsley, which when I tested, reports for both files
Atom "©too" contains: iTunes v5.0.0.35, QuickTime 7.0.2
That arguably defeats the purpose of what I was going to post as a wishlist item:
Also keep info tags. (Listing __tool or tool does not help.)

Re: Tag Sanitizer component

Reply #12
By the way, is "pgap" atom that COMMENT ITUNPGAP? If so, then fb2k cannot always find it. And maybe it is needed if "true"? (Having given Apple the middle finger long time ago, I only have a very few iTunes encodes and cannot find anything with a pgap other than "false" in my library.)

Re: Tag Sanitizer component

Reply #13
Played around with it a bit, and found this, which could possibly be an issue for gapless playback, I do not know (I never found it in anything where I have more than a single track).  This one had Tool: iTunes 9.1.1.11, QuickTime 7.6.6, and sanitizing tags seemingly made it half a second longer:

Code: [Select]
Length mismatch : 5:33.553197 vs 5:33.601088, 14709696 vs 14711808 samples.
Compared 14709696 samples, discarded last 2112 samples from the longer file.
Differences found within the compared range: 29368448 values, starting at 0:00.346848, peak: 2.0140601 at 3:05.184921, 2ch
Detected offset as 2112 samples.

Comparing again with corrected offset...
Compared 14707584 samples, with offset of 2112 discarding last/first samples from total of 14709696.
No differences in decoded data found within the compared range.

Re: Tag Sanitizer component

Reply #14
Check the ITUNSMPB values with mp3tag before and after?? I have no problems with any of my AAC files.

edit: assuming they actually are AAC files based on tool you mention???

Re: Tag Sanitizer component

Reply #15
No ITUNSMPB before nor after.
I think I have found a suspect, an atom called "chpl" that is unknown to AtomicParsley, but google brought me to https://www.adobe.com/content/dam/Adobe/en/devnet/flv/pdfs/video_file_format_spec_v10.pdf (and to https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2014-August/080079.html ).

Comparing output using the -T + command, there are two atoms removed: @too and the chpl. From the original:
                Atom ©too @ 61297 of size: 56, ends @ 61353
                    Atom data @ 61305 of size: 48, ends @ 61353

This is inside the ilst atom inside the meta atom inside the udta atom inside mov atom.
Then a couple of lines below in the output:
        Atom chpl @ 495169 of size: 58, ends @ 495227 ~
This is inside the udta atom inside the mov atom - not in the ilist though.
Finally, the line
~ denotes an unknown atom
is gone when sanitizing. Not so strange.

(Also, some atoms are reduced in size and the atoms after the removed ones are relocated).

AtomicParsley with -t + reports just one of these in the original: the line
Atom "©too" contains: iTunes 9.1.1.11, QuickTime 7.6.6
is gone from the sanitized.


In case it is of any interest: if I use ffmpeg with -acodec copy -vn (the -vn removes the album art) then the chpl atom stays in, but AtomicParsley reports a tiny length difference: 333.601 becomes 333.602. But fb2k does not see any difference. And reports yet another length, 5:33.553.

Re: Tag Sanitizer component

Reply #16
Chapters are the Nero specification for encoding gapless information in MP4 files.

 

Re: Tag Sanitizer component

Reply #17
... and thus, should not be sanitized away, I guess?

(I actually prefer gapless information to stay in a tag that fb2k's "Properties" dialogue does not delete, rather than as COMMENT ITUNES BLAHBLAHBLAH - but I have no idea what applications support what.)

Re: Tag Sanitizer component

Reply #18
Thank you, Thank you Thank you.  I've been looking for something to remove the purchase tags for a while.  Worked great for me on the first try!

Re: Tag Sanitizer component

Reply #19
why the plugin created to clean up a littered file to FLAGS DCP??? me I'm very angry

Re: Tag Sanitizer component

Reply #20
Is it true that fb2k can read "everything" APE, ID3 and Vorbis, right? So for those tag types, this is no different than using the Properties, is that true? (Or does it delete info tags as well for those, cf. the last item below? Forgot to check, editing ... )]
There are a number of tags that are specifically coded to not be shown in the Properties page, with absolutely no way to make them visible. I have no idea why there's no way to see them or why it's such a state secret about exactly which tags, though album art and replay gain are definitely included. The only way to manipulate those hidden tags is a special component or a 3rd party program.

Re: Tag Sanitizer component

Reply #21
why the plugin created to clean up a littered file to FLAGS DCP??? me I'm very angry
What are you asking? I certainly don't understand what the question is.

Is it true that fb2k can read "everything" APE, ID3 and Vorbis, right? So for those tag types, this is no different than using the Properties, is that true? (Or does it delete info tags as well for those, cf. the last item below? Forgot to check, editing ... )]
There are a number of tags that are specifically coded to not be shown in the Properties page, with absolutely no way to make them visible. I have no idea why there's no way to see them or why it's such a state secret about exactly which tags, though album art and replay gain are definitely included. The only way to manipulate those hidden tags is a special component or a 3rd party program.
Special tags such as file sample lengths or gapless info are hidden to prevent people from breaking their files. Unsupported tags like ID3v2 rating that require special handling are hidden. ReplayGain is not shown together with your typical text-based tags because it isn't similar to those. Regular tags can contain anything user wishes and have no syntax to follow. ReplayGain tags have very specific rules. And the RG info isn't stored in tags with all formats.

Re: Tag Sanitizer component

Reply #22
Played a bit with it on my recently updated system. Every now and then it gives the error that file is in use. And then every now and then it wipes tags.

I have foo_external_tags installed, but took care not to test on files with external tags.

* A feature request: Import exceptions tag list from library. Meaning, click to auto-populate the list of exceptions with the tags that fb2k see in the library files.
Or a checkbox. Or even: a checkbox with "keep fb2k-displayable tags". Sanitize away what I cannot use.

Re: Tag Sanitizer component

Reply #23
Since this component was updated the last month, I post here.

I'd like to say, that it looks very 1990 ;-)

I like retro, but
it would be useful and more convenient to have a resizable (at least in length) window, for ppl who want to keep more than 10 tags and dont want so scroll throgh a single comma seperated row with tiny text.

Even more convenient, if there were checkboxes for each usergiven tag, where we can en-/disable several tags and do not need to delete/restore them for each run. (some ppl may want to delete different tags for flacs, mp3s or apes, etc, so typing all the tags again and again (aka restore them from a saved text-file) is kind of time-wasting. especially with this single smallish line to text.
(we're all getting older and sight may vary 8-)

The import feature (also mentioned in above posts) will be also very handy.

Question:
Will it delete all other embeded imgages than the front cover, when "preserve att. front cover" is checked?

Re: Tag Sanitizer component

Reply #24
I am trying to keep iTunNORM by adding it to the exeption list (tried iTunNORM, itunnorm and ITUNNORM) but Tag Sanitizer still removes it. What am I doing wrong?