Difference between revisions of "Exiftool commands"

From OpenMedia
Jump to: navigation, search
m (+Category)
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
  
 
* Retrieve metadata as xml: One file per image: '''exiftool -X -w xml C:\test''' or write to console:  '''exiftool -X C:\test'''
 
* Retrieve metadata as xml: One file per image: '''exiftool -X -w xml C:\test''' or write to console:  '''exiftool -X C:\test'''
* Write a copyright notice to all files: '''exiftool -CopyrightNotice="(c) Creators & XYZ.org; Lizenz: Creative Commons cc-by-sa 3.0 Deutschland (http://creativecommons.org/licenses/by-sa/3.0/de/)" -E -overwrite_original_in_place  C:\test\*.jpg'''
+
* Write a copyright notice to all files: '''exiftool -CopyrightNotice="© Creators & XYZ.org; Lizenz: Creative Commons cc-by-sa 3.0 Deutschland (http://creativecommons.org/licenses/by-sa/3.0/de/)" -E -overwrite_original_in_place  C:\test\*.jpg'''
** "-E" allows to use html-entity encoding (default EXIF is UTF8, but default IPTC LATIN/ANSI!)
+
** "-E" allows to use html-entity encoding (default EXIF is UTF8, but default IPTC is LATIN/ANSI!)
 
** "-overwrite_original_in_place" prevents creation of original-file backups (rather copy folder for testing...)
 
** "-overwrite_original_in_place" prevents creation of original-file backups (rather copy folder for testing...)
* Write tag value only IF NOT YET PRESENT: '''exiftool -comment-= -comment='new comment' a.jpg'''. MAYBE HAVE A BLANK AFTER "-="!  
+
* Write tag value only IF NOT YET PRESENT: '''exiftool -comment-= -comment='new comment' a.jpg'''. MAYBE HAVE A BLANK AFTER "-="! '''
** Examples for creators: '''exiftool -By-Line-= -By-Line="X. Bürr & A. Baar" -E -overwrite_original_in_place C:\test\*.jpg
+
** Examples for creators: '''exiftool -By-Line-= -By-Line="X. Bürr & A. Baar" -E -overwrite_original_in_place C:\test\*.jpg'''
 +
** Examples for combined: '''exiftool -By-Line="X & Y" -CopyrightNotice="© Creators; Lizenz: Creative Commons cc-by-sa 3.0 (http://creativecommons.org/licenses/by-sa/3.0/de/) or later" -keywords="XXXX" -credit="XXX AUTHOR XXX" -E -overwrite_original_in_place C:\test\*.jpg'''
 +
 
 +
<!-- Dryades:
 +
exiftool -CopyrightNotice="&amp;copy; Progetto Dryades. License: Creative Commons Attribution Share-Alike (creativecommons.org/licenses/by-sa/3.0/) or later" -keywords="plant characters" -credit="Progetto Dryades, Trieste, Italy" -E -overwrite_original_in_place C:\char\*.jpg
 +
-->
 +
 
 +
Note: to add exif-data to a batch of files, Irfanview, thumbsmode, Ctrl-A = select all, Ctrl-I = Jpg lossless write IPTC may be simpler.
  
 
<!-- HELP FILE by default not searchable and in pages, here extracted from command line output:
 
<!-- HELP FILE by default not searchable and in pages, here extracted from command line output:
ORIGINAL-HILFE
+
ORIGINAL-HELP:
 
NAME
 
NAME
 
     exiftool - Read and write meta information in files
 
     exiftool - Read and write meta information in files

Latest revision as of 18:05, 17 June 2010

Exiftool is a powerful tool to read and write metadata from/to images. It not only supports EXIF, but also IPTC, XMP and other metadata containers.

Exiftool is rather complicated to use, with 100s of command line options, here we collect some solutions we have previously used.

  • Retrieve metadata as xml: One file per image: exiftool -X -w xml C:\test or write to console: exiftool -X C:\test
  • Write a copyright notice to all files: exiftool -CopyrightNotice="© Creators & XYZ.org; Lizenz: Creative Commons cc-by-sa 3.0 Deutschland (http://creativecommons.org/licenses/by-sa/3.0/de/)" -E -overwrite_original_in_place C:\test\*.jpg
    • "-E" allows to use html-entity encoding (default EXIF is UTF8, but default IPTC is LATIN/ANSI!)
    • "-overwrite_original_in_place" prevents creation of original-file backups (rather copy folder for testing...)
  • Write tag value only IF NOT YET PRESENT: exiftool -comment-= -comment='new comment' a.jpg. MAYBE HAVE A BLANK AFTER "-="!
    • Examples for creators: exiftool -By-Line-= -By-Line="X. Bürr &amp; A. Baar" -E -overwrite_original_in_place C:\test\*.jpg
    • Examples for combined: exiftool -By-Line="X &amp; Y" -CopyrightNotice="&copy; Creators; Lizenz: Creative Commons cc-by-sa 3.0 (http://creativecommons.org/licenses/by-sa/3.0/de/) or later" -keywords="XXXX" -credit="XXX AUTHOR XXX" -E -overwrite_original_in_place C:\test\*.jpg


Note: to add exif-data to a batch of files, Irfanview, thumbsmode, Ctrl-A = select all, Ctrl-I = Jpg lossless write IPTC may be simpler.