Add metadata viewer script
This commit is contained in:
@@ -51,6 +51,32 @@ Manual grouping uses filesystem items, not media-file detection:
|
||||
- one empty directory does nothing
|
||||
- multiple files/folders are grouped as selected, without flattening folder contents
|
||||
|
||||
### `view_metadata.py`
|
||||
|
||||
Show all readable metadata for the first file provided:
|
||||
|
||||
```bash
|
||||
python3 view_metadata.py path/to/file/or/directory [...]
|
||||
```
|
||||
|
||||
This script only displays one file. If several files are given, it displays the first one. If a directory is given, it searches recursively and displays the first file it finds.
|
||||
|
||||
It runs ExifTool as:
|
||||
|
||||
```bash
|
||||
exiftool -a -u -ee -G0:1 -s file
|
||||
```
|
||||
|
||||
The important choices are:
|
||||
|
||||
- `-a` shows duplicate tag names instead of hiding later duplicates.
|
||||
- `-u` includes unknown tags ExifTool can identify well enough to print.
|
||||
- `-ee` extracts embedded metadata where ExifTool supports it, which is useful for some video/container formats.
|
||||
- `-G0:1` shows both the broad metadata container and the more exact location, such as `EXIF:IFD0` or `QuickTime:Track1`.
|
||||
- `-s` uses compact tag names, which are easier to copy into scripts than the descriptive labels.
|
||||
|
||||
The old `-G` style shows broad groups like `EXIF`, `File`, or `QuickTime`. That is readable, but it can hide where inside a container a value came from. Family 1 groups, from `-G1`, show more exact locations like `IFD0`, `ExifIFD`, `MakerNotes`, or `Track1`, but sometimes lose the broader context. `-G0:1` combines both, so it is the most useful default for debugging metadata without changing which normal tags are extracted. The organization option changes labels, not the underlying metadata extraction; `-a` and `-u` are the parts that affect whether duplicate or unknown printed tags are included.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Python 3.10 or newer
|
||||
|
||||
Reference in New Issue
Block a user