Author Topic: Feature Request: Read metadata from JPG image embedded in audio file  (Read 2291 times)

ryerman

  • Sr. Member
  • ****
  • Posts: 132
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 v11.86

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16658
    • ExifTool Home Page
Re: Feature Request: Read metadata from JPG image embedded in audio file
« Reply #1 on: September 21, 2010, 01:24:10 PM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ryerman

  • Sr. Member
  • ****
  • Posts: 132
Re: Feature Request: Read metadata from JPG image embedded in audio file
« Reply #2 on: September 21, 2010, 04:53:10 PM »
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 v11.86