1EXIV2(1)                    General Commands Manual                   EXIV2(1)
2
3
4

NAME

6       exiv2 - Image metadata manipulation tool
7

SYNOPSIS

9       exiv2 [options] [action] file ...
10

DESCRIPTION

12       exiv2 is a program to read and write Exif, IPTC, XMP metadata and image
13       comments and can read many vendor makernote tags. The  program  option‐
14       ally  converts  between  Exif tags, XMP properties and IPTC datasets as
15       recommended by the Exif Standard, the IPTC Standard, the XMP specifica‐
16       tion and Metadata Working Group guidelines.
17       The following image formats are supported:
18
19       Type   Exif         IPTC         XMP          Image Comments          ICC Profile
20       ──────────────────────────────────────────────────────────────────────────────────
21       ARW    Read         Read         Read         -                       -
22       AVIF   Read         Read         Read         -                       -
23       BMP    -            -            -            -                       -
24       CR2    Read/Write   Read/Write   Read/Write   -                       Read/Write
25       CR3    Read         Read         Read         -                       Read
26       CRW    Read/Write   -            -            Read/Write              -
27       DNG    Read/Write   Read/Write   Read/Write   -                       Read/Write
28       EPS    -            -            Read/Write   -                       -
29       EXV    Read/Write   Read/Write   Read/Write   Read/Write Read/Write
30       GIF    -            -            -            -                       -
31       HEIC   Read         Read         Read         -                       -
32       HEIF   Read         Read         Read         -                       -
33       JP2    Read/Write   Read/Write   Read/Write   -                       Read/Write
34       JPEG   Read/Write   Read/Write   Read/Write   Read/Write              Read/Write
35       MRW    Read         Read         Read         -                       -
36       NEF    Read/Write   Read/Write   Read/Write   -                       Read/Write
37       ORF    Read/Write   Read/Write   Read/Write   -                       -
38       PEF    Read/Write   Read/Write   Read/Write   -                       Read/Write
39       PGF    Read/Write   Read/Write   Read/Write   Read/Write              Read/Write
40       PNG    Read/Write   Read/Write   Read/Write   Read/Write              Read/Write
41       PSD    Read/Write   Read/Write   Read/Write   -                       -
42       RAF    Read         Read         Read         -                       -
43       RW2    Read         Read         Read         -                       -
44       SR2    Read         Read         Read         -                       -
45       SRW    Read/Write   Read/Write   Read/Write   -                       -
46       TGA    -            -            -            -                       -
47       TIFF   Read/Write   Read/Write   Read/Write   -                       Read/Write
48       WEBP   Read/Write   -            Read/Write   -                       Read/Write
49       XMP    -            -            Read/Write   -                       -
50
51       • Support  for  GIF, TGA and BMP images is minimal: the image format is
52         recognized, a MIME type assigned to it and the height  and  width  of
53         the image are determined.
54
55       • Reading  other  TIFF-like  RAW image formats, which are not listed in
56         the table, may also work.
57

ACTIONS

59       The action argument is only required if it is not clear  from  the  op‐
60       tions which action is implied.
61
62       pr | print
63              Print image metadata. This is the default action, i.e., the com‐
64              mand exiv2 image.jpg will print a  summary  of  the  image  Exif
65              metadata.
66
67       ex | extract
68              Extract metadata to *.exv, XMP sidecar (*.xmp) and thumbnail im‐
69              age files.  Modification commands can be applied on-the-fly.
70
71       in | insert
72              Insert metadata from corresponding *.exv,  XMP  sidecar  (*.xmp)
73              and thumbnail files.  Use option -S .suf to change the suffix of
74              the input files. Since files of any supported format can be used
75              as  input  files,  this command can be used to copy the metadata
76              between files of different formats. Modification commands can be
77              applied on-the-fly.
78
79       rm | delete
80              Delete image metadata from the files.
81
82       ad | adjust
83              Adjust  Exif timestamps by the given time. Requires at least one
84              of the options -a time, -Y yrs, -O mon or -D day.
85
86       mo | modify
87              Apply commands to modify (add, set, delete) the Exif,  IPTC  and
88              XMP metadata of image files. Requires option -c, -m or -M.
89
90       mv | rename
91              Rename  files  and/or  set file timestamps according to the Exif
92              create timestamp. Uses the value of tag Exif.Photo.DateTimeOrig‐
93              inal  or,  if  not present, Exif.Image.DateTime to determine the
94              timestamp. The filename format can be set with -r fmt, timestamp
95              options are -t and -T.
96
97       fi | fixiso
98              Copy  the ISO setting from one of the proprietary Nikon or Canon
99              makernote   ISO   tags   to   the   regular   Exif   ISO    tag,
100              Exif.Photo.ISOSpeedRatings. Does not overwrite an existing stan‐
101              dard Exif ISO tag.
102
103       fc | fixcom
104              Fix the character encoding of Exif Unicode user  comments.   De‐
105              codes the comment using the auto-detected or specified character
106              encoding and writes it back in UCS-2. Use option -n  to  specify
107              the current encoding of the comment if necessary.
108

