EXIF and the command line on Mac OS X

I use imagesnap for a project to capture pictures from my laptop iSight camera. The problem is that imagesnap doesn’t write EXIF data to the captured files.

Phil Harvey wrote command-line application called ExifTool to manipulate files’s meta information.

Pictures from imagesnap are written with the following filename format: 2012-06-06_12-12-00.jpg

I wrote a small shell script to extract time information from the filename and set file’s metadata based on its filename.

 

 
  • Phil Harvey

    ExifTool is smarter than you think. You can do this with the simple command line:

    exiftool -overwrite_original “-alldates<filename" DIR

    ExifTool is very flexible about the input date/time format (as long as the numbers are in the correct order, the punctuation doesn't matter), and AllDates is a built-in shortcut tag for the three date/time tags you are setting.

  • Phil Harvey

    I should add this this is mentioned in ExifTool’s FAQ number 5:

    http://owl.phy.queensu.ca/~phil/exiftool/faq.html#Q5