HydrogenAudio

Lossy Audio Compression => AAC => AAC - General => Topic started by: Blutarsky on 2013-02-18 13:51:21

Title: Batch remove iTunes tags
Post by: Blutarsky on 2013-02-18 13:51:21
I'd like to remove my personal data (email, etc) stored in my iTunes collections. Data seems to be stored in iTunes extended AAC tags.
Wondering if there's a tool to batch remove/wipe those selected tags.
Title: Batch remove iTunes tags
Post by: Rollin on 2013-02-18 13:53:27
Try Mp3Tag or foobar2000
Title: Batch remove iTunes tags
Post by: Blutarsky on 2013-02-18 13:54:34
Try Mp3Tag or foobar2000


Thanks
Title: Batch remove iTunes tags
Post by: Jplus on 2013-02-18 17:04:42
Or just select all the tracks in iTunes, open the info panel, check the fields that you want to remove and make sure that they're empty, then press "OK".
Title: Batch remove iTunes tags
Post by: db1989 on 2013-02-18 17:48:21
No, because iTunes does not present “personal data (email, etc)” as editable/removable, otherwise the OP would have done that already.

blutarsky: From my experience a couple of years ago, other tagging utilities could remove almost everything, but the email address also seemed to be duplicated elsewhere in the file, as viewable by a hex editor even after the offending frames were removed. I think iTunes could still find it that way, too. Either way, it was there.

I posted about this several times and asked for an explanation or an automated way to remove it besides scrubbing manually in hex, but no one has ever provided any response. Perhaps the situation has changed, but be wary that simply removing tags apparently was/is not a complete solution.
Title: Batch remove iTunes tags
Post by: Blutarsky on 2013-02-18 17:53:04
Ouch, so it won't be sufficient to remove the tags.... correct?
Title: Batch remove iTunes tags
Post by: db1989 on 2013-02-18 18:04:56
Not in my experience. You should, of course, try it for yourself.
Title: Batch remove iTunes tags
Post by: Blutarsky on 2013-02-18 18:13:20
I see some other articles on the internet about using a hex editor to achieve this, as you heve pointed out! Crazy!
Title: Batch remove iTunes tags
Post by: sluggy on 2013-02-18 19:39:22
Have a look for a free program called iTMS Scrubber 2.3

This is a little tool to remove personal information from iTunes Music Store files. It uses AtomicParsley to remove all account-related atoms from your files.