COMMAND SUMMARY

110       exiv2 [ opt [arg] ]+ [ act ] file ...
111
112       option [arg]     long option  description
113       -a  tim          --adjust     Modify time stamps.  [+|-]HH[:MM[:SS[.mmm]]]
114       -b               --binary     This option is obsolete and should not be used.  Reserved for test suite (with option -pC)
115       -c  txt          --comment    JPEG comment string to set in the image ('modify' action).  ...
116       -d  tgt          --delete     Delete target(s) for the 'delete' action. ...
117       -D  +-n          --days       Time  adjustment by a positive or negative number of days ...
118       -e  tgt          --extract    Extract target(s) for the 'extract' action.
119       -f               --force      Do not prompt before overwriting existing  files ...
120       -F               --Force      Do not prompt before renaming files (Force rename) ...
121       -g  key          --grep       Only output info for this Exiv2 key
122       -h               --help       Display help and exit.
123       -i  tgt          --insert     Insert target(s) for the 'insert' action. ...
124       -k               --keep       Preserve file timestamps when updating files
125       -K  key          --key        Report key.  Similar to -g (grep) however key must match exactly.
126       -l  dir          --location   Location (directory) for files to be inserted or extracted.
127       -m  file         --modify     read commands from cmd-file
128       -M  cmd          --Modify     Command line for the 'modify' action. ...
129       -n  enc          --encode     Charset to decode Exif Unicode user comments. See: man 3 iconv_open
130       -O  +-n          --months     Time adjustment by a positive or negative number of months, ...
131       -p  mod          --print      Print report (common reports)
132       -P  flg          --Print      Print report (fine grained control)
133       -q               --quiet      Silence warnings and error messages from the Exiv2 library ...
134       -Q  lvl          --log        Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror)
135       -r  fmt          --rename     Filename format for the 'rename' action. ...
136       -S  suf          --suffix     Use suffix .suf for source files for insert command.
137       -t               --timestamp  Set the file timestamp according to the Exif create timestamp ...
138       -T               --Timestamp  Only set the file timestamp according to Exif create timestamp ...
139       -u               --unknown    Show unknown tags ...
140       -v               --verbose    verbose
141       -V               --version    Show the program version and exit.
142       -Y  +-n          --years      Time adjustment by a positive or negative number of years ...
143
144       act              pr | ex | in | rm | ad | mo | mv | fi | fc
145                        print, extract, insert, delete, adjust, modify, rename, fixiso, fixcom
146
147       cmd              See "Commands" below.
148
149       flg              E | I | X | x | g | k | l | n | y | c | s | v | t | h
150                        Exif, IPTC, XMP, num, grp, key, label, name, type, count, size, vanilla, translated, hex
151
152       fmt              Default format is %Y%m%d_%H%M%S.
153
154       lvl              d | i | i | w | e
155                        debug, info, warning, error
156
157       mod              s | a | e | t | v | h | i | x | c | p | i | C | R | S | X
158                        summary, all, exif, translated, vanilla, hex, iptc, xmp, comment, preview,
159                        ICC Profile, Recursive Structure, Simple Structure, raw XMP
160
161       tgt              a | c | e | i | p | t | x | C | X | XX | -
162                        all, comment, exif, iptc, preview, thumb, xmp, ICC Profile, SideCar, RawXMP, stdin/out
163

OPTIONS

