ExifTool FAQ

Index
  1. Discussing ExifTool issues
  2. Determining tag names
  3. Problems with duplicate tags
  4. Aperture and shutter speed
  5. Date and time formats
  1. "Can't convert TAG" errors
  2. Deleting all EXIF from a TIFF
  3. Changing Make or Model tag
  4. Tag locations when copying
  5. Coded character sets

1. "Is there a forum for discussing ExifTool issues?"

ExifTool issues can be discussed on the CPAN forum at http://www.cpanforum.com/dist/Image-ExifTool

2. "How do I determine the tag name for some information?"

When you run exiftool, by default it prints descriptions, not tag names, for the information it extracts. To print the tag names instead, use the '-s' option. Also, see the tag names documentation for a complete list of available tag names.

3a. "ExifTool reports the wrong value for a tag",
3b. "ExifTool doesn't write a tag properly", or
3c. "Other software can't read information written by ExifTool"

Make sure you are looking at the right information. Information may be duplicated in different locations within an image. When in doubt, use 'exiftool -a -G1 FILENAME' to show all information and the locations in the file. In this command, '-a' allows duplicate tags to be displayed, '-G1' shows the family 1 group name (ie. the location) of each tag, and 'FILENAME' is the name of your image file. Also, it may be helpful to add '-s' to show the actual tag names instead of the descriptions.

If you are having problems with other software reading information written by ExifTool, if possible try first writing the information from the other software, then use ExifTool to determine where the information was written. Once you know where it should go, you can use ExifTool to write to this location.

You can read or write information in a specific location by prefixing the tag name on the command line with the desired group name. ie) '-ExifIFD:DateTimeOriginal'

4. "ExifTool reports more than one shutter speed or aperture value, and they are slightly different"

There are a number of different ways that aperture and shutter speed information get saved in an image. The standard EXIF values (EXIF:FNumber and EXIF:ExposureTime) should correspond to the values displayed by your camera, but these values may have been rounded off. The APEX values (EXIF:ApertureValue and EXIF:ShutterSpeedValue) may be different due to their own round-off errors. If available, the MakerNotes values are the typically the most accurate because they haven't been rounded off at all, but you may see odd values like 1/102 instead of 1/100, etc.

5. "How do I format date and time information for writing?"

All information (including date/time information) is written in the same format as it is read out. ExifTool converts all date and time information to standard EXIF format, so this is also the way it is specified when writing. The standard EXIF date/time format is 'YYYY:MM:DD hh:mm:ss', and a timezone may be specified by adding '+hh:mm', '-hh:mm' or 'Z'. If the meta information format requires a timezone and one is not specified, '+00:00' (or 'Z') is assumed. For example:
exiftool "-dateTimeOriginal=2005:10:23 20:06:34-05:00" a.jpg

6. "I get the following error when writing a tag: 'Can't convert TAG (not in PrintConv)'"

ExifTool applies a print conversion (PrintConv) to the printed values of all tags. These print conversions are documented for all tags in the Values column of the Tag Name documentation. For example, the GPSAltitudeRef tag defines the following conversions:
    0 = Above Sea Level
    1 = Below Sea Level
For this tag, a value of '0' is printed as 'Above Sea Level', and '1' is printed as 'Below Sea Level'. Reading and writing with ExifTool is symmetrical, so a value that is printed as 'Above Sea Level' must also be written in that form. (ie. The inverse print conversion is applied when writing values.) For example, to write GPSAltitudeRef you can type:
exiftool "-gpsaltituderef=Above Sea Level" image.jpg
or any unambiguous short form may be used and ExifTool will know what you mean, ie)
exiftool -gpsaltituderef=above image.jpg
Alternatively, the print conversion can be disabled with the '-n' option. In this case the printed value of GPSAltitudeRef will be '0' or '1', and the value is written in the same way. So the following command has exactly the same effect as the commands above:
exiftool -gpsaltituderef=0 -n image.jpg
Integer values may also be specified in hexadecimal (with a leading '0x'). For example, the following commands are all valid and accomplish the same thing:
exiftool -flash=1 -n image.jpg
exiftool -flash=0x1 -n image.jpg
exiftool -flash=fired image.jpg

7. "I can't delete all EXIF information from a TIFF file using 'exiftool -exif:all= img.tif'"

This is because of the way a TIFF file is structured. With a JPEG image, this command will remove IFD0 (the main Image File Directory) as well as any subdirectories, thus removing all EXIF information. But with the TIFF format, the main image itself is stored in IFD0, so deleting this directory would destroy the image. Instead, ExifTool just deletes the ExifIFD subdirectory, so any information stored in other directories is preserved.

Use 'exiftool -a -G1 -s img.tif' to see where the information is stored. Any information remaining in other IFD's must be deleted separately from a TIFF file if desired.

8. "All maker note information is lost if I change the Make or Model tag"

The Make and Model tags are used by some image utilities (including ExifTool) to determine the format of the maker note information. Deleting or changing either of these tags may prevent these utilities from recognizing or properly interpreting the maker notes. Also beware that the maker notes information may be damaged if an image is edited when the maker notes are not properly recognized. So it is a good idea not to edit the Make and Model tags in the first place.