Simply extract the contents to a folder, copy in the album files you want to de-personalise (don't use your originals!) and run itms-scrubber. It will also extract the album art to a folder.jpg.
Title: Batch remove iTunes tags
Post by: db1989 on 2013-02-18 20:42:29
It uses AtomicParsley to remove all account-related atoms from your files.
Does it also remove the email address embedded elsewhere in the file, which we’ve just been talking about for four posts?
Title: Batch remove iTunes tags
Post by: sluggy on 2013-02-18 20:55:56
It uses AtomicParsley to remove all account-related atoms from your files.
Does it also remove the email address embedded elsewhere in the file, which we’ve just been talking about for four posts?


When i used it in the past i have not been able to find any personal info left in the files, give it a try its really quick, sites which share iTunes plus albums use it so im sure it would delete everything 
Title: Batch remove iTunes tags
Post by: db1989 on 2013-02-18 21:19:50
sites which share iTunes plus albums use it
Objection: relevance. Why should the fact that an illegal file-sharer uses it be an indication that it’s good? At the very least, that doesn’t make it any more likely to resolve or not resolve the issue of the remaining embedded email address.

I won’t be trying it because I don’t currently care enough about that information being in my files.* If you’re going to recommend something to someone with the implication that it fulfils a specific purpose, it’s not very useful to then tell that person to test for themselves whether or not it actually works. I’m not being argumentative for the sake of it; I suppose the OP will have to try it out.

* And I never wanted to delete it for the sake of sharing my files with anyone: it was just a matter of personal preference, perhaps strange but whatever.
Title: Batch remove iTunes tags
Post by: Jplus on 2013-02-18 22:27:27
No, because iTunes does not present “personal data (email, etc)” as editable/removable, otherwise the OP would have done that already.

blutarsky: From my experience a couple of years ago, other tagging utilities could remove almost everything, but the email address also seemed to be duplicated elsewhere in the file, as viewable by a hex editor even after the offending frames were removed. I think iTunes could still find it that way, too. Either way, it was there.

I posted about this several times and asked for an explanation or an automated way to remove it besides scrubbing manually in hex, but no one has ever provided any response. Perhaps the situation has changed, but be wary that simply removing tags apparently was/is not a complete solution.

My apologies for not reading the question carefully enough before posting my first reply.

I don't know any tools that do this for you, but if it's really something that can be scrubbed out manually with a hex editor then it should be relatively easy to automate with a small home-written program. That might be a big timesaver if you need to anonymize a lot of files. With some luck you might be able to find somebody willing to write the program for you for a very small compensation, or even for free.

Of course, if iTMS Scrubber or some other application turns out to be a ready solution that would be better still.
Title: Batch remove iTunes tags
Post by: RobertoDomenico on 2013-02-19 01:34:57
If you're using OS X there are many ways to remove the personal data on Windows though this is the only solution i have come across hope it helps. iTunes Remove Personal Data (http://henrik08.wordpress.com/2011/04/29/how-to-easily-remove-your-personal-information-from-media-files-purchased-from-itunes/)
Title: Batch remove iTunes tags
Post by: sluggy on 2013-02-19 09:07:26
sites which share iTunes plus albums use it
Objection: relevance. Why should the fact that an illegal file-sharer uses it be an indication that it’s good? At the very least, that doesn’t make it any more likely to resolve or not resolve the issue of the remaining embedded email address.

I won’t be trying it because I don’t currently care enough about that information being in my files.* If you’re going to recommend something to someone with the implication that it fulfils a specific purpose, it’s not very useful to then tell that person to test for themselves whether or not it actually works. I’m not being argumentative for the sake of it; I suppose the OP will have to try it out.

* And I never wanted to delete it for the sake of sharing my files with anyone: it was just a matter of personal preference, perhaps strange but whatever.


I recomended it because from what i can see from my experience using it deleted all personal info like i said, i have not used a hex editor before, but i do know that after using the program i was not able to see any purchase date or email when using the file in itunes.
Title: Batch remove iTunes tags
Post by: Porcus on 2013-02-19 10:00:23
You could potentially pay a dollar for a check: buy the same track from two different accounts, run the utility and then diff?

(What about the following test: take those two tracks, run ffmpeg -acodec copy over to filename.aac and then diff?)
Title: Batch remove iTunes tags
Post by: cyberdux on 2013-02-20 01:07:22
I'd like to remove my personal data (email, etc) stored in my iTunes collections. Data seems to be stored in iTunes extended AAC tags.
Wondering if there's a tool to batch remove/wipe those selected tags.


I also would like to do this for the following reason:

After iTunes 11 and Cloud, any custom tagging (e.g. genre, album artist, sort fields) is overwritten resulting in a lack of library integrity.

It also appears that iTunes communicates with the store when copying my albums onto my iPod and uses the store tagging, once again resulting in lost integrity of my library filing structure. Very annoying.

I deleted my personal data using mp3 Tag extended fields option but I am interested in total removal of personal details from my purchases for the above reason - library integrity.
Title: Batch remove iTunes tags
Post by: db1989 on 2013-02-20 09:25:19
After iTunes 11 and Cloud, any custom tagging (e.g. genre, album artist, sort fields) is overwritten resulting in a lack of library integrity.

It also appears that iTunes communicates with the store when copying my albums onto my iPod and uses the store tagging, once again resulting in lost integrity of my library filing structure.
Wow. And I thought the new version of iTunes was bad enough simply on the basis of its scrambled UI. To hear that it actually intrudes upon users’ intent is on another level. I’m glad that I only use it to transfer files. This is evidence not only that Apple continues its downhill progression but also that I should avoid anything computer-related that has the word cloud anywhere near it.
Title: Batch remove iTunes tags
Post by: cyberdux on 2013-02-20 09:37:48
After iTunes 11 and Cloud, any custom tagging (e.g. genre, album artist, sort fields) is overwritten resulting in a lack of library integrity.

It also appears that iTunes communicates with the store when copying my albums onto my iPod and uses the store tagging, once again resulting in lost integrity of my library filing structure.
Wow. And I thought the new version of iTunes was bad enough simply on the basis of its scrambled UI. To hear that it actually intrudes upon users’ intent is on another level. I’m glad that I only use it to transfer files. This is evidence not only that Apple continues its downhill progression but also that I should avoid anything computer-related that has the word cloud anywhere near it.


Yes, I have, since iTunes 11, decided to only purchase from iTunes what is no longer available on CD or (FLAC via bandcamp, qobuz. etc.) (Amazon mp3 is not available in Australia).

I also did the "Feedback" thing with Apple about the issue but I think I am a lone voice "crying in the wilderness".
Title: Batch remove iTunes tags
Post by: Jplus on 2013-02-20 10:24:01
@cyberdux:
Could you be more specific about iTunes 11 and iCloud? I'm using iTunes 11 but not iCloud and my tags are never modified, not even when I sync to my iPad. This makes me think that the fault is in iCloud only. Since "iTunes in the cloud" does not upload your music but simply notes that you own certain tracks which are available from the store, and then just downloads a fresh copy if you want your music somewhere else, I can imagine it will lose all your custom tags. (Of course it should be possible to upload those data, but the fact that apparently Apple doesn't do that seems like a lack of sophistication rather than malign intent.)