165       -h     Display help and exit.
166
167       -V     Show the program version and exit.
168              When -V is combined with -v (Verbose version), build information
169              is printed to standard output along with a list  of  shared  li‐
170              braries  which  have been loaded into memory. Verbose version is
171              supported on Windows (MSVC, Cygwin and MinGW builds), macOS  and
172              Linux and is provided for test and debugging.
173
174       -v     Be verbose during the program run.
175
176       -q     Silence  warnings and error messages from the Exiv2 library dur‐
177              ing the program run (quiet). Note that options -v and -q can  be
178              used at the same time.
179
180       -Q lvl Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror)
181              or 'm'(ute). The default log-level is 'w'. -Qm is equivalent  to
182              -q. All log messages are written to standard error.
183
184       -u     Show  unknown tags (default is to suppress tags which don't have
185              a name).
186
187       -g key Only keys which match the given key (grep).
188              Multiple -g options can be used to filter info to less keys. Ex‐
189              ample:  exiv2 -v -V -g webready -g time.  The default exiv2 com‐
190              mand prints a "summary report" which is quite short.   When  you
191              use  -g  without a -pmod option, you do not get a summary report
192              and in effect you get -g pattern -pa image ...
193
194              $ bin/exiv2 -g Date http://clanmills.com/Stonehenge.jpg
195              Exif.Image.DateTime                 Ascii    20  2015:07:16 20:25:28
196              Exif.Photo.DateTimeOriginal         Ascii    20  2015:07:16 15:38:54
197              Exif.Photo.DateTimeDigitized        Ascii    20  2015:07:16 15:38:54
198              Exif.NikonWt.DateDisplayFormat      Byte      1  Y/M/D
199              Exif.GPSInfo.GPSDateStamp           Ascii    11  2015:07:16
200              Xmp.xmp.ModifyDate                  XmpText  25  2015-07-16T20:25:28+01:00
201
202              You may use -pmod filters to further filter output.   For  exam‐
203              ple:
204              $ bin/exiv2 -px -g Date http://clanmills.com/Stonehenge.jpg
205              Xmp.xmp.ModifyDate                           XmpText    25  2015-07-16T20:25:28+01:00
206
207              The option -g (--grep) applies to keys and not values.
208              The  key  may  finish  with the optional modifier /i to indicate
209              case insensitive.
210
211       -K key Only report data for given key.
212              Multiple -K options can be used to report  more  than  a  single
213              key.
214              $ exiv2 -K Exif.Photo.DateTimeDigitized -K Exif.Photo.DateTimeOriginal -pt R.jpg
215              Exif.Photo.DateTimeOriginal   Ascii    20  2011:09:18 16:25:48
216              Exif.Photo.DateTimeDigitized  Ascii    20  2011:09:18 16:25:48
217
218       -n enc Charset  to  use  to decode Exif Unicode user comments. enc is a
219              name understood by iconv_open(3), e.g., 'UTF-8'.
220
221       -k     Preserve file timestamps when updating files (keep). Can be used
222              with  all  options  which  update  files. The flag is ignored by
223              read-only options.
224
225       -t     Set the file timestamp according to the Exif create timestamp in
226              addition  to  renaming  the  file (overrides -k). This option is
227              only used with the 'rename' action.  See Exif DateTime below for
228              additional information.
229
230       -T     Only  set  the file timestamp according to the Exif create time‐
231              stamp, do not rename the file (overrides  -k).  This  option  is
232              only  used  with  the  'rename' action. Note: On Windows you may
233              have to set the TZ environment variable for this option to  work
234              correctly.  See Exif DateTime below for additional information.
235
236       -f,-F  These options are used by the commands 'rename' and 'extract' to
237              determine the file overwrite policy.  These options are  usually
238              combined with -v/--verbose to provide additional status output.
239
240              The  options  --force and --Force apply to the 'rename' command.
241              The 'extract' command treats --force and --Force  as  permission
242              to overwrite.
243
244              The default behaviour is to prompt the user.
245              -f = Do not prompt before overwriting existing files.
246              -F  =  Do  not prompt before renaming files. Appends '_1' ('_2',
247              ...) to the name of the new file.  For example:
248
249              $ curl --silent -O http://clanmills.com/Stonehenge.jpg
250              $ exiv2 --verbose --Force rename Stonehenge.jpg
251              File 1/1: Stonehenge.jpg
252              Renaming file to ./20150716_153854.jpg
253              $ curl --silent -O http://clanmills.com/Stonehenge.jpg
254              $ exiv2 --verbose --Force rename Stonehenge.jpg
255              File 1/1: Stonehenge.jpg
256              Renaming file to ./20150716_153854_1.jpg
257
258              The 'rename' command will only overwrite files when  the  option
259              --force  is used.  The option --Force is provided to avoid unin‐
260              tentional loss of valuable image files.
261
262              The 'extract' command will overwrite files when  either  --force
263              or  --Force is used.  Overwriting extracted files will not cause
264              the loss of image files.
265
266       -r fmt Filename format for the 'rename' action. The format string  fol‐
267              lows strftime(3) and supports the following keywords:
268
269              :basename:     original filename without extension
270              :dirname:      name of the directory holding the original file
271              :parentname:   name of parent directory
272              Default filename format is %Y%m%d_%H%M%S.
273
274       -a time
275              Time  adjustment  in  the format [-]HH[:MM[:SS]]. This option is
276              only used with the 'adjust' action. Examples: 1 adds  one  hour,
277              1:01  adds  one  hour and one minute, -0:00:30 subtracts 30 sec‐
278              onds.  See Exif DateTime below for additional information.
279
280       -Y yrs Time adjustment by a positive or negative number of  years,  for
281              the 'adjust' action.
282
283       -O mon Time  adjustment by a positive or negative number of months, for
284              the 'adjust' action.
285
286       -D day Time adjustment by a positive or negative number  of  days,  for
287              the 'adjust' action.
288
289       -p mode
290              Print mode for the 'print' action. Possible modes are:
291
292              s : print a summary of the Exif metadata (the default)
293              a : print Exif, IPTC and XMP metadata (shortcut for -Pkyct)
294              e : print Exif metadata (shortcut for -PEkycv)
295              t : interpreted (translated) Exif tags (-PEkyct)
296              v : plain Exif tag values (-PExgnycv)
297              h : hexdump of the Exif data (-PExgnycsh)
298              i : IPTC datasets (-PIkyct)
299              x : XMP properties (-PXkyct)
300              c : JPEG comment
301              p : list available image previews, sorted by preview image size in pixels
302              C : print image ICC Profile (jpg, png, tiff, webp, cr2, jp2 only)
303              R : print image structure recursively (jpg, png, tiff, webp, cr2, jp2 only)
304              S : print image structure information (jpg, png, tiff, webp, cr2, jp2 only)
305              X : print "raw" XMP (jpg, png, tiff, webp, cr2, jp2 only)
306
307       -P flgs
308              Print  flags  for fine control of the tag list ('print' action).
309              Allows control of the type of metadata as well as  data  columns
310              included in the print output.  Valid flags are:
311
312              E : include Exif tags in the list
313              I : IPTC datasets
314
315              X : XMP properties
316              x : print a column with the tag number
317              g : group name
318              k : key
319              l : tag label
320              n : tag name
321              y : type
322              c : number of components (count)
323              s : size in bytes
324              v : plain data value (vanilla values)
325              V : plain data value AND the word 'set ' (for use with exiv2 -m-)
326              t : interpreted (translated) human readable data
327              h : hexdump of the data
328
329       -d tgt Delete target(s) for the 'delete' action. Possible targets are:
330
331              a : all supported metadata (the default)
332              e : Exif section
333              t : Exif thumbnail only
334              i : IPTC data
335              x : XMP packet
336              c : JPEG comment
337              C : ICC Profile
338              I : All IPTC data
339
340       -i tgt Insert  target(s)  for the 'insert' action. Possible targets are
341              the same as those for the -d option, plus an optional modifier:
342
343              X : Insert metadata from an XMP sidecar file <file>.xmp. The re‐
344              maining  insert  targets  determine what metadata to insert from
345              the sidecar file. Possible are Exif, IPTC and XMP  and  the  de‐
346              fault is all of these. Note that the inserted XMP properties in‐
347              clude those converted to Exif and IPTC.
348
349              XX: Insert "raw" XMP metadata from a sidecar (see option -pX)
350
351              - : Read from stdin.  This option is intended for "filter" oper‐
352              ations such as:
353              $  exiv2 -e{tgt}- filename | xmllint .... | exiv2 -i{tgt}- file‐
354              name
355
356              Only JPEG thumbnails can be inserted (not TIFF thumbnails),  and
357              must be named file-thumb.jpg.
358
359       -e tgt Extract target(s) for the 'extract' action. Possible targets are
360              the same as those for the -d option, plus a  target  to  extract
361              preview images and a modifier to generate an XMP sidecar file:
362              p[<n>[,<m>  ...]]  :  Extract preview images. The optional comma
363              separated list of preview image numbers  is  used  to  determine
364              which  preview  images  to extract. The available preview images
365              and their numbers are displayed with the 'print' option -pp.
366
367              C : Extract embedded ICC profile to <file>.icc
368
369              X : Extract metadata to an XMP sidecar file <file>.xmp. The  re‐
370              maining  extract  targets  determine what metadata to extract to
371              the sidecar file. Possible are Exif, IPTC and XMP  and  the  de‐
372              fault is all of these.
373
374              XX: Extract "raw" XMP metadata to a sidecar (see -pX)
375              You  may  not  use modify commands with the -eXX option and only
376              XMP is written to the sidecar.
377
378              - Output to stdout (see -i tgt for an example of this feature)
379
380
381       -c txt JPEG comment string to set in the image ('modify' action).  This
382              option  can also be used with the 'extract' and 'insert' actions
383              to modify metadata on-the-fly.
384
385       -m file
386              Command file for the 'modify' action. This option  can  also  be
387              used  with the 'extract' and 'insert' actions to modify metadata
388              on-the-fly.  -m- represents standard-input.
389
390       -M cmd Command line for the 'modify' action. This option  can  also  be
391              used  with the 'extract' and 'insert' actions to modify metadata
392              on-the-fly.  The format for the commands is the same as that  of
393              the lines of a command file.
394
395       -l dir Location (directory) for files to be inserted or extracted.
396
397       -S .suf
398              Use suffix .suf for source files in 'insert' action.
399

