Editing more than 10 000 Flac files' tags simultaneously [solved]

Hey there folks,

i am currently ripping my CD collection to flac. However, there are some spelling mistakes embedded in the flac files and personal information additionally stored (why ever windows does that…).

What I now want to do is:
Read the directory the music is stored, and for all files that have these issues,

  • fix the spelling mistake

  • delete the personal information

  • and best do not corrupt the files -> they still should be playable afterwards :slight_smile:

Note : part 2 can be done via right click on each file. But that wouldn’t be fun to do with that much music.

Is there anybody who already have dealt with this problem?
Does anybody have some recommendation for any tools that can handle this job?
(I can use both Windows and Mac Software)

Thanks in advance guys.

metaflac is what I used for bulk changes. It’s part of the flac package. I used it on Linux/ Ubuntu but I think there is a Windows version with the utilities. It’s command line, but ideal for batch changes.

As ever, I would recommend backing up your files before doing anything.

https://xiph.org/flac/documentation_tools_metaflac.html

https://www.mp3tag.de/en/index.html

I have used mp3tag on up to 500 files at a time. It is quick enough provided the files are on the same disc. If they are on a NAS it will take much longer. I would advise doing this in batches and as already mentioned, make sure you have a solid backup before starting.

I am intrigued by your claim around personal information in the tags. What did you use to do the ripping and the tagging and what type of personal information ended up in the files?

I did rip them with EAC on my (old) Windows notebook. When opening a file’s information via a right-click, it shows a tag which says: ENCODER=EAC on *******,
where the stars mark the name of the user account.

I don’t know where this comes from - though I remember when setting up EAC, I did some try-and-error to find out what this specific button does. Maybe I messed something up along the way?

(Reinstalling currently is no option, independent from this point, everything works fine)

Currently trying this out. Really nice tool, does exactly what I want, testing it on single files so far.

How do I pass more than one file to it, without copying each into the terminal? (best would be a whole directory)

Using metaflac you can do the whole lot much quicker:

metaflac --remove-tag=ENCODER *.flac

However, I’m pretty sure this will only work in the current folder, so you will need to do something like this in Windows:

for /R <PATH_TO_FILES> %%G in (*.flac) do metaflac --remove-tag=ENCODER “%%G”

… and for MacOS or Linux use:

find <PATH_TO_FILES>* -name “*.flac” -exec metaflac --remove-tag=ENCODER {} ;

Don’t forget to test on a small group first.

Edit: If you want to preserve times use --preserve-modtime. Also, it will use padding to replace the tag; this is quick.

2 Likes

Working like a charm within a singe directory.
When I am doing this on my Mac terminal:

find /Users/USERNAME/Music/The\ Lumineers* -name “*.flac” -exec metaflac --remove-tag=ENCODER{};

I get this error: find: -exec: no terminating “;” or “+”

Am I missing something? Or running it in the wrong place?

You’re missing the last slash: find /Users/USERNAME/Music/The\ Lumineers/* …

With this amendment:

find /Users/USERNAME/Music/The\ Lumineers/* -name “*.flac” -exec metaflac --remove-tag=ENCODER{};

I still get the same error.

Sorry, should have used pre-formatted text:

find /Users/USERNAME/Music/The\ Lumineers/* -name “*.flac” -exec metaflac --remove-tag=ENCODER{} \;

1 Like

On my Mac this does not work, says metaflac can’t be used in a pipe.

Trying it with for loops in the bash does yield results.
For anybody wanting to try I on their own, here is the code. Might be adapted for your purpose:

Run this command before using the main command: IFS=$'\n'; set -f

for file in $(find ~/PARENTFOLDER -name '*.flac'); do metaflac --remove-tag=ENCODER $file; done

and run this command afterwards: unset IFS; set +f

Thanks for your help. Runs incredibly fast on the mere 1000 files in my test category. At most 2 seconds.

1 Like

Not sure if you solved this yet.

I can attest that on the mac the program ‘Metadatics’ does a great job manipulating large numbers of files all at once. I tried a few different programs, this one had no issues with 10000s of files at once.

It is available in the app store.

Stu

I checked out the programm you suggested.
Albeit it has a nice UI, I think I will stay with the metaflac command line tools.

Question is solved, topic can be marked as “Solved” and be closed.