On the other hand, if your problem shows up even when you don't move your music around, that would indicate something else is going on.
Title: Batch remove iTunes tags
Post by: cyberdux on 2013-02-20 19:29:01
@cyberdux:
Could you be more specific about iTunes 11 and iCloud? I'm using iTunes 11 but not iCloud and my tags are never modified, not even when I sync to my iPad. This makes me think that the fault is in iCloud only. Since "iTunes in the cloud" does not upload your music but simply notes that you own certain tracks which are available from the store, and then just downloads a fresh copy if you want your music somewhere else, I can imagine it will lose all your custom tags. (Of course it should be possible to upload those data, but the fact that apparently Apple doesn't do that seems like a lack of sophistication rather than malign intent.)

On the other hand, if your problem shows up even when you don't move your music around, that would indicate something else is going on.

@JPlus

This only occurs with music I have purchased through the iTunes store. Anything I have encoded from my own CD's is fine.

I routinely change the "sort artist" field and "genre" fields on my purchases. I have switched off "show music in the cloud". Randomly, I will find portions of purchased albums revert to store tagging. In addition, if I buy an album and do not like a song and delete it from iTunes, and from the physical drive, it will appear on my iPod if I transfer the album to the iPod. I could, I guess, disconnect from the internet before transferring albums to the iPod, or have an iTunes library just for purchasing and another for listening.

This however is beside the point. There should be no intervention of iTunes or cloud without my permission and I should be able to maintain my iTunes library structure. Further, this impacts my listening in the home because I use Apple TV as streamers and therefore need to use the iTunes library and iTunes sharing.

Having had this experience, there is no way that I will attempt to use iTunes match.

I am certain that this is a cloud-iTunes 11 issue but it seems that we are stuck with it for iTunes purchases. 