COMMANDS

401       Commands for the 'modify' action can be read from a command file, e.g.,
402
403       $ exiv2 -m cmd.txt image.jpg
404
405       or given on the command line, as in
406
407       $ exiv2 -M"add Iptc.Application2.Credit String Mr. Smith" image.jpg
408
409       Note the quotes. Multiple -m and -M options can be combined, and a non-
410       standard XMP namespace registered.
411
412       $ exiv2 -M"reg myprefix http://ns.myprefix.me/" -M"add Xmp.myprefix.Whom Mr. Smith" -M"set Exif.Image.Artist Mr. Smith" image.jpg
413
414       When writing Exif, IPTC and XMP metadata, exiv2 enforces only a correct
415       metadata  structure. It is possible to write tags with types and values
416       different from those specified in the standards, duplicate  Exif  tags,
417       undefined tags, or incomplete metadata. While exiv2 is able to read all
418       metadata that it can write, other programs may have  difficulties  with
419       images that contain non standard-conforming metadata.
420
421   Command format
422       The format of a command is
423
424       set | add | del key [[type] value]
425
426       set    Set  the value of an existing tag with a matching key or add the
427              tag.
428
429       add    Add a tag (unless key is a non-repeatable IPTC key; nothing pre‐
430              vents you from adding duplicate Exif tags).
431
432       del    Delete all occurrences of a tag (requires only a key).
433
434       key    Exiv2 Exif, IPTC or XMP key.
435
436       type   Exif  keys: Byte | Ascii | Short | Long | Rational | Undefined |
437              SShort | SLong | SRational | Comment
438              IPTC keys: String | Date | Time | Short | Undefined
439              XMP keys:  XmpAlt | XmpBag | XmpSeq | LangAlt
440
441              A default type is used if none is explicitly given. The  default
442              is determined based on key.
443
444       value  The  remaining  text on the line is the value. It can optionally
445              be  enclosed  in  single  quotes  ('value')  or  double   quotes
446              ("value").
447
448              The  value is optional. Not providing any value is equivalent to
449              an empty value ("") and is mainly useful to create an XMP  array
450              property, e.g., a bag.
451
452              The  format  of  Exif Comment values include an optional charset
453              specification at the beginning.  Comments are used by  the  tags
454              Exif.Photo.UserComment,   Exif.GPSInfo.GPSProcessingMethod   and
455              Exif.GPSInfo.GPSAreaInformation.  Comments are stored  as  Unde‐
456              fined  tags with an 8 byte encoding definition follow by the en‐
457              coded data. The charset is specified as follows:
458
459              [charset=Ascii|Jis|Unicode|Undefined] comment
460              charset=Undefined is the default
461
462              $ exiv2 -M'set Exif.Photo.UserComment charset=Ascii My photo' x.jpg
463              $ exiv2 -pa --grep UserComment x.jpg
464              Exif.Photo.UserComment         Undefined  16  My photo
465              $ exiv2 -pv --grep UserComment x.jpg
466              0x9286 Photo       UserComment Undefined  16  charset=Ascii My photo
467
468              $ exiv2 -M'set Exif.Photo.UserComment charset=Unicode \u0052\u006f\u0062\u0069\u006e' x.jpg
469              $ exiv2 -pa --grep UserComment x.jpg
470              Exif.Photo.UserComment                       Undefined  18  Robin
471              $ exiv2 -pv --grep UserComment x.jpg
472              0x9286 Photo        UserComment                 Undefined  18  charset=Unicode Robin
473
474              $ exiv2 -M'set Exif.GPSInfo.GPSProcessingMethod HYBRID-FIX' x.jpg
475              $ exiv2 -pa --grep ProcessingMethod        x.jpg
476              Exif.GPSInfo.GPSProcessingMethod             Undefined  18  HYBRID-FIX
477              $ exiv2 -pv --grep ProcessingMethod        x.jpg
478              0x001b GPSInfo     GPSProcessingMethod       Undefined  18  HYBRID-FIX
479
480              The format for an IPTC Date value is: YYYY-MM-DD  (year,  month,
481              day)
482
483              The  format for an IPTC Time value is: HH:MM:SS (hours, minutes,
484              seconds) and may optionally be followed  by:  -HH:MM  or  +HH:MM
485              (hours, minutes ahead/behind UTC)
486
487              The  format of Rational (and SRational) is one of: integer | in‐
488              teger/integer | Fnumber | number
489              Rational Examples:
490
491              $ exiv2 "-Mset Exif.Photo.MaxApertureValue 557429/62500" X.jpg
492              $ exiv2 "-Mset Exif.Photo.MaxApertureValue F5.6" X.jpg
493
494              The Rational format Fnumber is for the  convenience  of  setting
495              aperture  values.  Aperture values are stored in Exif is an APEX
496              value which can be evaluated by the expression:
497
498              apex-value  =    log(Fnumber) * 2.0 / log(2.0)
499              number      = exp(apex-value * log(2.0) / 2.0)
500
501              The Rational format Fnumber is valid for any Rational, even when
502              the  key  is not an Aperture.  More information about APEX value
503              is available from: http://en.wikipedia.org/wiki/APEX_system
504
505              The format of XMP LangAlt values includes an  optional  language
506              qualifier:
507              lang="language-code" text
508
509              The  double  quotes around the language-code are optional. If no
510              languge qualifier is supplied, then the value of "x-default"  is
511              used.  More  information on the language format can be found at:
512              https://www.ietf.org/rfc/rfc3066.txt
513
514              $ exiv2 -M'set Xmp.dc.title lang="de-DE" Euros' X.jpg
515              $ exiv2 -M'set Xmp.dc.title lang="en-GB" Pounds' X.jpg
516              $ exiv2 -M'set Xmp.dc.title lang="en-US" In God We Trust' X.jpg
517              $ exiv2 -M'set Xmp.dc.title lang=fr-FR Euros' X.jpg
518              $ exiv2 -M'set Xmp.dc.title lang=jp Yen' X.jpg
519              $ exiv2 -M'set Xmp.dc.title All others pay cash' X.jpg
520
521              To remove a language specification, set the value to  ''  (empty
522              string)
523              $ exiv2 -M'set Xmp.dc.title lang="en-US"' X.jpg
524              To remove all language specifications, delete the key:
525              $ exiv2 -M'del Xmp.dc.title' X.jpg
526              To register additional XMP namespaces, combine the command with:
527              reg prefix namespace
528
529   Command file format
530       Empty  lines  and  lines  starting with # in a command file are ignored
531       (comments). Remaining lines are commands as described above.
532