If you really want to delete the Make and Model information, you might as well delete the maker notes too. You can do this with the following command:

exiftool -make= -model= -makernotes:all= image.jpg

9a. "The information is different when I copy all tags to a new file", or
9b. "The tag locations change when I use '-tagsfromfile' to copy information"

This feature is explained in the exiftool application documentation, but the question is common enough that it is discussed here in more detail.

By default, ExifTool will store information in preferred locations when either writing new information or copying information between files. This freedom allows ExifTool to write or copy information to files of different formats without requiring the user to know details about where the information is stored.

The preferred locations for information written to JPEG images are 1) EXIF, 2) GPS, 3) IPTC, 4) XMP and 5) MakerNotes. As an example, information extracted from the maker notes will be preferentially written (on a tag-by-tag basis) in EXIF format when copying information between two JPEG images. But if a specific tag doesn't exist in EXIF, then the tag is written to the first valid group in the order specified above. The advantage of "translating" the information to EXIF is that it then becomes readable by applications which only support standard EXIF. The disadvantage is that you don't get an exact copy of the original information structure.

But ExifTool gives you the ability to customize this behaviour to write the information to wherever you want. This is done by specifying a group name for the tag(s) to be copied. This applies even if the group name is 'all', in which case the original group is preserved. So to copy all information and preserve the original structure, use this syntax:

exiftool -tagsfromfile src.jpg -all:all dst.jpg
By specifying a group name with '-all:all', the location of the information is preserved. (Specifically, since no destination group was specified the source group 'all' was assumed, thus preserving the original group.)

Here are some examples to show you the type of control you have over where the information is written. All commands in each example are equivalent:

# copy all tags to preferred groups (no destination group)
exiftool -tagsfromfile src.jpg dst.jpg
exiftool -tagsfromfile src.jpg -all dst.jpg
exiftool -tagsfromfile src.jpg "-all>all" dst.jpg
exiftool -tagsfromfile src.jpg "-all:all>all" dst.jpg

# copy all tags, preserving original group (destination group 'all')
exiftool -tagsfromfile src.jpg -all:all dst.jpg
exiftool -tagsfromfile src.jpg "-all>all:all" dst.jpg
exiftool -tagsfromfile src.jpg "-all:all>all:all" dst.jpg

# copy all tags to EXIF group only (destination group 'exif')
exiftool -tagsfromfile src.jpg "-all>exif:all" dst.jpg
exiftool -tagsfromfile src.jpg "-all:all>exif:all" dst.jpg

# copy XMP tags to XMP group (destination group 'xmp' or 'all')
exiftool -tagsfromfile src.jpg "-xmp:all" dst.jpg
exiftool -tagsfromfile src.jpg "-xmp:all>xmp:all" dst.jpg
exiftool -tagsfromfile src.jpg "-xmp:all>all:all" dst.jpg

# copy XMP tags to preferred groups (no destination group)
exiftool -tagsfromfile src.jpg "-xmp:all>all" dst.jpg

# copy XMP tags to EXIF only (destination group 'exif')
exiftool -tagsfromfile src.jpg "-xmp:all>exif:all" dst.jpg
The same rules illustrated above also apply when copying individual tags.

Note: If no destination group is specified, a new tag is created if necessary only in the preferred group, but if the same tag already exists in another group, then this information is also updated. (Otherwise inconsistent values for the same information would exist in different locations. Of course, you can always generate inconsistencies like this by specifically writing contradictory information to different groups, but you wouldn't do this now, would you?)

10. "How does ExifTool handle coded character sets?"

Certain meta information formats allow coded character sets other than plain ASCII. All 8-bit encodings are passed straight through ExifTool without translation (while reading or writing). However, 16 or 32-bit formats (ie. Unicode) are translated to (when reading) or from (when writing) UTF-8 by default, or Windows Latin1 with the '-L' option. Specifically, here is how coded character sets are handled in EXIF, IPTC and XMP information:

EXIF: Most textual EXIF information is stored in ASCII format, however some EXIF tags (ie. UserComment) may be also be encoded in Unicode or JIS. When reading information, Unicode text is translated to either UTF-8 or Windows Latin1 depending on the ExifTool options, and other encodings are not translated. When writing, no translation is performed, and these tags are written as ASCII. However, the EXIF "XP" tags (XPTitle, XPComment, etc) are always stored as Unicode, and are read and written as either UTF-8 or Windows Latin1, depending on the options settings.

IPTC: ExifTool does not translate IPTC text. It is the user's responsibility to interpret the text properly according to the value of the IPTC CodedCharacterSet tag, and to update this tag if necessary when writing. For example, CodedCharacterSet should be set to "ESC % G" for UTF-8 encoding. Consult the IPTC specification for details.

XMP: All textual information in XMP is read and written as UTF-8.


Last revised Aug. 30, 2006

<-- Back to ExifTool home page