Filtering all mp3 files that are missing a tag

Started by calin, January 28, 2022, 04:29:23 AM

Previous topic - Next topic

calin

Hi,

First of all, a giant thanks to Phil for this tool, and everyone helping in the forums.
I've used exiftool to manage my photo library and find images that didn't have GPS data or the correct date/time, so I am not a complete noob.

But now I'd like to filter my entire mp3 library to find those files that are missing one of the following tags: song, artist, genre. And I haven't done any bulk stuff before.

My library is organised like this:
[music]
   |
   |-- Artist A
   |       |
   |       | -- song_1.mp3
   |       |
   |       | -- song_2.mp3
   |       |
   | -- Artist B
   |       |
   |       | -- song_X.mp3
   |       |
   |       | -- song_Y.mp3
....

I haven't yet used exiftool for bulk searches, so I am not sure where to start.

If you can please give me an example of the command that I need to run in the folder [music] or its parent that will read all the mp3 files inside and print out the names of those missing one specific tag (for example the artist).

Once I have that, I can do the search for each tag, and I can update the tags by hand, because I am sure there are very few files that miss the correct tags.

Thank you.

edit: forgot to mention, I am on a Mac, in case that makes any difference.

Phil Harvey

The command could be something like this:

exiftool -filename -if "not $artist" -r DIR

Or to clean up the output a bit, and add directory names, I would do this:

exiftool -filepath -if "not $artist" -q -s3 -r DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: calin on January 28, 2022, 04:29:23 AMedit: forgot to mention, I am on a Mac, in case that makes any difference.

Use single quotes instead of double quotes in Phil's command.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

FixEUser

Quote from: calin on January 28, 2022, 04:29:23 AM
But now I'd like to filter my entire mp3 library to find those files that are missing one of the following tags: song, artist, genre. And I haven't done any bulk stuff before.

edit: forgot to mention, I am on a Mac, in case that makes any difference.

Maybe you should have a look at a specialized tagging tool like Mp3tag for this task.
There is a native Mac Version too: https://mp3tag.app/

Mp3tag will let you see your missing tags directly in spreadsheet like table. You can add the missing song, artist or genre manually or use external sources to fill the missing data.

As you may know, exiftool can only READ mp3 tags, not write them:
https://www.exiftool.org/index.html#supported

Goshawk

Hi all,

I am new to this tool, and am not a programmer.

I have a similar problem.

I have about 500k of mp3 files and some are missing tags. If I want to identify them with a tagging program, I would have to manually load each dir (one album = one dir).
So what I would like ExifTool to do is to scan my whole collection and report the file and its location with missing tags.

If you could help me with the code that returns just a list with the location of the offending files.

Tagging programs I use are Mp3tag and MusicBrainz Picard (both free) and they return a positive as if the tag is written, but reloading the files still show error. The files do play, but any archiving program like MusicBee or WinAmp do not display these files.
I have successfully repaired files with mp3val and after repair I am able to write the tag ok.

Many thanks
Goshawk

PS I am using W10


Phil Harvey

The second command in my last post in this thread should do what you ask.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

You would use the command in FAQ #3 to figure out the name of the missing tag by comparing the output from a working file to a non-working file.  Once you find the missing tag, you would replace Artist in the above command with that tag name.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype