Feature Request: Read metadata from JPG image embedded in audio file

Started by ryerman, September 21, 2010, 01:18:02 PM

Previous topic - Next topic

ryerman

I have embedded small JPG images in audio files (MP3, FLAC, WMA).  I now want to programmatically check the image size.
I see the -ee option and wonder if that could be expanded for this task?

If not, I guess my method would be to extract each image (-b option) as a temporary file and read the metadata there.
Any suggestions are appreciated, especially concerning reducing the calls for ExifTool.

Thanks.
Jim
Windows 10 Home 64 bit, Exiftool v12.61

Phil Harvey

Hi Jim,

The technique to do this for embedded images is like this (for the Picture tag as an example):

exiftool -picture -b file.mp3 | exiftool -

Using a pipe like this allows you to avoid the temporary file, but I don't have a simple solution to avoid running exiftool twice (other than writing a Perl script and using the ExifTool API).

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

ryerman

Thanks Phil

That's a little more elegant.  It took me a few tries before I realized that any valid command line can be used after that last hyphen. As for running exiftool twice, its not like I have to pay!  And Perl and API are beyond me for now.

Jim
Windows 10 Home 64 bit, Exiftool v12.61