Title: Batch remove iTunes tags
Post by: RobertoDomenico on 2013-02-20 22:53:37
iTunes Match will not alter your tags in any way.
Title: Batch remove iTunes tags
Post by: Jplus on 2013-02-21 00:09:07
Ahh, then I probably never noticed because I almost never buy something from the iTMS. Now that I know your story I'm not likely to do it more often either.
Title: Batch remove iTunes tags
Post by: cyberdux on 2013-02-21 08:39:16
Ahh, then I probably never noticed because I almost never buy something from the iTMS. Now that I know your story I'm not likely to do it more often either.

I don't know whether this will help but I have discovered fairly deep in the "view"menu of iTunes the following check boxes which I have unticked:

View:

- iCloud Download

- iCloud Status

- purchase date

I hope my experience with these niggles with iCloud and iTunes are isolated and perhaps due to my strict (pedantic) library structure requirements. I suspect that most people who purchase from iTunes do not care for sort artist, genre, sort album (e.g. soundtracks to the Three Colours movies), track number (if individual tracks bought), compilation and so forth and therefore would not notice this phenomena.

I would imagine that tracks matched by iTunes match would have embedded iTunes metadata, and only those songs that iTunes match cannot find a match for would leave tags unaffected. Here I could be wrong but I suspect not.

(It could well be that Apple are not even aware of this behaviour.)
Title: Batch remove iTunes tags
Post by: gism on 2013-06-11 14:35:09
I'd like to remove my personal data (email, etc) stored in my iTunes collections. Data seems to be stored in iTunes extended AAC tags.
Wondering if there's a tool to batch remove/wipe those selected tags.

