Troubleshooting Common ExifTool Errors and How to Fix Them


What is ExifTool?

ExifTool is a powerful, platform-independent command-line application for reading and writing metadata in image, audio, and video files. Created and maintained by Phil Harvey, it supports hundreds of metadata formats, including EXIF, IPTC, XMP, GPS, MakerNotes, and many proprietary tags used by camera manufacturers.

Key capabilities:

  • Read metadata from virtually any file type.
  • Write or edit existing tags (timestamps, GPS, camera model, copyright).
  • Copy tags between files or formats (e.g., EXIF → XMP).
  • Batch-process directories of files.
  • Verify and repair inconsistent or missing metadata.

Why metadata matters

  • Organization: Metadata lets apps sort and filter images by date, camera, lens, or location.
  • Provenance & rights: Copyright, creator, and usage terms travel with the file.
  • Searchability: Search engines and DAM (digital asset management) systems rely on metadata.
  • Forensics & authenticity: Metadata helps establish when and how a file was created—but it can also be altered, so metadata alone isn’t definitive proof.

Installing ExifTool

ExifTool runs on macOS, Linux, and Windows.

  • macOS: Use Homebrew — brew install exiftool
  • Linux: Use the distro package manager (e.g., apt install libimage-exiftool-perl) or download from the ExifTool site.
  • Windows: Download the Windows executable (exiftool(-k).exe) and rename/move as needed so you can call exiftool from the Command Prompt.

After installation, run:

exiftool -ver 

to check the version.


Basic commands: read, write, and view

Read all metadata from a file:

exiftool image.jpg 

Read a specific tag (e.g., DateTimeOriginal):

exiftool -DateTimeOriginal image.jpg 

Write a tag (change or add a copyright):

exiftool -Copyright="© 2025 Your Name" image.jpg 

Save changes in place (ExifTool creates a backup by default). To overwrite without backup:

exiftool -overwrite_original -Copyright="© 2025 Your Name" image.jpg 

Common beginner tasks

  1. Viewing camera and lens info:

    exiftool -Model -Make -LensModel image.jpg 
  2. Correcting timestamps (shift by hours/minutes):

    exiftool -AllDates+=1:30 image.jpg 

    This adds 1 hour 30 minutes to DateTimeOriginal, CreateDate, and ModifyDate.

  3. Copying metadata from one file to another:

    exiftool -TagsFromFile src.jpg dst.jpg 

    Use -all:all to copy all metadata groups or specify groups/tags like -EXIF:All or -XMP:Headline.

  4. Removing sensitive metadata (strip GPS and maker notes):

    exiftool -gps:all= -maker:all= image.jpg 
  5. Batch processing a directory:

    exiftool -r -overwrite_original -Author="Your Name" /path/to/photos 

    -r recurses into subdirectories.


Working with GPS data

Read GPS coordinates:

exiftool -GPSLatitude -GPSLongitude image.jpg 

Add or set GPS coordinates:

exiftool -GPSLatitude=37.7749 -GPSLongitude=-122.4194 -GPSLatitudeRef=N -GPSLongitudeRef=W image.jpg 

Convert decimal coordinates to degrees/minutes/seconds automatically if needed. ExifTool accepts multiple formats.

To remove location data from many files before sharing:

exiftool -r -gps:all= -overwrite_original /path/to/share 

Tag groups, namespaces, and priorities

ExifTool organizes tags into families: EXIF, IPTC, XMP, MakerNotes, QuickTime, etc. Some tags exist in multiple namespaces (for example, a date could appear in EXIF and XMP). ExifTool provides ways to map or prioritize tags when copying or viewing:

  • View tag with namespace: exiftool -EXIF:DateTimeOriginal image.jpg
  • Copy specific group: exiftool -TagsFromFile src.jpg -XMP:All dst.jpg
  • Use -api QuickTimeUTC to handle time zone behavior in QuickTime files.

