You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
714 lines
25 KiB
Groff
714 lines
25 KiB
Groff
20 years ago
|
.\" Hey, EMACS: -*- nroff -*-
|
||
|
.\" First parameter, NAME, should be all caps
|
||
|
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||
|
.\" other parameters are allowed: see man(7), man(1)
|
||
6 years ago
|
.TH EXIV2 1 "May 22, 2019"
|
||
20 years ago
|
.\" Please adjust this date whenever revising the manpage.
|
||
|
.\"
|
||
|
.\" Some roff macros, for reference:
|
||
|
.\" .nh disable hyphenation
|
||
|
.\" .hy enable hyphenation
|
||
|
.\" .ad l left justify
|
||
|
.\" .ad b justify to both left and right margins
|
||
|
.\" .nf disable filling
|
||
|
.\" .fi enable filling
|
||
|
.\" .br insert line break
|
||
|
.\" .sp <n> insert n+1 empty lines
|
||
|
.\" for manpage-specific macros, see man(7)
|
||
|
.SH NAME
|
||
18 years ago
|
exiv2 \- Image metadata manipulation tool
|
||
20 years ago
|
.SH SYNOPSIS
|
||
|
.B exiv2
|
||
|
[\fIoptions\fP] [\fIaction\fP] \fIfile\fP ...
|
||
|
.br
|
||
|
.SH DESCRIPTION
|
||
|
.PP
|
||
|
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||
10 years ago
|
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||
20 years ago
|
.\" respectively.
|
||
|
.B exiv2
|
||
10 years ago
|
is a program to read and write Exif, IPTC, XMP metadata and
|
||
10 years ago
|
image comments and can read many vendor makernote tags. The program
|
||
10 years ago
|
optionally converts between Exif tags, XMP properties and IPTC
|
||
|
datasets as recommended by the Exif Standard, the IPTC Standard,
|
||
|
the XMP specification and Metadata Working Group guidelines.
|
||
|
.br
|
||
|
The following image formats are supported:
|
||
16 years ago
|
.TS
|
||
9 years ago
|
lB lB lB lB lB lB
|
||
|
_ _ _ _ _ _
|
||
|
l l l l l l.
|
||
|
Type Exif IPTC XMP Image Comments ICC Profile
|
||
|
JPEG Read/Write Read/Write Read/Write Read/Write Read/Write
|
||
|
EXV Read/Write Read/Write Read/Write Read/Write Read/Write
|
||
|
CR2 Read/Write Read/Write Read/Write - Read/Write
|
||
|
CRW Read/Write - - Read/Write -
|
||
|
MRW Read Read Read - -
|
||
|
TIFF Read/Write Read/Write Read/Write - Read/Write
|
||
|
WEBP Read/Write - Read/Write - Read/Write
|
||
|
DNG Read/Write Read/Write Read/Write - Read/Write
|
||
|
NEF Read/Write Read/Write Read/Write - Read/Write
|
||
|
PEF Read/Write Read/Write Read/Write - Read/Write
|
||
|
ARW Read Read Read - -
|
||
|
RW2 Read Read Read - -
|
||
|
SR2 Read Read Read - -
|
||
|
SRW Read/Write Read/Write Read/Write - -
|
||
|
ORF Read/Write Read/Write Read/Write - -
|
||
|
PNG Read/Write Read/Write Read/Write Read/Write Read/Write
|
||
|
PGF Read/Write Read/Write Read/Write Read/Write Read/Write
|
||
|
RAF Read Read Read - -
|
||
|
EPS - - Read/Write - -
|
||
|
XMP - - Read/Write - -
|
||
|
GIF - - - - -
|
||
|
PSD Read/Write Read/Write Read/Write - -
|
||
|
TGA - - - - -
|
||
|
BMP - - - - -
|
||
|
JP2 Read/Write Read/Write Read/Write - Read/Write
|
||
16 years ago
|
.TE
|
||
16 years ago
|
.IP \(bu 2
|
||
16 years ago
|
Support for GIF, TGA and BMP images is minimal: the image format is
|
||
|
recognized, a MIME type assigned to it and the height and width of the
|
||
|
image are determined.
|
||
16 years ago
|
.IP \(bu 2
|
||
16 years ago
|
Reading other TIFF-like RAW image formats, which are not listed in the
|
||
|
table, may also work.
|
||
20 years ago
|
.SH ACTIONS
|
||
19 years ago
|
The \fIaction\fP argument is only required if it is not clear from the
|
||
|
\fIoptions\fP which action is implied.
|
||
20 years ago
|
.TP
|
||
|
.B pr | print
|
||
20 years ago
|
Print image metadata. This is the default action, i.e., the command
|
||
19 years ago
|
\fIexiv2 image.jpg\fP will print a summary of the image Exif metadata.
|
||
20 years ago
|
.TP
|
||
|
.B ex | extract
|
||
10 years ago
|
Extract metadata to *.exv, XMP sidecar (*.xmp) and thumbnail image files.
|
||
18 years ago
|
Modification commands can be applied on-the-fly.
|
||
20 years ago
|
.TP
|
||
|
.B in | insert
|
||
17 years ago
|
Insert metadata from corresponding *.exv, XMP sidecar (*.xmp) and
|
||
|
thumbnail files. Use option \fB\-S\fP \fI.suf\fP to change the suffix
|
||
|
of the input files. Since files of any supported format can be used as
|
||
|
input files, this command can be used to copy the metadata between
|
||
|
files of different formats. Modification commands can be applied
|
||
|
on-the-fly.
|
||
20 years ago
|
.TP
|
||
|
.B rm | delete
|
||
|
Delete image metadata from the files.
|
||
|
.TP
|
||
|
.B ad | adjust
|
||
18 years ago
|
Adjust Exif timestamps by the given time. Requires at least one of the
|
||
|
options \fB\-a\fP \fItime\fP, \fB\-Y\fP \fIyrs\fP, \fB\-O\fP
|
||
|
\fImon\fP or \fB\-D\fP \fIday\fP.
|
||
20 years ago
|
.TP
|
||
|
.B mo | modify
|
||
18 years ago
|
Apply commands to modify (add, set, delete) the Exif, IPTC and XMP
|
||
|
metadata of image files. Requires option \fB\-c\fP, \fB\-m\fP or
|
||
|
\fB\-M\fP.
|
||
20 years ago
|
.TP
|
||
|
.B mv | rename
|
||
19 years ago
|
Rename files and/or set file timestamps according to the Exif create
|
||
18 years ago
|
timestamp. Uses the value of tag Exif.Photo.DateTimeOriginal or, if
|
||
|
not present, Exif.Image.DateTime to determine the timestamp. The
|
||
|
filename format can be set with \fB\-r\fP \fIfmt\fP, timestamp options
|
||
|
are \fB\-t\fP and \fB\-T\fP.
|
||
20 years ago
|
.TP
|
||
|
.B fi | fixiso
|
||
18 years ago
|
Copy the ISO setting from one of the proprietary Nikon or Canon
|
||
|
makernote ISO tags to the regular Exif ISO tag,
|
||
|
Exif.Photo.ISOSpeedRatings. Does not overwrite an existing standard
|
||
|
Exif ISO tag.
|
||
16 years ago
|
.TP
|
||
|
.B fc | fixcom
|
||
|
Fix the character encoding of Exif Unicode user comments. Decodes the
|
||
|
comment using the auto-detected or specified character encoding and
|
||
|
writes it back in UCS-2. Use option \fB\-n\fP to specify the current
|
||
|
encoding of the comment if necessary.
|
||
10 years ago
|
.br
|
||
|
.ne 40
|
||
|
.SH COMMAND SUMMARY
|
||
|
.sp 1
|
||
|
.nf
|
||
|
exiv2 [ opt [arg] ]+ [ act ] file ...
|
||
|
.sp 1
|
||
|
option [arg] long option description
|
||
|
-a tim --adjust Modify time stamps. [+|-]HH[:MM[:SS[.mmm]]]
|
||
|
-b --binary Show large binary values (default is to suppress them).
|
||
|
-c txt --comment JPEG comment string to set in the image ('modify' action). ...
|
||
|
-d tgt --delete Delete target(s) for the 'delete' action. ...
|
||
|
-D +-n --days Time adjustment by a positive or negative number of days ...
|
||
|
-e tgt --extract Extract target(s) for the 'extract' action.
|
||
|
-f --force Do not prompt before overwriting existing files ...
|
||
|
-F --Force Do not prompt before renaming files (Force rename) ...
|
||
10 years ago
|
-g key --grep Only output info for this Exiv2 key
|
||
10 years ago
|
-h --help Display help and exit.
|
||
|
-i tgt --insert Insert target(s) for the 'insert' action. ...
|
||
10 years ago
|
-k --keep Preserve file timestamps when updating files
|
||
9 years ago
|
-K key --key Report key. Similar to -g (grep) however key must match exactly.
|
||
10 years ago
|
-l dir --location Location (directory) for files to be inserted or extracted.
|
||
|
-m file --modify read commands from cmd-file
|
||
|
-M cmd --Modify Command line for the 'modify' action. ...
|
||
|
-n enc --encode Charset to decode Exif Unicode user comments. See: man 3 iconv_open
|
||
|
-O +-n --months Time adjustment by a positive or negative number of months, ...
|
||
|
-p mod --print Print report (common reports)
|
||
|
-P flg --Print Print report (fine grained control)
|
||
|
-q --quiet Silence warnings and error messages from the Exiv2 library ...
|
||
|
-Q lvl --log Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror)
|
||
|
-r fmt --rename Filename format for the 'rename' action. ...
|
||
|
-S suf --suffix Use suffix .suf for source files for insert command.
|
||
|
-t --timestamp Set the file timestamp according to the Exif create timestamp ...
|
||
|
-T --Timestamp Only set the file timestamp according to Exif create timestamp ...
|
||
|
-u --unknown Show unknown tags ...
|
||
|
-v --verbose verbose
|
||
|
-V --version Show the program version and exit.
|
||
|
-Y +-n --years Time adjustment by a positive or negative number of years ...
|
||
|
.sp 1
|
||
|
act pr | ex | in | rm | ad | mo | mv | fi | fc
|
||
9 years ago
|
print, extract, insert, delete, adjust, modify, rename, fixiso, fixcom
|
||
10 years ago
|
|
||
|
cmd See "Commands" below.
|
||
|
|
||
|
flg E | I | X | x | g | k | l | n | y | c | s | v | t | h
|
||
9 years ago
|
Exif, IPTC, XMP, num, grp, key, label, name, type, count, size, vanilla, translated, hex
|
||
10 years ago
|
|
||
|
fmt Default format is %Y%m%d_%H%M%S.
|
||
|
|
||
|
lvl d | i | i | w | e
|
||
|
debug, info, warning, error
|
||
|
|
||
9 years ago
|
mod s | a | e | t | v | h | i | x | c | p | i | C | R | S | X
|
||
|
summary, all, exif, translated, vanilla, hex, iptc, xmp, comment, preview,
|
||
10 years ago
|
ICC Profile, Recursive Structure, Simple Structure, raw XMP
|
||
10 years ago
|
|
||
9 years ago
|
tgt a | c | e | i | p | t | x | C | X | XX | -
|
||
10 years ago
|
all, comment, exif, iptc, preview, thumb, xmp, ICC Profile, SideCar, RawXMP, stdin/out
|
||
10 years ago
|
|
||
|
.br
|
||
|
.fi
|
||
|
.ne 40
|
||
20 years ago
|
.SH OPTIONS
|
||
|
.TP
|
||
|
.B \-h
|
||
|
Display help and exit.
|
||
|
.TP
|
||
|
.B \-V
|
||
|
Show the program version and exit.
|
||
13 years ago
|
.br
|
||
12 years ago
|
When \fB\-V\fP is combined with \fB\-v\fP (Verbose version), build information
|
||
|
is printed to standard output along with a list of shared libraries which
|
||
13 years ago
|
have been loaded into memory. Verbose version is supported on Windows
|
||
11 years ago
|
(MSVC, Cygwin and MinGW builds), MacOSX and Linux and is provided
|
||
13 years ago
|
for test and debugging.
|
||
20 years ago
|
.TP
|
||
|
.B \-v
|
||
|
Be verbose during the program run.
|
||
|
.TP
|
||
15 years ago
|
.B \-q
|
||
|
Silence warnings and error messages from the Exiv2 library during the
|
||
|
program run (quiet). Note that options \fB\-v\fP and \fB\-q\fP can be
|
||
|
used at the same time.
|
||
|
.TP
|
||
14 years ago
|
.B \-Q \fIlvl\fP
|
||
|
Set the log-level to 'd'(ebug), 'i'(nfo), 'w'(arning), 'e'(rror)
|
||
|
or 'm'(ute). The default log-level is 'w'. \fB\-Qm\fP is equivalent
|
||
|
to \fB\-q\fP. All log messages are written to standard error.
|
||
|
.TP
|
||
19 years ago
|
.B \-b
|
||
19 years ago
|
Show large binary values (default is to suppress them).
|
||
19 years ago
|
.TP
|
||
|
.B \-u
|
||
16 years ago
|
Show unknown tags (default is to suppress tags which don't have a name).
|
||
19 years ago
|
.TP
|
||
16 years ago
|
.B \-g \fIkey\fP
|
||
10 years ago
|
Only keys which match the given key (grep).
|
||
11 years ago
|
.br
|
||
|
Multiple \fB\-g\fP options
|
||
6 years ago
|
can be used to filter info to less keys. Example:
|
||
8 years ago
|
exiv2 -v -V -g webready -g time.
|
||
6 years ago
|
The default exiv2 command prints a "summary report" which is quite short. When you use -g without a -pmod option, you do not get a summary report and in effect you get -g pattern -pa image ...
|
||
11 years ago
|
|
||
|
.nf
|
||
6 years ago
|
$ bin/exiv2 -g Date http://clanmills.com/Stonehenge.jpg
|
||
|
Exif.Image.DateTime Ascii 20 2015:07:16 20:25:28
|
||
|
Exif.Photo.DateTimeOriginal Ascii 20 2015:07:16 15:38:54
|
||
|
Exif.Photo.DateTimeDigitized Ascii 20 2015:07:16 15:38:54
|
||
|
Exif.NikonWt.DateDisplayFormat Byte 1 Y/M/D
|
||
|
Exif.GPSInfo.GPSDateStamp Ascii 11 2015:07:16
|
||
|
Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00
|
||
10 years ago
|
|
||
11 years ago
|
.fi
|
||
6 years ago
|
You may use -pmod filters to further filter output. For example:
|
||
|
.nf
|
||
|
|
||
|
$ bin/exiv2 -px -g Date http://clanmills.com/Stonehenge.jpg
|
||
|
Xmp.xmp.ModifyDate XmpText 25 2015-07-16T20:25:28+01:00
|
||
10 years ago
|
|
||
6 years ago
|
.fi
|
||
|
The option -g (--grep) applies to keys and not values.
|
||
|
|
||
|
The key may finish with the optional modifier /i to indicate case insensitive.
|
||
16 years ago
|
.TP
|
||
10 years ago
|
.B \-K \fIkey\fP
|
||
|
Only report data for given key.
|
||
|
.br
|
||
|
Multiple \fB\-K\fP options can be used to report more than a single key.
|
||
|
|
||
|
.nf
|
||
|
exiv2 \-K Exif.Photo.DateTimeDigitized -K Exif.Photo.DateTimeOriginal \-pt R.jpg
|
||
6 years ago
|
Exif.Photo.DateTimeOriginal Ascii 20 2011:09:18 16:25:48
|
||
|
Exif.Photo.DateTimeDigitized Ascii 20 2011:09:18 16:25:48
|
||
10 years ago
|
.fi
|
||
|
.TP
|
||
16 years ago
|
.B \-n \fIenc\fP
|
||
|
Charset to use to decode Exif Unicode user comments. \fIenc\fP is
|
||
|
a name understood by \fBiconv_open\fP(3), e.g., 'UTF-8'.
|
||
|
.TP
|
||
20 years ago
|
.B \-k
|
||
|
Preserve file timestamps when updating files (keep). Can be used with
|
||
|
all options which update files. The flag is ignored by read-only
|
||
|
options.
|
||
|
.TP
|
||
|
.B \-t
|
||
19 years ago
|
Set the file timestamp according to the Exif create timestamp in
|
||
20 years ago
|
addition to renaming the file (overrides \fB\-k\fP). This option is
|
||
|
only used with the 'rename' action.
|
||
|
.TP
|
||
|
.B \-T
|
||
19 years ago
|
Only set the file timestamp according to the Exif create timestamp, do
|
||
20 years ago
|
not rename the file (overrides \fB\-k\fP). This option is only used
|
||
19 years ago
|
with the 'rename' action. Note: On Windows you may have to set the TZ
|
||
|
environment variable for this option to work correctly.
|
||
20 years ago
|
.TP
|
||
6 years ago
|
.B \-f,\-F
|
||
|
These options are used by the commands 'rename' and 'extract' to
|
||
|
determine the file overwrite policy. These options are usually
|
||
|
combined with -v/--verbose to provide additional status output.
|
||
|
.br
|
||
|
.sp 1
|
||
|
The options --force and --Force apply to the 'rename' command.
|
||
|
The 'extract' command treats --force and --Force as permission to
|
||
|
overwrite.
|
||
|
.br
|
||
|
.sp 1
|
||
|
The default behaviour is to prompt the user.
|
||
|
.br
|
||
|
-f = Do not prompt before overwriting existing files.
|
||
|
.br
|
||
|
-F = Do not prompt before renaming files. Appends '_1'
|
||
|
('_2', ...) to the name of the new file. For example:
|
||
|
.sp 1
|
||
|
.nf
|
||
|
$ curl --silent -O http://clanmills.com/Stonehenge.jpg
|
||
|
$ exiv2 --verbose --Force rename Stonehenge.jpg
|
||
|
File 1/1: Stonehenge.jpg
|
||
|
Renaming file to ./20150716_153854.jpg
|
||
|
$ curl --silent -O http://clanmills.com/Stonehenge.jpg
|
||
|
$ exiv2 --verbose --Force rename Stonehenge.jpg
|
||
|
File 1/1: Stonehenge.jpg
|
||
|
Renaming file to ./20150716_153854_1.jpg
|
||
|
.sp 1
|
||
|
.fi
|
||
|
The 'rename' command will only overwrite files when the option --force is used. The option --Force is provided to avoid unintentional loss of valuable image files.
|
||
|
.sp 1
|
||
|
The 'extract' command will overwrite files when either --force or --Force is used. Overwriting extracted files will not cause the loss of image files.
|
||
|
.br
|
||
20 years ago
|
.TP
|
||
6 years ago
|
.B \-r \fIfmt\fP
|
||
|
Filename format for the 'rename' action. The format string follows
|
||
|
\fBstrftime\fP(3) and supports the following keywords:
|
||
|
.TS
|
||
|
l l.
|
||
|
:basename: original filename without extension
|
||
|
:dirname: name of the directory holding the original file
|
||
|
:parentname: name of parent directory
|
||
|
.TE
|
||
|
Default filename format is %Y%m%d_%H%M%S.
|
||
20 years ago
|
.TP
|
||
|
.B \-a \fItime\fP
|
||
|
Time adjustment in the format [\-]HH[:MM[:SS]]. This option is only
|
||
10 years ago
|
used with the 'adjust' action. Examples: 1 adds one hour, 1:01
|
||
20 years ago
|
adds one hour and one minute, \-0:00:30 subtracts 30 seconds.
|
||
|
.TP
|
||
18 years ago
|
.B \-Y \fIyrs\fP
|
||
|
Time adjustment by a positive or negative number of years, for
|
||
|
the 'adjust' action.
|
||
|
.TP
|
||
|
.B \-O \fImon\fP
|
||
|
Time adjustment by a positive or negative number of months, for
|
||
|
the 'adjust' action.
|
||
|
.TP
|
||
|
.B \-D \fIday\fP
|
||
|
Time adjustment by a positive or negative number of days, for
|
||
|
the 'adjust' action.
|
||
|
.TP
|
||
20 years ago
|
.B \-p \fImode\fP
|
||
|
Print mode for the 'print' action. Possible modes are:
|
||
7 years ago
|
.TS
|
||
|
l l.
|
||
19 years ago
|
s : print a summary of the Exif metadata (the default)
|
||
12 years ago
|
a : print Exif, IPTC and XMP metadata (shortcut for \-Pkyct)
|
||
9 years ago
|
e : print Exif metadata (shortcut for \-PEkycv)
|
||
10 years ago
|
t : interpreted (translated) Exif tags (\-PEkyct)
|
||
12 years ago
|
v : plain Exif tag values (\-PExgnycv)
|
||
|
h : hexdump of the Exif data (\-PExgnycsh)
|
||
|
i : IPTC datasets (\-PIkyct)
|
||
|
x : XMP properties (\-PXkyct)
|
||
20 years ago
|
c : JPEG comment
|
||
17 years ago
|
p : list available image previews, sorted by preview image size in pixels
|
||
9 years ago
|
C : print image ICC Profile (jpg, png, tiff, webp, cr2, jp2 only)
|
||
|
R : print image structure recursively (jpg, png, tiff, webp, cr2, jp2 only)
|
||
|
S : print image structure information (jpg, png, tiff, webp, cr2, jp2 only)
|
||
|
X : print "raw" XMP (jpg, png, tiff, webp, cr2, jp2 only)
|
||
7 years ago
|
.TE
|
||
20 years ago
|
.TP
|
||
17 years ago
|
.B \-P \fIflgs\fP
|
||
|
Print flags for fine control of the tag list ('print' action). Allows
|
||
|
control of the type of metadata as well as data columns included in
|
||
|
the print output. Valid flags are:
|
||
7 years ago
|
.TS
|
||
|
l l.
|
||
17 years ago
|
E : include Exif tags in the list
|
||
|
I : IPTC datasets
|
||
|
X : XMP properties
|
||
16 years ago
|
x : print a column with the tag number
|
||
19 years ago
|
g : group name
|
||
|
k : key
|
||
|
l : tag label
|
||
|
n : tag name
|
||
|
y : type
|
||
|
c : number of components (count)
|
||
|
s : size in bytes
|
||
9 years ago
|
v : plain data value (vanilla values)
|
||
|
V : plain data value AND the word 'set ' (for use with exiv2 -m-)
|
||
|
t : interpreted (translated) human readable data
|
||
19 years ago
|
h : hexdump of the data
|
||
7 years ago
|
.TE
|
||
19 years ago
|
.TP
|
||
20 years ago
|
.B \-d \fItgt\fP
|
||
|
Delete target(s) for the 'delete' action. Possible targets are:
|
||
7 years ago
|
.TS
|
||
|
l l.
|
||
20 years ago
|
a : all supported metadata (the default)
|
||
19 years ago
|
e : Exif section
|
||
|
t : Exif thumbnail only
|
||
20 years ago
|
i : IPTC data
|
||
18 years ago
|
x : XMP packet
|
||
20 years ago
|
c : JPEG comment
|
||
10 years ago
|
C : ICC Profile
|
||
9 years ago
|
I : All IPTC data
|
||
7 years ago
|
.TE
|
||
20 years ago
|
.TP
|
||
|
.B \-i \fItgt\fP
|
||
19 years ago
|
Insert target(s) for the 'insert' action. Possible targets are the
|
||
10 years ago
|
same as those for the \fB\-d\fP option, plus an optional modifier:
|
||
|
.sp 1
|
||
17 years ago
|
X : Insert metadata from an XMP sidecar file <file>.xmp. The remaining
|
||
|
insert targets determine what metadata to insert from the sidecar
|
||
|
file. Possible are Exif, IPTC and XMP and the default is all of
|
||
|
these. Note that the inserted XMP properties include those converted
|
||
|
to Exif and IPTC.
|
||
10 years ago
|
.sp 1
|
||
9 years ago
|
XX: Insert "raw" XMP metadata from a sidecar (see option -pX)
|
||
|
.sp 1
|
||
9 years ago
|
- : Read from stdin. This option is intended for "filter" operations such as:
|
||
10 years ago
|
.br
|
||
10 years ago
|
$ exiv2 -e{tgt}- \fIfilename\fP | xmllint .... | exiv2 -i{tgt}- \fIfilename\fP
|
||
10 years ago
|
.sp 1
|
||
10 years ago
|
Only JPEG thumbnails can be inserted (not TIFF thumbnails), and must be named \fIfile\fP\-thumb.jpg.
|
||
20 years ago
|
.TP
|
||
|
.B \-e \fItgt\fP
|
||
10 years ago
|
Extract target(s) for the 'extract' action. Possible targets are the same
|
||
17 years ago
|
as those for the \fB\-d\fP option, plus a target to extract preview
|
||
|
images and a modifier to generate an XMP sidecar file:
|
||
|
.br
|
||
|
p[<n>[,<m> ...]] : Extract preview images. The optional comma separated
|
||
|
list of preview image numbers is used to determine which preview images
|
||
|
to extract. The available preview images and their numbers are displayed
|
||
12 years ago
|
with the 'print' option \fB\-pp\fP.
|
||
10 years ago
|
.sp 1
|
||
10 years ago
|
C : Extract embedded ICC profile to <file>.icc
|
||
|
.sp 1
|
||
17 years ago
|
X : Extract metadata to an XMP sidecar file <file>.xmp. The remaining
|
||
|
extract targets determine what metadata to extract to the sidecar
|
||
|
file. Possible are Exif, IPTC and XMP and the default is all of these.
|
||
10 years ago
|
.sp
|
||
9 years ago
|
XX: Extract "raw" XMP metadata to a sidecar (see -pX)
|
||
10 years ago
|
.br
|
||
|
You may not use modify commands with the -eXX option and only XMP is written to the sidecar.
|
||
13 years ago
|
.sp 1
|
||
9 years ago
|
- : Output to stdout (see -i tgt for an example of this feature)
|
||
10 years ago
|
.sp 1
|
||
20 years ago
|
.TP
|
||
20 years ago
|
.B \-c \fItxt\fP
|
||
19 years ago
|
JPEG comment string to set in the image ('modify' action). This option
|
||
|
can also be used with the 'extract' and 'insert' actions to modify
|
||
10 years ago
|
metadata on-the-fly.
|
||
20 years ago
|
.TP
|
||
20 years ago
|
.B \-m \fIfile\fP
|
||
19 years ago
|
Command file for the 'modify' action. This option can also be used
|
||
|
with the 'extract' and 'insert' actions to modify metadata on-the-fly.
|
||
10 years ago
|
-m- represents standard-input.
|
||
20 years ago
|
.TP
|
||
|
.B \-M \fIcmd\fP
|
||
19 years ago
|
Command line for the 'modify' action. This option can also be used
|
||
|
with the 'extract' and 'insert' actions to modify metadata on-the-fly.
|
||
|
The format for the commands is the same as that of the lines of a
|
||
|
command file.
|
||
20 years ago
|
.TP
|
||
|
.B \-l \fIdir\fP
|
||
|
Location (directory) for files to be inserted or extracted.
|
||
|
.TP
|
||
|
.B \-S \fI.suf\fP
|
||
20 years ago
|
Use suffix \fI.suf\fP for source files in 'insert' action.
|
||
8 years ago
|
.br
|
||
|
.ne 40
|
||
20 years ago
|
.SH COMMANDS
|
||
10 years ago
|
Commands for the 'modify' action can be read from a command file, e.g.,
|
||
20 years ago
|
.sp 1
|
||
|
.nf
|
||
|
exiv2 \-m cmd.txt image.jpg
|
||
|
.fi
|
||
|
.sp 1
|
||
|
or given on the command line, as in
|
||
|
.sp 1
|
||
|
.nf
|
||
|
exiv2 \-M"add Iptc.Application2.Credit String Mr. Smith" image.jpg
|
||
|
.fi
|
||
|
.sp 1
|
||
10 years ago
|
Note the quotes. Multiple \fB\-m\fP and \fB\-M\fP options can be combined,
|
||
|
and a non-standard XMP namespace registered.
|
||
|
.sp 1
|
||
|
.nf
|
||
|
exiv2 \-M"reg myprefix http://ns.myprefix.me/" \-M"add Xmp.myprefix.Whom Mr. Smith" \-M"set Exif.Image.Artist Mr. Smith" image.jpg
|
||
|
.fi
|
||
20 years ago
|
.sp 1
|
||
10 years ago
|
When writing Exif, IPTC and XMP metadata,
|
||
|
.B exiv2
|
||
20 years ago
|
enforces only a correct
|
||
|
metadata structure. It is possible to write tags with types and values
|
||
19 years ago
|
different from those specified in the standards, duplicate Exif tags,
|
||
10 years ago
|
undefined tags, or incomplete metadata. While
|
||
|
.B exiv2
|
||
20 years ago
|
is able to read
|
||
|
all metadata that it can write, other programs may have difficulties
|
||
12 years ago
|
with images that contain non standard-conforming metadata.
|
||
20 years ago
|
.SS Command format
|
||
|
The format of a command is
|
||
|
.sp 1
|
||
|
.nf
|
||
|
\fBset | add | del\fP \fIkey\fP [[\fItype\fP] \fIvalue\fP]
|
||
|
.fi
|
||
|
.TP
|
||
|
.B set
|
||
|
Set the \fIvalue\fP of an existing tag with a matching \fIkey\fP or
|
||
|
add the tag.
|
||
|
.TP
|
||
|
.B add
|
||
|
Add a tag (unless \fIkey\fP is a non\-repeatable IPTC key; nothing
|
||
19 years ago
|
prevents you from adding duplicate Exif tags).
|
||
20 years ago
|
.TP
|
||
|
.B del
|
||
19 years ago
|
Delete all occurrences of a tag (requires only a \fIkey\fP).
|
||
20 years ago
|
.TP
|
||
|
.I key
|
||
16 years ago
|
Exiv2 Exif, IPTC or XMP key.
|
||
20 years ago
|
.TP
|
||
|
.I type
|
||
|
.B Byte | Ascii | Short | Long | Rational | Undefined | SShort | SLong | SRational | Comment
|
||
18 years ago
|
for Exif keys,
|
||
20 years ago
|
.br
|
||
|
.B String | Date | Time | Short | Undefined
|
||
18 years ago
|
for IPTC keys, and
|
||
|
.br
|
||
|
.B XmpText | XmpAlt | XmpBag | XmpSeq | LangAlt
|
||
|
for XMP keys.
|
||
20 years ago
|
.sp 1
|
||
14 years ago
|
A default \fItype\fP is used if none is explicitly given. The default
|
||
20 years ago
|
is determined based on \fIkey\fP.
|
||
|
.TP
|
||
|
.I value
|
||
|
The remaining text on the line is the value. It can optionally be
|
||
19 years ago
|
enclosed in single quotes ('\fIvalue\fP') or double quotes ("\fIvalue\fP").
|
||
20 years ago
|
.sp 1
|
||
14 years ago
|
The value is optional. Not providing any value is equivalent to an
|
||
|
empty value ("") and is mainly useful to create an XMP array property,
|
||
|
e.g., a bag.
|
||
|
.sp 1
|
||
19 years ago
|
The format of Exif \fBComment\fP values includes an optional charset
|
||
20 years ago
|
specification at the beginning:
|
||
10 years ago
|
.br
|
||
20 years ago
|
.B [charset=Ascii|Jis|Unicode|Undefined ]\fIcomment\fP
|
||
|
.sp 1
|
||
10 years ago
|
.B Undefined
|
||
20 years ago
|
is used by default if the value doesn't start with a charset
|
||
|
definition.
|
||
|
.sp 1
|
||
10 years ago
|
The format for an IPTC \fBDate\fP value is:
|
||
9 years ago
|
.sp 1
|
||
10 years ago
|
YYYY\-MM\-DD (year, month, day)
|
||
9 years ago
|
.sp 1
|
||
10 years ago
|
The format for an IPTC \fBTime\fP value is:
|
||
9 years ago
|
.sp 1
|
||
10 years ago
|
HH:MM:SS (hours, minutes, seconds)
|
||
9 years ago
|
.sp
|
||
10 years ago
|
and may optionally be followed by:
|
||
9 years ago
|
.sp 1
|
||
10 years ago
|
\-HH:MM or +HH:MM (hours, minutes ahead/behind UTC)
|
||
9 years ago
|
.sp 1
|
||
10 years ago
|
The format of \fBRational\fP (and \fBSRational\fP) is one of:
|
||
9 years ago
|
.sp 1
|
||
|
integer | integer/integer | Fnumber | number
|
||
|
.sp 1
|
||
10 years ago
|
Rational Examples:
|
||
9 years ago
|
.sp 1
|
||
9 years ago
|
.nf
|
||
9 years ago
|
$ exiv2 "-Mset Exif.Photo.MaxApertureValue 557429/62500" X.jpg
|
||
|
$ exiv2 "-Mset Exif.Photo.MaxApertureValue F5.6" X.jpg
|
||
9 years ago
|
.fi
|
||
10 years ago
|
.sp 1
|
||
9 years ago
|
The Rational format Fnumber is for the convenience of setting aperture values. Aperture values
|
||
10 years ago
|
are stored in Exif is an \fBAPEX\fP value which can be evaluated by the expression:
|
||
|
.sp 1
|
||
9 years ago
|
.nf
|
||
|
apex-value = log(Fnumber) * 2.0 / log(2.0)
|
||
9 years ago
|
number = exp(apex-value * log(2.0) / 2.0)
|
||
9 years ago
|
.fi
|
||
10 years ago
|
.sp 1
|
||
10 years ago
|
The Rational format Fnumber is valid for any \fBRational\fP, even when the key is not an Aperture.
|
||
10 years ago
|
More information about \fBAPEX\fP value is available from: http://en.wikipedia.org/wiki/APEX_system
|
||
10 years ago
|
.sp 1
|
||
10 years ago
|
The format of XMP \fBLangAlt\fP values includes an optional language qualifier:
|
||
9 years ago
|
.nf
|
||
|
.B lang="\fIlanguage-code\fP\fI" text\fP
|
||
|
.fi
|
||
10 years ago
|
.sp
|
||
|
lang="x-default" is used if the value doesn't start with a language qualifier.
|
||
18 years ago
|
.sp 1
|
||
9 years ago
|
.nf
|
||
9 years ago
|
$ exiv2 -M'set Xmp.dc.title lang="de-DE" Euros' X.jpg
|
||
|
$ exiv2 -M'set Xmp.dc.title lang="en-GB" Pounds' X.jpg
|
||
|
$ exiv2 -M'set Xmp.dc.title lang="en-US" In God We Trust' X.jpg
|
||
|
$ exiv2 -M'set Xmp.dc.title All others pay cash' X.jpg
|
||
9 years ago
|
.fi
|
||
18 years ago
|
.sp 1
|
||
10 years ago
|
To remove a language specification, set the value to '' (empty string)
|
||
9 years ago
|
.nf
|
||
|
exiv2 -M'set Xmp.dc.title lang="en-US"' X.jpg
|
||
|
.fi
|
||
10 years ago
|
To remove all language specifications, delete the key:
|
||
9 years ago
|
.nf
|
||
9 years ago
|
$ exiv2 -M'del Xmp.dc.title' X.jpg
|
||
9 years ago
|
.fi
|
||
10 years ago
|
To register additional XMP namespaces, combine the command with:
|
||
18 years ago
|
.nf
|
||
|
\fBreg\fP \fIprefix\fP \fInamespace\fP
|
||
8 years ago
|
.br
|
||
|
.ne 4
|
||
18 years ago
|
.fi
|
||
20 years ago
|
.SS Command file format
|
||
|
Empty lines and lines starting with \fB#\fP in a command file are
|
||
|
ignored (comments). Remaining lines are commands as described above.
|
||
8 years ago
|
.br
|
||
|
.ne 40
|
||
7 years ago
|
.SH CONFIGURATION FILE
|
||
|
Exiv2 can read an optional configuration file ~/.exiv2 on Unix systems and %USERPROFILE%\\exiv2.ini on Windows (using a Visual Studio build). Cygwin and MinGW/msys2 follow the unix convention and use ~/.exiv2 You can fine the location of the configuration file with the command:
|
||
|
.br
|
||
|
.sp 1
|
||
|
.nf
|
||
|
$ exiv2 --verbose --version --grep config_path
|
||
|
exiv2 0.27.0.1
|
||
|
config_path=/Users/rmills/.exiv2
|
||
|
.fi
|
||
|
.sp 1
|
||
|
The purpose of the configuration file is to define your own lenses for recognition by Exiv2. The configuration file is in Windows .ini format and has sections for each of the major camera manufactures canon,nikon,pentax,minolta,olympus and sony. The lens metadata is stored as a integer called the lensID. You can change the lens name associated with any lensID.
|
||
|
.br
|
||
|
.sp 1
|
||
|
.nf
|
||
|
$ cat ~/.exiv2
|
||
|
[nikon]
|
||
|
146=Robin's Sigma Lens <--- The name of your lens
|
||
|
.fi
|
||
|
.sp 1
|
||
|
You obtain the lensID for your camera with the command:
|
||
|
.nf
|
||
|
.sp 1
|
||
|
$ exiv2 -pv --grep lens/i http://clanmills.com/Stonehenge.jpg
|
||
6 years ago
|
0x0083 Nikon3 LensType Byte 1 14
|
||
|
0x0084 Nikon3 Lens Rational 4 180/10 2500/10 35/10 63/10
|
||
|
0x008b Nikon3 LensFStops Undefined 4 55 1 12 0
|
||
|
0x000c NikonLd3 LensIDNumber Byte 1 146 <--- This number
|
||
|
0x000d NikonLd3 LensFStops Byte 1 55
|
||
7 years ago
|
.br
|
||
|
.ne 40
|
||
20 years ago
|
.SH EXAMPLES
|
||
|
.TP
|
||
|
exiv2 *.jpg
|
||
6 years ago
|
Prints a summary of the Exif information for all JPEG files in the directory. The summary report is rather brief and presentation does not use the Family.Group.Tag convention.
|
||
|
|
||
|
If you use --grep pattern, the default becomes -pa. See -g/grep above.
|
||
|
|
||
|
.nf
|
||
|
$ exiv2 -g Date http://clanmills.com/Stonehenge.jpg
|
||
|
|
||
|
.fi
|
||
20 years ago
|
.TP
|
||
12 years ago
|
exiv2 \-pi image.jpg
|
||
20 years ago
|
Prints the IPTC metadata of the image.
|
||
|
.TP
|
||
19 years ago
|
exiv2 rename img_1234.jpg
|
||
|
Renames img_1234.jpg (taken on 13\-Nov\-05 at 22:58:31) to 20051113_225831.jpg
|
||
|
.TP
|
||
12 years ago
|
exiv2 \-r':basename:_%Y%m' rename img_1234.jpg
|
||
19 years ago
|
Renames img_1234.jpg to img_1234_200511.jpg
|
||
20 years ago
|
.TP
|
||
|
exiv2 \-et img1.jpg img2.jpg
|
||
19 years ago
|
Extracts the Exif thumbnails from the two files into img1\-thumb.jpg
|
||
20 years ago
|
and img2\-thumb.jpg.
|
||
|
.TP
|
||
|
exiv2 \-it img1.jpg img2.jpg
|
||
|
Inserts (copies) metadata from img1.exv to img1.jpg and from img2.exv
|
||
|
to img2.jpg.
|
||
|
.TP
|
||
17 years ago
|
exiv2 \-ep1,2 image.jpg
|
||
|
Extracts previews 1 and 2 from the image to the files image\-preview1.jpg
|
||
|
and image\-preview2.jpg.
|
||
|
.TP
|
||
10 years ago
|
exiv2 \-eiX image.jpg
|
||
17 years ago
|
Extracts IPTC datasets into an XMP sidecar file image.xmp and in the
|
||
|
process converts them to "IPTC Core" XMP schema.
|
||
|
.TP
|
||
|
exiv2 \-iixX image.jpg
|
||
|
Inserts IPTC and XMP metadata from an XMP sidecar file image.xmp into
|
||
|
image.jpg. The resulting IPTC datasets are converted from the "IPTC
|
||
|
Core" XMP schema properties in the sidecar file to the older IPTC IIM4
|
||
|
format. The inserted XMP properties include those in the "IPTC Core"
|
||
|
XMP schema.
|
||
|
.TP
|
||
19 years ago
|
exiv2 \-M"set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg
|
||
|
Sets the Exif comment to an ASCII string.
|
||
20 years ago
|
.TP
|
||
9 years ago
|
exiv2 \-M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \\ \-M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg
|
||
20 years ago
|
Sets the latitude to 4 degrees, 15 minutes and 33 seconds north. The
|
||
19 years ago
|
Exif standard stipulates that the GPSLatitude tag consists of three
|
||
20 years ago
|
Rational numbers for the degrees, minutes and seconds of the latitude
|
||
|
and GPSLatitudeRef contains either 'N' or 'S' for north or south
|
||
|
latitude respectively.
|
||
19 years ago
|
.TP
|
||
12 years ago
|
exiv2 insert \-l/tmp -S.CRW /data/*.JPG
|
||
19 years ago
|
Copy all metadata from CRW files in the /tmp directory to JPG files
|
||
|
with corresponding basenames in the /data directory. Note that this
|
||
|
copies metadata as is, without any modifications to adapt it to the
|
||
|
requirements of the target format. Some tags copied like this may not
|
||
|
make sense in the target image.
|
||
20 years ago
|
.SH SEE ALSO
|
||
|
.TP
|
||
6 years ago
|
.I https://exiv2.org/sample.html#modify
|
||
18 years ago
|
Sample command files.
|
||
20 years ago
|
.TP
|
||
6 years ago
|
.I https://exiv2.org/metadata.html
|
||
20 years ago
|
Taglists with \fIkey\fP and default \fItype\fP values.
|
||
19 years ago
|
.SH AUTHORS
|
||
10 years ago
|
.B exiv2
|
||
6 years ago
|
was written by Andreas Huggel and others. The Exiv2 project web site is https://exiv2.org. The code is hosted on GitHub at https://github.com/exiv2/exiv2
|
||
20 years ago
|
.PP
|
||
10 years ago
|
This manual page was originally created for the Debian project by KELEMEN Peter <fuji@debian.org>.
|