Compare Multiple Embedded Images Mp3

Started by Invindicator, July 18, 2018, 10:04:33 AM

Previous topic - Next topic

Invindicator

Hi all,

I stumbled upon a post from a few years ago about piping an extracted image to a secondary exiftool call as such

exiftool filename -ext mp3 -picture -b | exiftool -

This works fine for a single file however I was wondering if there was a way anyone would know of that I could run this for all mp3 files in all subdirectories and check that the embedded cover art has dimensions of 600x600

Again I had this working for a single file, but not for multiple files in a directory or subdirectories

exiftool . -r -ext mp3 -picture -b | exiftool - -if "($imagewidth ne '600') or ($imageheight ne '600')" -filename

Regards, Nick

Phil Harvey

Hi Nick,

The only way I can think of doing this is to create a temporary directory with all of the pictures, then delete it afterward:

1. exiftool . -ext mp3 -r -picture -b -w tmp/%d/%f.jpg

2. exiftool -if "($imagewidth ne '600') or ($imageheight ne '600')" -filename -r tmp

--> then remove the "tmp" directory

- 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 ($).

Invindicator

Was hoping to avoid this but sometimes you just gotta do what you gotta do hahha thanks Phil :)

I was also wondering if you knew of any way to force exiftool to perform a rename of a file or directory where the case may differ. For example the folder name might be "Owl city" but I want to rename it to "Owl City", in such a case exiftool will throw an error and fail

Phil Harvey

On case-insensitive filesystems, ExifTool won't rename a file/directory with just a different case because the new file already exists.  To do this would require two renames or moving through a temporary location.

- 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 ($).

Invindicator