I have here thousands of mp3 files that I bought over the last years from amazon.
But I'm feeling not well by the fact that each track has inserted its own ID no.
So I want to remove these, but I won't destroy the mp3 file format.
Here a hexdump excertption from the end of a file.
0023c230 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa 54 |...............T|
0023c240 41 47 45 70 69 6c 6f 67 75 65 00 00 00 00 00 00 |AGEpilogue......|
0023c250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0023c260 44 61 67 6f 62 61 00 00 00 00 00 00 00 00 00 00 |Dagoba..........|
0023c270 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 61 |..............Ta|
0023c280 6c 65 73 20 6f 66 20 74 68 65 20 42 6c 61 63 6b |les of the Black|
0023c290 20 44 61 77 6e 00 00 00 00 00 00 00 32 30 31 35 | Dawn.......2015|
0023c2a0 41 6d 61 7a 6f 6e 2e 63 6f 6d 20 53 6f 6e 67 20 |Amazon.com Song |
0023c2b0 49 44 3a 20 32 35 38 35 36 35 31 30 00 01 4f |ID: 25856510..O|
It supports batch tag-editing of ID3v1, ID3v2.3, ID3v2.4, iTunes MP4, WMA, Vorbis Comments and APE Tags for multiple files at once covering a variety of audio formats.
Replace characters or words Replace strings in tags and filenames (with support for Regular Expressions).
Thanks, but your suggested tag editor supports only Windows and Mac (like almost all tag editors). In my repo I have yet a few tag tools which support batch processing at commando line. But I have not much experience writing nifty scripts on that. I fear that there could easily slip in an error which could compromise all files with one flush. So I want to code the stuff with C or C++, because with it I rather would know what I do.
It came at light to me, that the id3lib could handle also id3 tags at file end. So here a feasible solution that worked at all my files bought at amazon.
try making a copy of a couple and checking 2 things.
first, it may be in a fixed location, so you can just go there and zero (char zero) it out.
second, if its in a flexible location, you can find it (string search the text part) and zero it out that way.
After zeroing out your test files, see if they still work. It should be fine; this is very likely just block of bytes that allow text comments (or anything at all really) to be stuffed into it.
Many sound cards have an option to turn on a sound loop so that musics/noises can be recorded as they play from your computer rather than from an external source. I know the option is not always available, so you'd have to do your own research on your card and what programs you have for your OS to manipulate it.
On linux the option is usually made available in alsamixer (the option is called Loopback) hit F6 to cycle through available sound cards. Turn your internal mic off, turn loopback on and recapture the song in audacity or with ffmpeg's recording device. It feels like this is today's version of creating a "mix tape" as the ancients once did.
Worth a try, since it's pure digital to digital I think you'd end up with a near perfect copy without any of the meta-data.
As for copyright laws, well, most copyright licenses also prohibit the modification of their media, so it's all gray area what you're trying to do. As long as you own an original copy and don't plan to distribute these files (like you're making a backup library for home use) then you're probably fine.
Edit: heh, just noticed you have posted your own answer. Nice code. I'll leave this up since I really like the idea of having a flushed out meta.
Just a note: the loopback recording device (generally labelled "Stereo Mix") listens behind the DAC, right in front of the line-out jack. It records something equivalent to plugging the line-out into the line-in, so it cannot produce a bit-perfect copy of the original stream.