This is the best way I found to do so:
http://www.ghacks.net/2009/02/25/how-to-an...e-itunes-songs/ (http://www.ghacks.net/2009/02/25/how-to-anonymize-itunes-songs/)
Title: Batch remove iTunes tags
Post by: gism on 2013-06-11 17:05:44
Also I found this (https://gist.github.com/torque/4361328). Haven't tried myself though.

With AtomicParsley you could try to remove the following atoms:

apID - Apple account (email address)
purd - Purchase date
pinf - Purchase information

The options being:

--manualAtomRemove "moov.udta.meta.ilst.apID"
--manualAtomRemove "moov.udta.meta.ilst.purd"
--DeepScan --manualAtomRemove "moov.trak.mdia.minf.stbl.stsd.mp4a.pinf"
Title: Batch remove iTunes tags
Post by: db1989 on 2013-06-11 17:40:35
While we’re bumping, I didn’t reply to this before:

sites which share iTunes plus albums use it
Objection: relevance. Why should the fact that an illegal file-sharer uses it be an indication that it’s good? At the very least, that doesn’t make it any more likely to resolve or not resolve the issue of the remaining embedded email address.
I recomended it because from what i can see from my experience using it deleted all personal info like i said, i have not used a hex editor before, but i do know that after using the program i was not able to see any purchase date or email when using the file in itunes.

Since the entire point of my third sentence above appears to have been missed, here it is explicitly: In my experience, even after scrubbing the purchase-related atom, the file still contained my address embedded elsewhere, as I found using a hexadecimal editor.

The fact that you can’t see it in iTunes or any other program that reads standard atoms does not mean it’s not still in the file somewhere. That was precisely why I asked whether your recommended scrubbing program tackles the embedded address. Replying only that it does delete the standard metadata-borne address is just repeating yourself and doesn’t answer the question.

As far as I’m aware, no one has provided a utility that also deletes the embedded address. This assumes the iTunes Store still writes it. If so, it would be nice if someone with knowledge of the structure of MP4 could check this and explain where exactly it’s being written.
Title: Batch remove iTunes tags
Post by: Porcus on 2013-06-11 23:30:23
While we're bumping, I still haven't understood why the removal tools cannot be tested by purchasing two files from two different accounts and comparing them after processing?
Title: Batch remove iTunes tags
Post by: db1989 on 2013-06-12 00:16:21
It’s a very good suggestion, which I see you made before, hence your restatement, I presume.  I guess most people are unwilling to invest a second payment merely to test the behaviour of data that they find undesirable. Or am I just generalising from my own stance?

Personally, I think technical information about the location of the embedded email address within the container is more interesting. I would assume, but never rule out any contortion of logic where certain large companies are concerned, that files scrubbed of the relevant atoms would turn out identical with the exception of this embedded address, wherever it is.

Later, when I can get a hold of an illustrative file, I’ll have another look with a hex editor and try to get a better idea of what’s going on. But as I said, I know very little about the lower-level architecture of MP4 as a container (oh, the shame!), so I might not really know what I’m looking at.
Title: Batch remove iTunes tags
Post by: Porcus on 2013-06-12 07:55:00
Well myself I am even unwilling to open a customer relationship to Apple, but to those who did – what's another $0.69 when you have already sold your soul?


To go on with hypothetical uninformed talk: if the email addresses are of different lengths, it is not given that you get identical files upon overwriting. Then OTOH, that means your anonymity is still at risk (what if the vendor throws in so many zeroes that they can be used to differentiate between customers, and put them at a point where most taggers do not overwrite?)

But, again to reiterate my own (still not too informed) suggestion:
(I) ffmpeg'ing out the stream over to another mp4 container,
and then
(II) transferring metadata by way of tagging software which only copies those metadata atoms that it actually understands.  In this case we aren't worried that “my metadata got lost”, we are only interested in the metadata that we are able to actually read for ourselves.
This should be easily scriptable if the tagging software is – and software like mp3tag can copy+paste tags, so one could traverse X:\folderstructure\files.m4a --> Y:\copied\folderstructure\files.m4a, import the former, sorted by path, Ctrl-c, import the latter, sorted by path, Ctrl-v.

(Heck, isn't it even possible to hack this into the fb2k converter menu? :-) )
Title: Batch remove iTunes tags
Post by: Bob Katz on 2013-11-19 14:37:17
I've got a challenge for the programmers here.

First let me set the stage.

Ian Shepherd has discovered some additional factoids about iTunes Sound Check album mode.

http://productionadvice.co.uk/sound-check-album-mode/ (http://productionadvice.co.uk/sound-check-album-mode/)

Here's a summary now about what we know. Since there is no documentation about this feature from Apple, it would be good to get some independent verification. I believe all of the following to be true. (Someone should make an excel matrix incorporating these factoids).

OSX:

In the album tab, Sound Check is in album mode. In the album tab in automatic shuffle mode, Sound Check remains in album mode (I think that's a good thing).

In the artists tab not in shuffle, Sound Check is in album mode. In the artist's tab in automatic shuffle mode Sound Check switches to singles mode, even if it's playing from an album. 

In playlists, Sound Check remains in album mode. I haven't checked automatic shuffle mode in playlist mode. Some exceptions: It may be possible to fool Sound Check if not including the loudest and softest songs on the album in the playlist. Needs more testing.

IOS:

The only time Sound Check album mode is engaged is in album playback. To my knowledge, all other functionality is in singles mode. I think that for portable devices this is probably a good thing.

All of the above needs more testing to confirm.

-------

Now for my challenge to the Hydrogen Audio programming experts! DJs would like to have a Sound Check singles mode for manually-created playlists for "dance parties." According to my testing, the only way to put iTunes into Singles mode when playing playlists is to remove the album name reference from the get info box. And even then it's necessary to restart iTunes to make it work. This is an awkward work around to say the least.

My challenge is to see if an Applescript or an application could be developed that removes all the album references from the iTunes database (or from the AAC tags if that's where it's kept) and restores them after a DJ party, so Sound Check album mode could be restored at will. My personal wish is that if (when?) Apple makes Sound Check a default in iTunes, it adds a few hidden preferences so us geeks could have a field day.  :-).

Good luck. The prize to the winner will be a mention in the next edition of my book!
Title: Batch remove iTunes tags
Post by: mudlord on 2013-12-26 09:46:31
I personally would prefer a small tool that doesnt rely on outside code to remove email address atoms....
Title: Batch remove iTunes tags
Post by: Vietwoojagig on 2013-12-26 10:27:30
There is a Perl script called "anoncp.pl":

Code: [Select]
#!/usr/bin/perl
##
# A N O N C P . P L
#
# a script that takes the unix cp file specification options
#
# perl anoncp.pl source_file target_file
# perl anoncp.pl source_file ... target_directory
#
# which reads the source file(s) and copies them to the
# destination stripped of all the user identification gunk
# that apple adds on iTunes "DRM free" songs
#
# NB: make sure you install the latest version of the
# most excellent Audio::M4P::QuickTime perl module.
##

use strict;
use warnings;

use Carp;
use File::Basename;

use Audio::M4P::QuickTime;

my $usage = q{
usage:
perl anoncp.pl source_file target_file
perl anoncp.pl source_file ... target_directory
};

@ARGV >=2 || croak "not enough files specified", $usage;

my $destDN = pop(@ARGV);
my $destFN = $destDN if (! -d $destDN && @ARGV == 1);

$destDN = dirname($destFN) if( $destFN);

-d $destDN || croak $destDN, ": is not a directory", $usage;
(-r $destDN && -w _) || croak $destDN, ": cannot access ", $usage;

foreach my $m4aFN (@ARGV) {
my $qt = Audio::M4P::QuickTime->new( file => $m4aFN );
$qt->FindAtom("mp4a") || croak "$m4aFN: not a mpeg 4 file\n\t";
$qt->CleanAppleM4aPersonalData(force => 1, zero_free_atoms => 1);
my $toFN = $destFN ? $destFN : $destDN . basename($m4aFN);
$qt->WriteFile($toFN);
}
You have to import the Perl module "Audio::M4P::QuickTime" using CPAN (http://search.cpan.org/~billh/Audio-M4P-0.51/lib/Audio/M4P/QuickTime.pm)

I have done a small AppleScript, that I installed into iTunes: /Users/username/Library/iTunesScripts/Anonymize.
I installed the perl-script here: /usr/local/bin/anoncp.pl
Code: [Select]
global these_files

tell application "iTunes"
if selection is not {} then
set sel to selection
set these_files to {}
with timeout of 30000 seconds
repeat with this_track in sel
if class of this_track is file track then
set end of these_files to quoted form of POSIX path of ((get location of this_track) as string)
end if
end repeat
end timeout
if these_files is not {} then
my anonymize()
else
display dialog "Selected tracks cannot be anonymized..." buttons {"Cancel"} default button 1 with icon 2 giving up after 15
end if
else
display dialog "No tracks selected..." buttons {"Cancel"} default button 1 with icon 2 giving up after 15
end if
end tell

to anonymize()
tell application "iTunes" to activate

with timeout of 30000 seconds
set the_files to ""
repeat with a_file in these_files
do shell script "/usr/local/bin/anoncp.pl " & a_file & " " & a_file
end repeat
end timeout


end anonymize
Now I can remove the annoying information from the files by selecting them in iTunes and selecting the apple script.
Title: Re: Batch remove iTunes tags
Post by: lolpol on 2017-06-24 20:20:08
Hello,
I also wanted to remove my personal info from audio tracks in iTunes such as the "Purchased by" email, date etc. I tried to do this with AtomicParsley but it encounters multiple issues even iTMS Scrubber faces similar issues.

The post above also does not seem to work for my OS (Windows).

I hope someone can help me.


Thank You
Title: Re: Batch remove iTunes tags
Post by: Porcus on 2017-06-26 16:54:18
A recent tool, foo_sanitizer. Read https://hydrogenaud.io/index.php/topic,113911.0.html - in particular, the developer's warnings.