Understanding namespaces helps avoid duplications or inconsistent metadata across formats.


Handling timestamps and time zones

Timestamps are a frequent pain point. Cameras may store local time without timezone. To shift and normalize:

  • Shift time by an offset:

    exiftool -AllDates+=0:0:0 2:0:0 image.jpg 

    This adds 2 hours.

  • Set time zone (for some file types):

    exiftool -XMP:DateTimeOriginal="2025:09:03 12:00:00+00:00" image.jpg 

Always test on copies until you’re comfortable—time changes are easy to get wrong.


Safe editing practices

  • Backup originals. ExifTool creates .original files by default; keep them until you confirm changes.
  • Use -o to write output to another file or directory instead of overwriting.
  • Run exiftool without write flags first to inspect tags you plan to modify.
  • Test commands on a small subset before batch runs.

Example: write output to another directory

exiftool -o /path/to/edited/dir -all= -TagsFromFile @ -all:all image.jpg 

Useful options and switches

  • -r : recursive processing
  • -overwrite_original : replace without .original backup
  • -P : preserve file modification date/time
  • -d FORMAT : format date/time output (e.g., -d “%Y-%m-%d %H:%M:%S”)
  • -ext : process only files with a given extension (e.g., -ext jpg)
  • -if and -execute : conditional processing for advanced batch rules
  • -charset : set character encoding for IPTC/XMP text fields

Example conditional: only process files with no Copyright tag

exiftool -if 'not $Copyright' -Copyright="© Your Name" -r /photos 

Automating workflows (examples)

  1. Add copyright and preserve file mtime:

    exiftool -r -P -overwrite_original -Copyright="© 2025 Your Name" /photos 
  2. Copy EXIF dates to XMP for software that prefers XMP:

    exiftool -TagsFromFile @ -EXIF:DateTimeOriginal -XMP:DateTimeOriginal *.jpg 
  3. Export metadata to CSV for cataloging:

    exiftool -csv -r -DateTimeOriginal -Model -GPSLatitude -GPSLongitude /photos > metadata.csv 

Troubleshooting common errors

  • “Unknown tag”: a tag name is misspelled or not supported—use exiftool -listw to see writable tags.
  • No GPS shown: camera didn’t record it, or GPS data is stored in a different namespace—inspect full output.
  • Time shift didn’t apply: you modified the wrong tag family; check EXIF vs XMP vs QuickTime.

Alternatives and GUIs

ExifTool is command-line focused. If you prefer a graphical interface:

  • ExifTool-based GUIs exist (third-party) that call the ExifTool engine.
  • Other tools: Adobe Lightroom (commercial), darktable (open source), and various metadata editors—ExifTool often remains the most complete and scriptable option.

Comparison (quick pros/cons):

Tool Pros Cons
ExifTool Extremely powerful, supports many formats, scriptable Command-line, steep learning curve
Lightroom Integrated workflow, GUI Proprietary, less tag-level control
darktable Open-source, GUI Metadata abilities less comprehensive than ExifTool

Advanced topics (next steps)

  • Writing custom tag names and creating sidecar XMP files.
  • Parsing MakerNotes for camera-specific data.
  • Combining ExifTool with shell scripts, Python, or PowerShell to build automated pipelines.
  • Using ExifTool libraries (Perl) to embed functionality in other apps.

Quick reference: common commands

  • View all tags: exiftool image.jpg
  • View specific tag: exiftool -Model image.jpg
  • Write tag: exiftool -Artist=“Name” image.jpg
  • Remove a tag: exiftool -Comment= image.jpg
  • Recursive set author: exiftool -r -Author=“Name” /photos
  • Strip GPS: exiftool -r -gps:all= -overwrite_original /share

ExifTool gives you fine-grained control over the metadata that travels with your files. Start slowly, keep backups, and use the command-line as your workshop—ExifTool is the set of precision tools that, once learned, make metadata editing fast, repeatable, and reliable.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *