tehƧP@ƦKly�ANK� -Ⅲ�
11-08-2015, 06:54 PM
Disclaimer: This can be seen for beginners or intermediate Windows users.
At your own discretion. I put warnings where things might cripple your comptuer so becareful.
You assume your own responsibility when it comes to dealing with system filepaths and the like.
Also, this is assuming that your operating system uses American English for it's default language.
Using unicode characters might create problems with the batch scripting. Or not. I'm not sure.
The simpler the better when it comes to running CMD commands.



This is only for files before whatever year iTunes changed their whole format.
If the purchase was a long time ago, just re-download it again and the email should be a part of the META data.
Your real name will still be in the binary data of the file.

Which I'm sure the MPAA will like to catalogue. :)
Or lawyers, or whatever kids are getting into these days.



iTunes stores AAC music in .m4a containers.
It stores lossless ALAC in .m4a containters, too.
Might even store more than those formats .m4a containers. :noonecares: We only care about AAC and ALAC inside .m4a containers.

iTunes purchases store your name and email, not just in the meta data, but the file itself (binary).
You can open the .m4a files and see the name and email near the beginning of the file quite easily.
It's the full email, too.
Some might be concerned, some might not care.

FFMPEG has been updated to handle a completely clean copy of the original file without losing quality and leaving out privacy data.
Before, you had to use several tools to achieve this.
But after a lot of searching, I found that ffmpeg can do it alone.

And it does, I tested it out with my share of Fantastic Four (2015) AAC release.



You Need:

0) Windows (x86 or x64)
1) ffmpeg
2) .m4a files (aac; it should work on ALAC but ALAC is no real security concern as iTunes doesn't sell ALAC)
3) A little know how of using the Command Prompt (CMD) / console window (that black box window you type things in)



0) I'm sure that ffmpeg is available for MAC and linux. But I don't know how to use those on those OS'es.
Windows x86 or Windows x64 will work the same. Just x64 should be faster if you have a 64 bit operating system.




1) Grab latest version of ffmpeg here:
(these are nightlies; these versions will change every day, or sometimes a few days will go by)

http://ffmpeg.zeranoe.com/builds/
I use that site for ffmpeg with no GUI or anything.

There are front-ends/GUI's/All-In-Ones(AIO) that have ffmpeg with them. they should work just as well. Assuming they have been updated this year (and not 2009 or anything really old; even latest update of 2013 might be pushing it).
You can check VideoHelp for a list of tools that use FFMPEG. No reason to pay for any. Best would be to find a freeware tool.

http://www.videohelp.com/software?toolsearch=ffmpeg&submit=Search&portable=&s=&orderby=UpdatedVersion&hits=50p

After you download, don't forget to right-click on the archive first and "unblock" it from the Properties page.

You don't want to keep having to confirm that you launched ffmpeg and want it to launch.

Default Windows settings will block any file you download, regardless of where you get it or how much you trust it.

Those with their security settings changed, don't have to worry.
Those who think things shouldn't be tampered with, let someone else do it for you.

Here's some reading on the whole file security when you download a file from the internet.
http://www.sevenforums.com/tutorials/124367-open-file-security-warning-unblock-file.html
Entirely based on your current Windows settings. Will be different for others.
Might have to search for your OS version: Windows XP, Windows 8, etc.


You'll want to extract to this to any folder you want to frequently use.
Something like:

C:\Bin\ffmpeg\

Optionally, you can add that new fffmpeg directory to the system path.

This when you open the CMD ("Windows key" & "R" to open "Run" dialogue box, then type "cmd" then hit "Enter" key to launch the Command Prompt), you don't need to type the full path of ffmpeg ("C:\Bin\ffmpeg\ffmpeg.exe" and can just plain "ffmpeg" to type as the program is in the system path you added)

This is not easier for beginners. But it's incredibly helpful.
Some reading here of what to do.
BE CAREFUL! If you hit the wrong buttons or remove the wrong things, you can ruin how your computer works.
Really think it over before committing to this if you don't know what you're doing.
http://www.computerhope.com/issues/ch000549.htm





2) the originals. Make sure you use separate directories. Create the target directory beforehand. Reduce chances of overwriting the originals so you have backups.



3) Now it's just a matter of opening the CMD.
If you're using a GUI or something, it's just a matter of figuring out how to do it from there... which I don't know. All front-ends/GUIs are different.

This is the command you will need to copy the AAC to a new file.
It will copy the audio (without transcoding) and keep all current metadata except sensitive info like your name and email.


