What is iTunes metadata
Music purchased from the iTunes store can be downloaded as m4a files. These files are encoded MPEG-4.
The files include metadata such as artist, track number, album, and so on, but they also include personally identifiable information, like the name and e-mail of the person who purchased the music. This can be a privacy problem and a technical problem.
In the example below you can see an audio track in iTunes, and to the right, you can see the same track inspected in MediaInfo.
Why should you remove the metadata?
If you try to transfer an audio track purchased from one iPhone to another, the new phone will ask you to enter the Apple ID of the person that originally purchased the music.
If you for some reason don’t have the credentials for the Apple ID, you will not be able to listen to the audio tracks on that Apple device.
How to remove the metadata
I can’t guarantee that this method is completely bulletproof. There is always a chance that the file is fingerprinted at the block level. However, as long as you are not doing anything illegal this method should be enough to be able to transfer the music to another iPhone without having to provide the information from the previous owner or the owner who purchased the music initially.
Instead of trying to remove just the purchase information that prohibits the file from being used on another iPhone, to be on the safe side, this method relies on removing everything except for the audio stream.
1. Install FFmpeg
Here is a guide for downloading and installing FFmpeg on Windows.
2. Extract the audio streams with FFmpeg
Open a Command Prompt window and change the directory to the folder where your music tracks reside.
For example, enter the command cd "C:\Users\Username\Music\iTunes\iTunes Media\Music\Artist\Album"
.
Run the command:
IF NOT EXIST converted (md converted) | for %i in (*.m4a) do ffmpeg -i "%i" -c copy "converted\%~ni.m4a"
This will rewrite the files but it won’t change or touch the audio quality at all. This is why we use -c copy
which stands for copy codec. It only copies the audio stream to a new container, exactly as it is.
3. Use ExifTool to remove metadata
To be on the safe side you can also use ExifTool to remove absolutely all metadata.
cd converted
for %i in (*.m4a) do exiftool -overwrite_original_in_place -all= "%i" "%~ni.m4a"
Note exiftool only works with English letters in the file name.
4. Use MusicBrainz Picard to add the correct metadata
Now that you have removed all metadata the file doesn’t have any information like track number, artist, album name, and so on.
Use MusicBrainz Picard to easily add tags like artist, album, track number, and similar. Or you can use tools like iTunes, Tag&Rename or similar to get edit the metadata manually.
If you inspect the new files in iTunes (or other software) you should be able to see that the user information is gone 😀👍.
I have not actually tried to copy the files to a new phone, so if you ever try I would love to hear from you if it works. I will get back to this post once I am able to confirm it.
Hello! I would like to know how I can edit the buyer’s name of the next marked section of a purchased m4a file. I will leave an image attached “https://i.imgur.com/qLtbXGR.png”
Regards!