EXIF TAGNAMES AND VALUES

534       Exiv2 displays metadata tags and values.
535
536       The tag is a triplet of Family.Group.Tagname.  The following groups are
537       defined for the family Exif:
538
539       GPSInfo      Canon           Fujifilm     NikonMe         OlympusFe7        SonyMisc2b
540       Image        CanonCf                      NikonPc         OlympusFe9        SonyMisc3c
541       Image2       CanonCs         Nikon1       NikonPreview    OlympusFi         SonyMinolta
542       Image3       CanonFi         Nikon2       NikonSi01xx     OlympusIp         SonySInfo1
543       Iop          CanonPa         Nikon3       NikonSi02xx     OlympusRd
544       MakerNote    CanonPi         NikonAFT     NikonSiD300a    OlympusRd2        Samsung2
545       MpfInfo      CanonPr         NikonAf      NikonSiD300b    OlympusRi         SamsungPictureWizard
546       Photo        CanonSi         NikonAf2     NikonSiD40                        SamsungPreview
547       SubImage1    CanonTi         NikonAf22    NikonSiD80      Sigma
548       SubImage2                    NikonCb1     NikonVr
549       SubImage3    Casio           NikonCb2     NikonWt         Sony1
550       SubImage4    Casio2          NikonCb2a                    Sony1Cs
551       SubImage5                    NikonCb3     Olympus         Sony1Cs2
552       SubImage6    Minolta         NikonCb4     Olympus2        Sony1MltCs7D
553       SubImage7    MinoltaCs5D     NikonFi      OlympusCs       Sony1MltCsA100
554       SubImage8    MinoltaCs7D     NikonFl1     OlympusEq       Sony1MltCsNew
555       SubImage9    MinoltaCsNew    NikonFl2     OlympusFe1      Sony1MltCsOld
556       SubThumb1    MinoltaCsOld    NikonFl3     OlympusFe2      Sony2
557       Thumbnail                    NikonIi      OlympusFe3      Sony2Cs
558                    Panasonic       NikonLd1     OlympusFe4      Sony2Cs2
559       Pentax       PanasonicRaw    NikonLd2     OlympusFe5      Sony2Fp
560       PentaxDng                    NikonLd3     OlympusFe6      SonyMisc1
561
562       Exiv2 supports Exif 2.2 Standard Tags.  Exiv2 also supports reading and
563       writing manufacturer's MakerNote.  The information in Exif.Photo.Maker‐
564       Note  is  encoded  as manufacturer's sub-records.  For example, CanonCs
565       are Camera Settings, NikonAf are Nikon Auto Focus records, NikonCb  are
566       Nikon  Color  Balance  Records.  Every tag is defined by a unique tagId
567       (16 bit integer) which is unique within a Group.
568
569       You can query Exiv2 groups and tags with  the  sample  program  taglist
570       which is documented in README-SAMPLES.md
571
572       Exif  Metadata values are defined in the Exif Standard.  All data is an
573       array of data elements.  The Count defines the number elements  in  the
574       array.  All elements in an array have the same type.
575
576       Type               Explanation
577        1 BYTE            An 8-bit unsigned integer.
578        2 ASCII           7-bit ASCII. NUL terminated.
579        3 SHORT           A 16-bit (2-byte) unsigned integer.
580        4 LONG            A 32-bit (4-byte) unsigned integer
581        5 RATIONAL        Two LONGs. Numerator, denominator.
582        7 UNDEFINED       An 8-bit byte.
583        8 SSHORT          A 16-bit (2-byte) signed integer.
584        9 SLONG           A 32-bit (4-byte) signed integer.
585       10 SRATIONAL       Two SLONGs. Numerator, denominator.
586
587       The  printing  flag  t  =  translated  and  is  intended for human use.
588       Scripts should never use translated values as they  are  localised  and
589       the  format  may  change as Exiv2 evolves.  The printing flag v reports
590       the values recorded in the metadata and should be used by scripts.
591

