How to install and use exiftool on linux
Содержание:
- Как пользоваться ExifTool?
- Changelog 1.4.1 bugfix
- Usage
- Performance
- Windows
- Syntax
- List All Metadata of Given Image/File
- Export Metadata Into HTML File
- List Metadata In CSV Format
- List Specific Metadata
- Write/Set/Change Metadata
- Metadata panel
- Introduction
- 3. Как установить и использовать Exiftool на Ubuntu 17
- Supported JPEG metadata
Как пользоваться ExifTool?
Программа ExifTool не имеет пользовательского графического интерфейса. Работа с утилитой осуществляется посредством команд, вводимых через консоль (командную строку) Windows. Исполняемый файл «exiftool.exe» также может работать самостоятельно. Все команды (при использовании через Windows-консоль) имеют примерно следующий вид:
exiftool.exe *FILE*
Более подробную информацию по всем командам можно получить из справки, автоматически выводимой на экран при запуске через командную строку файла «exiftool.exe» без каких-либо параметров.
Для работы утилиты в самостоятельном режиме исполнимый файл «exiftool.exe» следует переименовать, добавив к нему специфические параметры (также описаны в справке). Например, если дать ему название «exiftool(-k -a -u -g1 -w txt).exe», а затем поместить мышкой поверх него файл, метаданные которого нужно считать, программа на выходе создаст текстовый TXT-документ со всей полученной информацией.
Changelog 1.4.1 bugfix
- Fix: Issue #38 «Copy from selected image» adds leading space character for strings. All strings now «trim»-med, removing leading/trailing spaces.
- Fix: Issue #42 When running on java 9 or above. You get a warning: «WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance». No problem at all and absolutely no performace impact (stupid log4j warning), but now the jar is converted to a «multi-version» jar.
previous 1.4.0
- Add «add favorites/load favorites» to «Your Commands» tab and to «Exiftool Database» tab. You can save your favorite exiftool commands and/or queries to the database.
- Add option to configure and use RAW image viewer: For all images (clunky on McOS as MacOS wants it own viewer), or only for raw images. Other formats (txt/audio/video/etc) will be opened according mime-type with their default app (if installed).
- Linux: Set default font to SansSerif instead of Linux/java default Dialog bold. (Will be configurable for MacOS/Windows/Linux in 1.5)
- Fix: Issue #36: Fix linewrap in exif:description and xmp:description.
- Fix: Issue #37: Tif(f) files not previewed. They are now differently handled based on java version.
- tiff images with preview/thumbnail images inside are displayed (this was already working).
- tiff images without preview/thumbnail inside can only be displayed on java V11 or higher. Use a «full jre» version (comes with V11) or install V11 or newer.
- Add «update» function. This new 1.4 does an extension on the database. You don’t want to lose your user data (currently only lens configs if applicable)
- Internal: add program icon to all windows (top-left)(not on MacOS as MacOS does not allow it).
- Internal: DB diagram was displayed in external browser window. Is now displayed in internal scroll panel. It is «uncoupled» from the main window so you can keep it open.
Usage
In general MiniExiftool is very intuitive to use as the following examples show:
# Reading meta data from a file photo = MiniExiftool.new 'photo.jpg' puts photo.title # Alternative reading meta data from an IO instance photo = MiniExiftool.new io puts photo.title # Writing meta data photo = MiniExiftool.new 'photo.jpg' photo.title = 'This is the new title' photo.save # Copying meta data photo = MiniExiftool.new('photo.jpg') photo.copy_tags_from('another_photo.jpg', :author)
For further information about using MiniExiftool read the Tutorial.md.
in the project root folder and have a look at the examples in directory
examples.
Performance
The target reads all tags found in a batch of sample images and
parses the results.
Using :
Read 2236 unique tags from 3011 files.Parsing took 16191ms (5.4ms / file)Parsing took 27141ms (9.0ms / file)Parsing took 12545ms (4.2ms / file)
Using the npm package takes 7x longer (and doesn’t work on Windows):
Reading 3011 files...Parsing took 85654ms (28.4ms / file)
Using ExifTool’s batch mode means we can reuse a single
instance of ExifTool across many requests, dropping response latency
dramatically as well as reducing system load.
To avoid overwhelming your system, the singleton is configured with a
set to a quarter the number of CPUs on the current system (minimally
1); no more than instances of will be spawned. If the
system is CPU constrained, however, you may want a smaller value. If you have
very fast disk IO, you may see a speed increase with larger values of
, but note that each child process can consume 100 MB of RAM.
Windows
We can download the exiftool for Windows operating systems from the following URL. This zip file provides a single executable file without any installation.
We just need to extract the file with WinZip, 7zip, WinRAR etc.
Syntax
The Syntax of the exiftool is like below. We can see that there is 4 different syntax for different use cases like reading metadata, writing metadata, copying metadata and other operations.
exiftool Syntax
List All Metadata of Given Image/File
We can list all metadata by providing the file we want to inspect. In this example, we will list all metadata of . As we can see this is a png file which is an image format.
List All Metadata
As we can see there are a lot of metadata from a simple png file.
- specifies the version of the tool which is 11.10.
- specifies the name of the file which is “Tux.png”.
- specifies the path which is the current working directory.
- specifies the size of the given file which is 37 kB.
- specifies the modification date and time which is “2019:03:13 05:45:32-07:00”.
- specifies the access date and time which is “2019:03:13 05:45:32-07:00”.
- specifies the Inode or disk change date and time which is “2019:03:13 05:45:32-07:00”.
- specifies current user, group, and other permissions of the file which is .
- specifies the type of the file which is `PNG` in this case.
- specifies the extension of the file which is “png” in this example.
- specifies the mime code of the file which is “image/png” in this example.
- specifies the width pixel count of the given image which is 300 in this case.
- specifies the height pixel count of the given image which is 354 in this case.
- specifies the pixel bit or quality which is 8 bit in this example.
- specifies the color representation which is “RGB with Alpha” in this case.
- specifies the compression type of the given image which is “Deflate/Inflate” in this example.
- specifies the filter type.
- specifies the RGB representation which is “255 255 255”.
- specifies the date the image modifies in original which is “2018:12:25 19:33:00”.
- specifies the creation date and time of the original image “2018-12-25T19:33:00+00:00”.
- specifies the modification date and time of the original image “2018-12-25T19:33:00+00:00”.
- specifies the megapixel or pixel count in a mega format which is 0.106 in this case.
Export Metadata Into HTML File
We can export metadata of given files or images into an HTML file format with the option. In this example, we will export metadata of into HTML name Tux.html.
Export Metadata Into HTML File
List Metadata In CSV Format
We can print given file and images metadata in CSV format. This can be a single file or image or a whole directory which can contain multiple files and image. In this example, we will print
List Metadata In CSV Format
List Specific Metadata
We can also list and print specific metadata by using command. In this example, we will print metadata.
List Specific Metadata
Write/Set/Change Metadata
We can also write or overwrite metadata of the given file. In this example, we will overwrite the metadata of . We will use the option and provide the metadata we want to change or set with the metadata value.
Metadata panel
WorkspaceWorkspace managerWorkspaceWorkspace
Edit metadata in Workspace
WorkspaceClick on tag line you wish to modify
Press Enter key or click into Value edit field (which becomes yellow)
Write tag value and press Enter key when you’re done (or press Esc key to cancel editing)
Tag name you’ve previously selected becomes yellow and contain value you’ve just written
If needed, pick another tag and repeat process
Note:Undo selected editingWorkspaceNote:When you’re finished with editing metadata values, click on Save button.
a bitLargeEditing tags which names ends with ± characterbird+flight-bird+nature+daylight+sky-water-treeNote:Advice:
MetadataNote:Note:Metadata languagePreferencesExifTool standard (short)Fill in default valuesWorkspace*Workspace managerUndo selected editingWorkspaceAdd tag to WorkspaceExif, XmpIptcWorkspaceWorkspaceWorkspace managerRemove tag from WorkspaceWorkspaceAdd tag to Custom viewWorkspaceCustomRemove tag from Custom viewCustomCustomCustomAdd tag to Filelist DetailsExif, XmpIptcDetails: User definedMark/Unmark tagWorkspaceWorkspaceNote:Exiftool standard (short)Preferences
Introduction
ExifToolPhil Harvey-it shows more metadata tags than any other tool,
-it allows to edit almost any metadata tag,
-it is very secure to use, is regulary updated and has the best possible support.
-view all metadata that ExifTool recognizes,
-ability to edit most frequently used metadata tags,
-batch capability (where appropriate), means: you can select multiple files and modify them at once.
simple!Important change in ExifToolGUI v5.xxUTF-8characters inside metadata will be shown properly, if metadata content is UTF-8 encoded
edited metadata values will be automatically saved in UTF-8 format
What’s all about?
It’s about displaying «foreign», country specific characters:
For Xmp metadata, UTF-8 charset is used as default charset since beginning, so nothing changes here. For Iptc metadata, UTF-8 charset has also become officially recommended. Right now, the only exception is Exif, which oficially doesn’t support UTF-8 yet. However, Metadata Working Group (MWG) organisation recommends using UTF-8 in Exif as well.and consequence
It can/will happen, that GUI will show some «weird» characters where country specific characters should appear -if at all, this can/will happen for existing Exif metadata content (i.e: Exif:Artist). If you notice this, then this means, metadata content isn’t UTF-8 encoded. Now, what you can do is, you can either:
-quit using GUI v5, or
-change/overwrite such tag content (which becomes UTF-8 encoded).
But be aware, that UTF-8 encoded Exif content might not be properly recognized by some other software… it’s your choice. Anyway, all this concerns only «foreign» characters: if you allready used «standard» alphabet (ASCII) characters only, then you won’t notice any difference.however
If really needed, then you can still enter «old» ANSI (non-UTF-8) encoded data by using -L option in ExifTool direct mode, i.e:
-and show such data in Log window, i.e.:
Obviously, such data won’t be displayed correctly in GUI Metadata panel, because here, UTF-8 encoded data is expected.
3. Как установить и использовать Exiftool на Ubuntu 17
Шаг 1 Чтобы установить Exiftool в Ubuntu, мы получаем доступ к терминалу и выполняем следующую команду:
sudo apt установить libimage-exiftool-perl
Мы принимаем загрузку и соответствующую установку пакетов Exiftool.
Шаг 2 Для визуализации метаданных объекта сначала нужно перейти в каталог, в котором он размещен, и использовать следующий синтаксис: exiftool «file», в этом случае мы боимся изображения на рабочем столе и будем использовать строку exiftool «Solvetic.jpg» и Нажав Enter, мы увидим следующее:
Мы можем детально увидеть каждый аспект выбранного изображения.
Шаг 3 Эту информацию можно экспортировать в файл HTML, используя следующий синтаксис:
exiftool -h. > example.html
Supported JPEG metadata
ExifTool can read, edit or create the following types of metadata in JPEG images:
JPEG Meta Information | Can read? | Can edit? | Can create? | Description |
---|---|---|---|---|
APP0 — JFIF | Yes | Yes | Yes | JPEG File Interchange Format |
APP0 — JFXX | Yes | No | No | Extended JFIF |
APP0 — CIFF | Yes | Yes | No | Camera Image File Format (used by some Canon models) |
APP0 — AVI1 | Yes | No | No | JPEG AVI information |
APP0 — Ocad | Yes | No | No | Photobucket Ocad segment |
APP1 — EXIF | Yes | Yes | Yes | Exchangeable Image File Format (including maker notes) |
APP1 — XMP | Yes | Yes | Yes | Extensible Metadata Platform (multi-segment) |
APP1 — QVCI | Yes | No | No | Casio QV-7000SX QVCI information |
APP1 — FLIR | Yes | No | No | FLIR thermal imaging data (multi-segment) |
APP1 — RawThermalImage | Yes | No | No | Thermal image from Parrot Bebop-Pro Thermal drone |
APP2 — ICC | Yes | Yes | Yes | International Color Consortium (multi-segment) |
APP2 — FPXR | Yes | No | No | FlashPix Ready (multi-segment) |
APP2 — MPF | Yes | No | No | Multi-Picture Format |
APP2 — PreviewImage | Yes | No | No | Samsung APP2 preview image (multi-segment) |
APP3 — Kodak Meta | Yes | Yes | No | Kodak Meta information (Exif-like) |
APP3 — Stim | Yes | No | No | Stereo Still Image format |
APP3 — PreviewImage | Yes | No | No | Samsung/HP preview image (multi-segment) |
APP4 — Scalado | Yes | No | No | (presumably written by Scalado mobile software) |
APP4 — FPXR | Yes | No | No | FlashPix Ready in non-standard location (multi-segment) |
APP4 — PreviewImage | Yes | No | No | (continued from APP3) |
APP5 — Ricoh RMETA | Yes | No | No | Ricoh custom fields |
APP5 — Samsung UniqueID | Yes | No | No | Samsung Unique ID |
APP5 — PreviewImage | Yes | No | No | (continued from APP4) |
APP6 — EPPIM | Yes | No | No | Toshiba PrintIM |
APP6 — NITF | Yes | No | No | National Imagery Transmission Format |
APP6 — HP TDHD | Yes | No | No | Hewlett-Packard Photosmart R837 TDHD information |
APP6 — GoPro | Yes | No | No | GoPro Metadata Format (GPMF) information |
APP7 — Pentax | Yes | No | No | Pentax APP7 maker notes |
APP7 — Qualcomm | Yes | No | No | Qualcomm Camera Attributes |
APP8 — SPIFF | Yes | No | No | Still Picture Interchange File Format |
APP9 — Media Jukebox | Yes | No | No | Media Jukebox XML information |
APP10 — Comment | Yes | No | No | PhotoStudio Unicode Comment |
APP11 — JPEG-HDR | Yes | No | No | JPEG-HDR compressed ratio image |
APP12 — Picture Info | Yes | No | No | ASCII-based Picture Information |
APP12 — Ducky | Yes | Yes | Yes | Photoshop «Save for Web» |
APP13 — Photoshop IRB | Yes | Yes | Yes | Image Resource Block (multi-segment, includes IPTC) |
APP13 — Adobe CM | Yes | No | No | Adobe Color Management |
APP14 — Adobe | Yes | Yes | Yes | Adobe DCT filter |
APP15 — GraphicConverter | Yes | No | No | GraphicConverter quality |
COM | Yes | Yes | Yes | JPEG Comment (multi-segment) |
DQT | Yes | No | No | (used to calculate the Extra:JPEGDigest tag value) |
SOF | Yes | No | No | JPEG Start Of Frame |
AFCP trailer | Yes | Yes | No | AXS File Concatenation Protocol (includes IPTC) |
CanonVRD trailer | Yes | Yes | Yes | Canon DPP Recipe Data |
FotoStation trailer | Yes | Yes | No | FotoWare FotoStation (includes IPTC) |
PhotoMechanic trailer | Yes | Yes | No | Camera Bits Photo Mechanic |
MIE trailer | Yes | Yes | No | Meta Information Encapsulation |
Samsung trailer | Yes | No | No | Samsung Galaxy trailer |
PreviewImage trailer | Yes | Yes | Yes | (preview image written after JPEG EOI) |
EmbeddedVideo trailer | Yes | No | No | (extracted only with ExtractEmbedded option) |