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       JPEG   Read/Write   Read/Write   Read/Write   Read/Write              Read/Write
22       EXV    Read/Write   Read/Write   Read/Write   Read/Write Read/Write
23       CR2    Read/Write   Read/Write   Read/Write   -                       Read/Write
24       CRW    Read/Write   -            -            Read/Write              -
25       MRW    Read         Read         Read         -                       -
26       TIFF   Read/Write   Read/Write   Read/Write   -                       Read/Write
27       WEBP   Read/Write   -            Read/Write   -                       Read/Write
28       DNG    Read/Write   Read/Write   Read/Write   -                       Read/Write
29       NEF    Read/Write   Read/Write   Read/Write   -                       Read/Write
30       PEF    Read/Write   Read/Write   Read/Write   -                       Read/Write
31       ARW    Read         Read         Read         -                       -
32       RW2    Read         Read         Read         -                       -
33       SR2    Read         Read         Read         -                       -
34       SRW    Read/Write   Read/Write   Read/Write   -                       -
35       ORF    Read/Write   Read/Write   Read/Write   -                       -
36       PNG    Read/Write   Read/Write   Read/Write   Read/Write              Read/Write
37       PGF    Read/Write   Read/Write   Read/Write   Read/Write              Read/Write
38       RAF    Read         Read         Read         -                       -
39       EPS    -            -            Read/Write   -                       -
40       XMP    -            -            Read/Write   -                       -
41       GIF    -            -            -            -                       -
42       PSD    Read/Write   Read/Write   Read/Write   -                       -
43       TGA    -            -            -            -                       -
44       BMP    -            -            -            -                       -
45       JP2    Read/Write   Read/Write   Read/Write   -                       Read/Write
46
47       · Support  for  GIF, TGA and BMP images is minimal: the image format is
48         recognized, a MIME type assigned to it and the height  and  width  of
49         the image are determined.
50
51       · Reading  other  TIFF-like  RAW image formats, which are not listed in
52         the table, may also work.
53

ACTIONS

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

COMMAND SUMMARY

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

OPTIONS

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

COMMANDS

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

EXIF TAGNAMES AND VALUES

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

Exif DateTime

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

CONFIGURATION FILE

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

EXAMPLES

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

SEE ALSO

689       https://exiv2.org/sample.html#modify
690       Sample command files.
691       https://exiv2.org/metadata.html
692       Taglists with key and default type values.
693

AUTHORS

695       exiv2 was written by Andreas Huggel and others.
696       The Exiv2 project web site is https://exiv2.org.
697       The code is hosted on GitHub at https://github.com/exiv2/exiv2
698
699
700
701                                 May 12, 2020                         EXIV2(1)
Impressum