"ffmpeg.exe" -i "source.m4a" -vn -c:a copy "output.m4a"
Change "ffmpeg.exe" to the full path of wherever you put the ffmpeg executable. (eg: "C:\Bin\ffmpeg\ffmpeg.exe")
Unless you added the ffmpeg directory to the system path, then you only need "ffmpeg" as Windows will add .exe once it finds it in the designated directory.
Change "source" and "output" to what is needed.
Keep all the quotes where they are, they will be needed if any of the filepaths include spaces in them. Most will include spaces.

Run that command through the CMD window and you can watch it run the process.
It should be quick. And at the bottom of the window, you should see the progress has completed successfully.
You can open the new file in any hex editor and search for your name and email but you shouldn't find it.



A batch script to do a whole directory of aac files.
More advanced use. But way faster than doing it manually.


Create a file called:
(or create a new text file and rename it all, including the extension so there is no ".txt" in it)

itunes_copy.bat
Or something. Make sure no spaces! Quotes cannot be used in file names.
Keep it simple, don't use a lot of special characters, even if they are valid for filenames.
You can even call it "a.bat" if you want.

Right-click and edit it with a notepad. Windows default is fine enough.
Add:

@echo off
%~dp1
cd %~dp1
SET destfolder=C:\Bin\iTunes\Output_Copy
FOR %%A IN (*.m4a) DO "ffmpeg" -i "%%~nxA" -vn -c:a copy "%destfolder%\%%~nA.m4a"
Whatever you put for "SET destfolder=", you must have that folder created first!
For "SET destfolder=", no need to use quotes there. But it helps if you don't use quotes or any special characters.
Once the batch job is complete, change the folder name to whatever you want.

Again, for "ffmpeg", change it to wherever you extracted ffmpeg.exe.

Now drag and drop that .bat file into the folder with all the iTunes original files.
Double click it, don't do anything, wait for the black box to disappear (may take up to 10 minutes).
After that, double-check all the files. Rename, retag, whatever.

DONE!

Simple as that.

Set it up once, do it once and don't worry after that.
Hardest part is setting it up.
After that, you just need to do the process part over again for next purchase.

Maybe update ffmpeg once a month or so.
If you read through the update logs, some of them have very critical security fixes in them.
Or other things. It's up to you.
Don't use anything older than 2015. FFMPEG from 1997 won't cut it.



A note on speed:

Depending on your PC rig, these factors will affect your speed for the process:
CPU (cores, speed, etc)
if you're using an HDD (Hard Disk Drive; slow) or SSD (Solid Disk Drive; extremely fast)
externals via USB (USB 2.0 is slower than USB 3.0)
Perception of time




That's relatively the easiet I can do that with what I do/know.
Since I don't use any GUI's or front-ends, this is what i know.
GUI's and Front-Ends all are made differently and do not have the same options.
But, they should have an option somewhere to add custom commands, since ffmpeg has thousands of things you can do with it.



Updated:
Email is easily removed with capable editors (Foobar2000 can read 'iTunes' meta tags).
Real name still attached to files on binary level (use any hex editor to find person's name)

PonyoBellanote
11-08-2015, 08:26 PM
Okay, dude, this seems like the best way to completely rid my data out of the AAC, but.. it's way too over complicated and I'm too clumsy with these things, isn't there really an easier version, probably with a GUI?

tehƧP@ƦKly�ANK� -Ⅲ�
11-08-2015, 08:28 PM
I'll look at one or two GUI's.

there's still the mega eac3to thread I want to do.
And that one has a GUI i know of.

Exarch13
11-16-2015, 01:24 AM
Also to wipe meta data on M4a and AAC files (or most really) you can run them through the AAC creator tool in iTunes and iTunes will choose the meta of the new file over the old. However in the last iTunes update I have been having an issue where iTunes will keep both AAC files (for example) forcing you to delete the old so it can find the new. In some cases you actually need to delete the files and then do a restore from the recycle bin and then your new AAC are fine and clear.
If anyone has a better way, I am happy to use it! :)

tehƧP@ƦKly�ANK� -Ⅲ�
11-16-2015, 07:56 PM
This doesn't just wipe meta data.

If you open an iTunes purchase with any hex editor, you can search for the purchaser's name.
That isn't part of the meta data.
It's in there on a binary level of the file.

FFMPEG will wipe all without transcoding.

Using iTunes will transcode the audio for a second time, when it's already lossy.
So you lose quality a second time.