Exif DateTime

593       An Exif DateTime string is stored as 20 ascii bytes (including trailing
594       nul) in the format:
595
596       YYYY:MM:DD HH:MM:SS
597
598       The  exiv2  command-line program options -t and -T will accept files in
599       which the Date has been incorrectly stored as YYYY-MM-DD.   The  option
600       -a  enables the user to adjust the DateTime in the file and applies the
601       YYYY:MM:DD HH:MM:SS standard.
602
603

CONFIGURATION FILE

605       Exiv2 can read an optional configuration file ~/.exiv2 on Unix  systems
606       and  %USERPROFILE%\exiv2.ini  on Windows (using a Visual Studio build).
607       Cygwin and MinGW/msys2 follow the unix convention and use ~/.exiv2  You
608       can determine the location of the configuration file with the command:
609
610       $ exiv2 --verbose --version --grep config_path
611       exiv2 0.27.0.1
612       config_path=/Users/rmills/.exiv2
613
614       The  purpose of the configuration file is to define your own lenses for
615       recognition by Exiv2.  The configuration file is in Windows .ini format
616       and   has   sections   for   each  of  the  major  camera  manufactures
617       canon,nikon,pentax,minolta,olympus and  sony.   The  lens  metadata  is
618       stored  as  a  integer called the lensID.  You can change the lens name
619       associated with any lensID.
620
621       $ cat ~/.exiv2
622       [nikon]
623       146=Robin's Sigma Lens  <--- The name of your lens
624
625       You obtain the lensID for your camera with the command:
626       $ exiv2 -pv --grep lens/i http://clanmills.com/Stonehenge.jpg
627       0x0083 Nikon3       LensType           Byte       1  14
628       0x0084 Nikon3       Lens               Rational   4  180/10 2500/10 35/10 63/10
629       0x008b Nikon3       LensFStops         Undefined  4  55 1 12 0
630       0x000c NikonLd3     LensIDNumber       Byte       1  146 <--- This number
631       0x000d NikonLd3     LensFStops         Byte       1  55
632

