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       JPEG XL   Read         Read         Read         -                       -
36       MRW       Read         Read         Read         -                       -
37       NEF       Read/Write   Read/Write   Read/Write   -                       Read/Write
38       ORF       Read/Write   Read/Write   Read/Write   -                       -
39       PEF       Read/Write   Read/Write   Read/Write   -                       Read/Write
40       PGF       Read/Write   Read/Write   Read/Write   Read/Write              Read/Write
41       PNG       Read/Write   Read/Write   Read/Write   Read/Write              Read/Write
42       PSD       Read/Write   Read/Write   Read/Write   -                       -
43       RAF       Read         Read         Read         -                       -
44       RW2       Read         Read         Read         -                       -
45       SR2       Read         Read         Read         -                       -
46       SRW       Read/Write   Read/Write   Read/Write   -                       -
47       TGA       -            -            -            -                       -
48       TIFF      Read/Write   Read/Write   Read/Write   -                       Read/Write
49       WEBP      Read/Write   -            Read/Write   -                       Read/Write
50       XMP       -            -            Read/Write   -                       -
51
52       • Support  for  GIF, TGA and BMP images is minimal: the image format is
53         recognized, a MIME type assigned to it and the height  and  width  of
54         the image are determined.
55
56       • Reading  other  TIFF-like  RAW image formats, which are not listed in
57         the table, may also work.
58
59       • Support for BMFF file types such as CR3, HEIF, HEIC, AVIF,  and  JPEG
60         XL is a build option. To check if this is enabled, use:
61
62           $ exiv2 --version --verbose | grep bmff
63           enable_bmff=1
64
65       • Naked  codestream  JPEG  XL  files  do not contain Exif, IPTC, or XMP
66         metadata.
67

ACTIONS

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

COMMAND SUMMARY

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

OPTIONS

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

COMMANDS

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

EXIF TAGNAMES AND VALUES

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

Exif DateTime

605       An Exif DateTime string is stored as 20 ascii bytes (including trailing
606       nul) in the format:
607
608       YYYY:MM:DD HH:MM:SS
609
610       The exiv2 command-line program options -t and -T will accept  files  in
611       which  the  Date has been incorrectly stored as YYYY-MM-DD.  The option
612       -a enables the user to adjust the DateTime in the file and applies  the
613       YYYY:MM:DD HH:MM:SS standard.
614
615

CONFIGURATION FILE

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

EXAMPLES

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

SEE ALSO

707       https://exiv2.org/sample.html#modify
708       Sample command files.
709       https://exiv2.org/metadata.html
710       Taglists with key and default type values.
711

AUTHORS

713       exiv2 was written by Andreas Huggel and others.
714       The Exiv2 project web site is https://exiv2.org.
715       The code is hosted on GitHub at https://github.com/exiv2/exiv2
716
717
718
719                               November 02, 2022                      EXIV2(1)
Impressum