EXAMPLES

634       $ exiv2 *.jpg
635       Prints a summary of the Exif information for all JPEG files in the  di‐
636       rectory.   The summary report is rather brief and presentation does not
637       use the Family.Group.Tag convention.
638
639       If you use --grep pattern, the default becomes -pa.  See -g/grep above.
640
641
642       $ exiv2 -g Date http://clanmills.com/Stonehenge.jpg
643       $ exiv2 -pi image.jpg
644       Prints the IPTC metadata of the image.
645
646       $ exiv2 rename img_1234.jpg
647       Renames   img_1234.jpg   (taken   on   13-Nov-05   at   22:58:31)    to
648       20051113_225831.jpg
649
650       $ exiv2 -r'basename_%Y%m' rename img_1234.jpg
651       Renames img_1234.jpg to img_1234_200511.jpg
652
653       $ exiv2 -et img1.jpg img2.jpg
654       Extracts the Exif thumbnails from the two files into img1-thumb.jpg and
655       img2-thumb.jpg.
656
657       $ exiv2 -it img1.jpg img2.jpg
658       Inserts (copies) metadata from img1.exv to img1.jpg and  from  img2.exv
659       to img2.jpg.
660
661       $ exiv2 -ep1,2 image.jpg
662       Extracts  previews  1  and  2  from  the  image to the files image-pre‐
663       view1.jpg and image-preview2.jpg.
664
665       $ exiv2 -eiX image.jpg
666       Extracts IPTC datasets into an XMP sidecar file image.xmp  and  in  the
667       process converts them to "IPTC Core" XMP schema.
668
669       $ exiv2 -iixX image.jpg
670       Inserts  IPTC  and XMP metadata from an XMP sidecar file image.xmp into
671       image.jpg.  The resulting IPTC datasets are converted  from  the  "IPTC
672       Core"  XMP schema properties in the sidecar file to the older IPTC IIM4
673       format. The inserted XMP properties include those in  the  "IPTC  Core"
674       XMP schema.
675
676       $ exiv2 -M"set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg
677       Sets the Exif comment to an ASCII string.
678
679       $ exiv2 -M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \ -M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg
680       Sets  the  latitude  to 4 degrees, 15 minutes and 33 seconds north. The
681       Exif standard stipulates that the GPSLatitude tag consists of three Ra‐
682       tional numbers for the degrees, minutes and seconds of the latitude and
683       GPSLatitudeRef contains either 'N' or 'S' for north or  south  latitude
684       respectively.
685
686       $ exiv2 -l/tmp -S.CRW insert /data/*.JPG
687       Copy  all  metadata  from  CRW files in the /tmp directory to JPG files
688       with corresponding basenames in the /data  directory.  Note  that  this
689       copies metadata as is, without any modifications to adapt it to the re‐
690       quirements of the target format. Some tags copied  like  this  may  not
691       make sense in the target image.
692
693

SEE ALSO

695       https://exiv2.org/sample.html#modify
696       Sample command files.
697       https://exiv2.org/metadata.html
698       Taglists with key and default type values.
699

AUTHORS

701       exiv2 was written by Andreas Huggel and others.
702       The Exiv2 project web site is https://exiv2.org.
703       The code is hosted on GitHub at https://github.com/exiv2/exiv2
704
705
706
707                                August 10, 2021                       EXIV2(1)
Impressum