Geotagging decoders: GPS from EXIF/XMP/QuickTime/GeoTIFF/EXR/PSD/CR3 (26 fixtures, 26 PASS)
Dedicated pass in src/geotag.c (dispatched by task number) reporting latitude/longitude/altitude/datum/datetime for JPEG/TIFF/RAW (EXIF GPS IFD 0x8825), PNG (eXIf + XMP), WebP (EXIF + XMP, new task 861), HEIC/HEIF/AVIF (Exif + mime XMP items), MP4/MOV (prefixed (c)xyz, udta/meta ISO6709 keys, XMP_ and uuid XMP), 3GP loci, CR3 CMT4 + CTBO XMP, GeoTIFF tiepoint/transformation, EXR float attrs, JP2 uuid XMP, PSD resources 1058/1060, MKV/AVI XMP only (no native GPS field). Fixtures in tests/geotag/ cross-checked against exiftool 13.50 and real files written by exiftool/ffmpeg. Full suite unchanged: 650 PASS / 97 PARTIAL / 2 FAIL / 105 NO SAMPLE.
No files matched your search
@@ -25,8 +25,9 @@ Header (big-endian):
|
||||
|
||||
## Coverage
|
||||
|
||||
831 formats (the 849 that exist at fileformat.vpscoder.com — "860" is the
|
||||
max task number; 11 numbers have no published page). The format table is
|
||||
850 formats (the 849 that exist at fileformat.vpscoder.com — "860" is the
|
||||
max task number; 11 numbers have no published page — plus WebP, added as
|
||||
task 861, which has no published page). The format table is
|
||||
derived from the C/C++ reference code for each format (see
|
||||
`tools/all_formats.cpp`, 833 code blocks from 831 tasks) plus a curated
|
||||
magic table and hand overrides for well-known container formats
|
||||
@@ -50,20 +51,73 @@ with no C/C++ code at all (108, 151, 172, 233, 300, 312, 345, 369, 398, 408,
|
||||
532, 623, 671, 720, 741, 757, 793, 794) are `nocode`/`nocode-text` unless a
|
||||
hand override exists for them (300 ICE and 398 MKA have overrides).
|
||||
|
||||
## Geotagging
|
||||
|
||||
After the header table, `sfile` prints a `Geotagging:` section for the
|
||||
formats where GPS location genuinely exists, decoding it from the
|
||||
container's own metadata (never invented). Latitude/longitude are decimal
|
||||
degrees (with the DMS form in parentheses), altitude is metres above (or
|
||||
below) sea level, datum defaults to WGS-84 (EPSG:4326), and the timestamp
|
||||
is normalised to ISO `YYYY-MM-DD HH:MM:SS` UTC.
|
||||
|
||||
| format | task(s) | source decoded |
|
||||
|---|---|---|
|
||||
| JPEG, TIFF, CR2, NEF, DNG | 331/332, 730, 109, 445, 144 | EXIF GPS IFD via IFD0 tag 0x8825 (EXIF 2.32: 0x0000 version, 0x0001/0x0002 lat ref/value, 0x0003/0x0004 lon, 0x0005/0x0006 alt ref/value, 0x0007 timestamp, 0x0012 datum, 0x001D datestamp; RATIONAL[3] DMS) |
|
||||
| GeoTIFF | 257 | ModelTiepointTag 33922 / ModelTransformationTag 34264 + GeoKeyDirectoryTag 34735 (GeoKey 2048 = 4326 WGS 84) |
|
||||
| PNG | 564 | `eXIf` chunk (raw TIFF) and XMP in `iTXt` keyword `XML:com.adobe.xmp` |
|
||||
| WebP | 861 | `EXIF` and `XMP ` chunks (WebP has no blog task; added as 861 — see `tools/overrides.json`) |
|
||||
| HEIC / HEIF / AVIF | 286, 287, 48 | Exif item in `meta` via `iinf`/`iloc`; XMP as a mime item (`item_type` "mime", content type `application/rdf+xml`) |
|
||||
| MP4 / MOV / M4V / F4V / M4A | 415, 412, 373, 207, 370 | `moov/udta` (c)xyz atom (ISO 6709 string; canonical QuickTime text layout `[u16 size][u16 lang]text`, bare strings also accepted), `moov/udta/meta` key `com.apple.quicktime.location.ISO6709` (keys/ilst), XMP in `udta/XMP_` and in a top-level `uuid` box (UUID BE7ACFCB-97A9-42E8-9C71-999491E3AFAC — the layout exiftool itself writes) |
|
||||
| 3GP / 3G2 | 4, 3 | `moov/udta` loci box (3GPP TS 26.244: signed 16.16 fixed-point lon/lat/alt) |
|
||||
| CR3 | 110 | GPS IFD in the CMT4 box inside `moov/uuid` (Canon); XMP via the CTBO table entry 1 |
|
||||
| EXR | 199 | header attributes `longitude` / `latitude` / `altitude` (float32, degrees E/N, metres) |
|
||||
| JP2 | 329 | XMP in the `uuid` box (UUID BE7ACFCB-97A9-42E8-9C71-999491E3AFAC) or an `xml ` box |
|
||||
| PSD | 575 | EXIF in image resource 1058 (0x0422), XMP in resource 1060 (0x0424) |
|
||||
| MKV / WebM | 399, 805 | XMP attachment only (no native GPS field exists) |
|
||||
| AVI / DIVX | 47, 140 | XMP in the `_PMX` chunk only (no native GPS field exists) |
|
||||
|
||||
Deliberately **not** decoded: raw `.j2k` codestreams (no metadata),
|
||||
MKV free-text `RECORDING_LOCATION` / `LOCATION` tags and AVI RIFF INFO
|
||||
chunks (free text, not coordinates — a test fixture proves they are not
|
||||
reported as GPS), WAV iXML LOCATION, JPEG XL Exif boxes. XMP coordinates
|
||||
are accepted in DMS (`37,46,29.64N`), decimal-minutes (`37,46.494N`),
|
||||
and bare-decimal forms.
|
||||
|
||||
Implementation is a dedicated pass in `src/geotag.c` / `src/geotag.h`
|
||||
(dispatched from `main()` by task number — the fixed-offset header table
|
||||
cannot express variable-offset metadata). A library entry point
|
||||
`geotag_scan(path, task, out, max_results)` is declared in `geotag.h`;
|
||||
the printed field names (`source:`, `gps_latitude:`, `gps_longitude:`,
|
||||
`gps_altitude_m:`, `gps_datum:`, `gps_datetime_utc:`, `none found
|
||||
(searched...)`) are the stable output contract — other tools parse them.
|
||||
|
||||
Tests: `tests/geotag/make_geotag_tests.py` builds 26 fixtures with known
|
||||
values (lat 37.7749 N, lon 122.4194 W, alt 10 m; MP4 keys/ilst uses the
|
||||
published worked example, alt 30 m) plus two negative fixtures, and
|
||||
`tests/geotag/run_geotag_tests.py` asserts sfile round-trips them
|
||||
(26 PASS). Fixtures were cross-checked against exiftool 13.50, which
|
||||
independently reads the same values from every fixture it supports
|
||||
(including the real-world layouts: QuickTime text-prefixed (c)xyz,
|
||||
`moov/udta/meta` with an `hdlr` child, HEIC mime content-type, EXR magic
|
||||
`76 2F 31 01`, CR3 CMT4). Real files written by exiftool (JPEG EXIF,
|
||||
MP4 XMP uuid) and ffmpeg (MP4 `loci` box — ffmpeg writes `location`
|
||||
metadata as loci, not (c)xyz) were also decoded and agree.
|
||||
|
||||
## Testing
|
||||
|
||||
`tests/run_tests.py` runs `sfile` on every sample in `samples/` (one real
|
||||
sample file per format, collected from the task pages' download links or by
|
||||
web search) and records PASS / PARTIAL / FAIL / NO SAMPLE in
|
||||
`tests/results.json`. Latest run (Nov 25, 2026, after the PARTIAL round
|
||||
that triaged all 136 partials and converted 39 to PASS):
|
||||
`tests/results.json`. Latest run (Dec 2, 2026, after the geotagging
|
||||
round; counts unchanged from the Nov 25 PARTIAL round except NO SAMPLE
|
||||
104 -> 105 for the new WebP task):
|
||||
|
||||
| result | count | meaning |
|
||||
|---|---|---|
|
||||
| PASS | 650 | identified and header decoded |
|
||||
| PARTIAL | 97 | identified, no fixed header layout exists (see below) |
|
||||
| FAIL | 2 | the 2 unresolvable duplicates 312 (.INI) = 311 and 520 (.PBO) = 519 |
|
||||
| NO SAMPLE | 104 | no real sample file found yet (of 853 tasks counted by the harness, which includes 4 task numbers with no published page: 202, 214, 292, 389) |
|
||||
| NO SAMPLE | 105 | no real sample file found yet (of 854 tasks counted by the harness, which includes 4 task numbers with no published page: 202, 214, 292, 389, plus WebP task 861) |
|
||||
|
||||
### The PARTIAL tail (97) — why no layout exists
|
||||
|
||||
|
||||
@@ -4990,6 +4990,11 @@ static const SField fmt_860_fields[] = {
|
||||
{ "magic", 0, 4, FK_BYTES },
|
||||
{ "frame_header", 4, 1, FK_U8 },
|
||||
};
|
||||
static const SField fmt_861_fields[] = {
|
||||
{ "signature", 0, 4, FK_ASCII },
|
||||
{ "file_size", 4, 4, FK_U32 },
|
||||
{ "form_type", 8, 4, FK_ASCII },
|
||||
};
|
||||
|
||||
static const SFormat sfile_formats[] = {
|
||||
{ 1, ".3DS", "Three DS", "\x4d\x4d", 2, 0, fmt_1_fields, 2, FMT_BINARY, 0 },
|
||||
@@ -5841,6 +5846,7 @@ static const SFormat sfile_formats[] = {
|
||||
{ 858, ".ZRX", "ZRX file", "", 0, 0, NULL, 0, FMT_TEXT, 0 },
|
||||
{ 859, ".ZS", "ZS file", "\xab\x5a\x53\x66\x69\x4c\x65\x01", 8, 0, fmt_859_fields, 9, FMT_BINARY, 0 },
|
||||
{ 860, ".ZST", "Zstandard archive", "\x28\xb5\x2f\xfd", 4, 0, fmt_860_fields, 2, FMT_BINARY, 0 },
|
||||
{ 861, ".WEBP", "WebP image", "\x52\x49\x46\x46", 4, 0, fmt_861_fields, 3, FMT_BINARY, 0 },
|
||||
};
|
||||
static const int sfile_nformats = 849;
|
||||
static const int sfile_nformats = 850;
|
||||
#endif
|
||||
@@ -33849,6 +33849,36 @@
|
||||
"notes": "curated-magic",
|
||||
"task": 860
|
||||
},
|
||||
"861": {
|
||||
"derivation": "override",
|
||||
"endian": "le",
|
||||
"ext": ".WEBP",
|
||||
"fields": [
|
||||
{
|
||||
"kind": "ascii",
|
||||
"name": "signature",
|
||||
"offset": 0,
|
||||
"size": 4
|
||||
},
|
||||
{
|
||||
"kind": "u32",
|
||||
"name": "file_size",
|
||||
"offset": 4,
|
||||
"size": 4
|
||||
},
|
||||
{
|
||||
"kind": "ascii",
|
||||
"name": "form_type",
|
||||
"offset": 8,
|
||||
"size": 4
|
||||
}
|
||||
],
|
||||
"magic": "52494646",
|
||||
"magic_off": 0,
|
||||
"name": "WebP image",
|
||||
"notes": "No blog task: WebP is not among the 860 fileformat.vpscoder.com tasks (task 861 assigned here for sfile coverage). RIFF container, form type WEBP (RFC 9649). EXIF in an EXIF chunk, XMP in an XMP chunk; see src/geotag.c.",
|
||||
"task": 861
|
||||
},
|
||||
"87": {
|
||||
"derivation": "unknown",
|
||||
"endian": "le",
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/* geotag.h -- GPS/geotagging decode for sfile.
|
||||
*
|
||||
* Prints a "Geotagging:" section for formats that carry a real location
|
||||
* mechanism, and nothing for formats that have none. See geotag.c for the
|
||||
* per-format sources and the specs each layout is grounded in.
|
||||
*/
|
||||
#ifndef SFILE_GEOTAG_H
|
||||
#define SFILE_GEOTAG_H
|
||||
|
||||
/* One decoded location. `found` is set when latitude/longitude were
|
||||
* recovered; altitude, datum and datetime are optional (see the
|
||||
* has_* flags). Public so other sfile tools (stag, sgeo) can reuse
|
||||
* the decoders without parsing sfile's text output. */
|
||||
typedef struct {
|
||||
int found;
|
||||
char source[96];
|
||||
double lat, lon;
|
||||
int has_alt;
|
||||
double alt;
|
||||
int alt_below; /* GPSAltitudeRef 1 = below sea level */
|
||||
char datum[48];
|
||||
int has_datum;
|
||||
char datetime[48];
|
||||
int has_datetime;
|
||||
} GeoResult;
|
||||
|
||||
/* Scan the file at path (identified as task) and fill out[0..max_results)
|
||||
* with the locations found. Returns the number filled, 0 when the format
|
||||
* has a mechanism but no location was found, or -1 when the format has
|
||||
* no geotagging mechanism at all. */
|
||||
int geotag_scan(const char *path, int task, GeoResult *out, int max_results);
|
||||
|
||||
|
||||
/* Decode and print any GPS location carried by the file at path, whose
|
||||
* format was identified as task (a task number from formats.h).
|
||||
* Prints a "Geotagging:" section (coordinates, or a "none found" line
|
||||
* naming what was searched) for geotag-capable formats; prints nothing
|
||||
* for formats with no geotagging mechanism. */
|
||||
void decode_geotag(const char *path, int task);
|
||||
|
||||
#endif
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "formats.h"
|
||||
#include "geotag.h"
|
||||
|
||||
#define HDR_WIN 65536 /* header window: how much of the file we read */
|
||||
#define HEXDUMP_LEN 64 /* bytes shown for unknown / magic-only formats */
|
||||
@@ -284,6 +285,8 @@ int main(int argc, char **argv) {
|
||||
print_hex(buf, n < HEXDUMP_LEN ? n : HEXDUMP_LEN);
|
||||
printf("\n");
|
||||
}
|
||||
decode_geotag(path, fmt->task);
|
||||
|
||||
free(buf);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,439 @@
|
||||
#!/usr/bin/env python3
|
||||
"""make_geotag_tests.py -- build sfile geotagging test fixtures.
|
||||
|
||||
Every fixture carries KNOWN GPS values so sfile's decoded output can be
|
||||
checked by round-trip:
|
||||
latitude 37.7749 N = 37 deg, 46 min, 29.64 s
|
||||
longitude 122.4194 W = 122 deg, 25 min, 9.84 s
|
||||
altitude 10 m (30 m in the MP4 keys/ilst fixture, matching the
|
||||
fileformat.vpscoder.com worked example verbatim)
|
||||
datum WGS-84, date 2026-12-01, time 12:34:56 UTC
|
||||
|
||||
Tag numbers follow EXIF 2.32 (CIPA DC-008): GPS IFD via IFD0 tag 0x8825;
|
||||
0x0000 version, 0x0001/0x0002 lat ref/value (RATIONAL[3] DMS),
|
||||
0x0003/0x0004 lon ref/value, 0x0005/0x0006 alt ref/value,
|
||||
0x0007 timestamp, 0x0012 datum, 0x001D datestamp.
|
||||
|
||||
Usage: python3 make_geotag_tests.py [outdir]
|
||||
"""
|
||||
import os
|
||||
import struct
|
||||
import sys
|
||||
import zlib
|
||||
|
||||
OUT = sys.argv[1] if len(sys.argv) > 1 else os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
LAT_DMS = (37, 46, 2964, 100) # 37 + 46/60 + 29.64/3600 = 37.7749
|
||||
LON_DMS = (122, 25, 984, 100) # 122 + 25/60 + 9.84/3600 = 122.4194
|
||||
ALT_M = 10
|
||||
|
||||
|
||||
def build_ifd(e, entries, base_off):
|
||||
"""entries: (tag, type, count, payload_bytes). Values >4 bytes are
|
||||
placed after the IFD; returns (ifd_bytes_with_values, end_offset)."""
|
||||
n = len(entries)
|
||||
out = bytearray()
|
||||
out += struct.pack(e + 'H', n)
|
||||
val_off = base_off + 2 + n * 12 + 4
|
||||
val_blob = bytearray()
|
||||
for tag, typ, count, payload in entries:
|
||||
out += struct.pack(e + 'HHI', tag, typ, count)
|
||||
if len(payload) <= 4:
|
||||
out += payload + b'\x00' * (4 - len(payload))
|
||||
else:
|
||||
out += struct.pack(e + 'I', val_off)
|
||||
val_blob += payload
|
||||
val_off += len(payload)
|
||||
out += struct.pack(e + 'I', 0)
|
||||
return bytes(out) + bytes(val_blob), val_off
|
||||
|
||||
|
||||
def gps_entries(e, alt=ALT_M):
|
||||
def u32(v):
|
||||
return struct.pack(e + 'I', v)
|
||||
def rat(n, d):
|
||||
return u32(n) + u32(d)
|
||||
lat = rat(37, 1) + rat(46, 1) + rat(2964, 100)
|
||||
lon = rat(122, 1) + rat(25, 1) + rat(984, 100)
|
||||
return [
|
||||
(0x0000, 1, 4, bytes([2, 3, 0, 0])),
|
||||
(0x0001, 2, 2, b'N\x00'),
|
||||
(0x0002, 5, 3, lat),
|
||||
(0x0003, 2, 2, b'W\x00'),
|
||||
(0x0004, 5, 3, lon),
|
||||
(0x0005, 1, 1, bytes([0])),
|
||||
(0x0006, 5, 1, rat(alt, 1)),
|
||||
(0x0007, 5, 3, rat(12, 1) + rat(34, 1) + rat(56, 1)),
|
||||
(0x0012, 2, 7, b'WGS-84\x00'),
|
||||
(0x001D, 2, 11, b'2026:12:01\x00'),
|
||||
]
|
||||
|
||||
|
||||
def build_tiff_gps(be=False, alt=ALT_M):
|
||||
"""Complete TIFF header + IFD0 (GPS pointer) + GPS IFD."""
|
||||
e = '>' if be else '<'
|
||||
u32 = lambda v: struct.pack(e + 'I', v)
|
||||
gps_ifd, _ = build_ifd(e, gps_entries(e, alt), 26)
|
||||
hdr = (b'MM\x00*' if be else b'II*\x00') + u32(8)
|
||||
ifd0 = (struct.pack(e + 'H', 1) +
|
||||
struct.pack(e + 'HHI', 0x8825, 4, 1) + u32(26) + u32(0))
|
||||
return hdr + ifd0 + gps_ifd
|
||||
|
||||
|
||||
def build_tiff_gps_direct(be=False, alt=ALT_M):
|
||||
"""TIFF header whose FIRST IFD is itself the GPS IFD (CR3 CMT4)."""
|
||||
e = '>' if be else '<'
|
||||
u32 = lambda v: struct.pack(e + 'I', v)
|
||||
gps_ifd, _ = build_ifd(e, gps_entries(e, alt), 8)
|
||||
hdr = (b'MM\x00*' if be else b'II*\x00') + u32(8)
|
||||
return hdr + gps_ifd
|
||||
|
||||
|
||||
def build_tiff_nogps():
|
||||
"""TIFF header + empty IFD0 (no GPS pointer)."""
|
||||
return b'II*\x00' + struct.pack('<I', 8) + struct.pack('<HI', 0, 0)
|
||||
|
||||
|
||||
def build_xmp(lat_s, lon_s, alt_s="10/1"):
|
||||
return (
|
||||
'<?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?>\n'
|
||||
'<x:xmpmeta xmlns:x="adobe:ns:meta/">\n'
|
||||
' <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n'
|
||||
' <rdf:Description rdf:about="" xmlns:exif="http://ns.adobe.com/exif/1.0/" '
|
||||
'exif:GPSLatitude="%s" exif:GPSLongitude="%s" exif:GPSAltitude="%s"/>\n'
|
||||
' </rdf:RDF>\n</x:xmpmeta>\n<?xpacket end="w"?>'
|
||||
% (lat_s, lon_s, alt_s)).encode()
|
||||
|
||||
|
||||
XMP_DMS = build_xmp("37,46,29.64N", "122,25,9.84W")
|
||||
XMP_MIN = build_xmp("37,46.494N", "122,25.164W") # exiftool's form, per the blog
|
||||
|
||||
|
||||
def build_jpeg(tiff=None, xmp=None):
|
||||
out = b'\xff\xd8'
|
||||
if tiff is not None:
|
||||
app1 = b'Exif\x00\x00' + tiff
|
||||
out += b'\xff\xe1' + struct.pack('>H', len(app1) + 2) + app1
|
||||
if xmp is not None:
|
||||
x = b'http://ns.adobe.com/xap/1.0/\x00' + xmp
|
||||
out += b'\xff\xe1' + struct.pack('>H', len(x) + 2) + x
|
||||
return out + b'\xff\xd9'
|
||||
|
||||
|
||||
def png_chunk(typ, data):
|
||||
return (struct.pack('>I', len(data)) + typ + data +
|
||||
struct.pack('>I', zlib.crc32(typ + data) & 0xffffffff))
|
||||
|
||||
|
||||
def build_png(tiff=None, xmp=None):
|
||||
out = b'\x89PNG\r\n\x1a\n'
|
||||
out += png_chunk(b'IHDR', struct.pack('>IIBBBBB', 1, 1, 8, 2, 0, 0, 0))
|
||||
if tiff is not None:
|
||||
out += png_chunk(b'eXIf', tiff)
|
||||
if xmp is not None:
|
||||
out += png_chunk(b'iTXt',
|
||||
b'XML:com.adobe.xmp\x00\x00\x00\x00\x00' + xmp)
|
||||
out += png_chunk(b'IDAT', zlib.compress(b'\x00\x00\x00\x00'))
|
||||
out += png_chunk(b'IEND', b'')
|
||||
return out
|
||||
|
||||
|
||||
def riff_chunk(typ, data):
|
||||
out = typ + struct.pack('<I', len(data)) + data
|
||||
if len(data) % 2:
|
||||
out += b'\x00'
|
||||
return out
|
||||
|
||||
|
||||
def build_webp(tiff=None, xmp=None, vp8_payload=b'\x2f\x01\x2e\x00\x00\x00\x00\x00'):
|
||||
"""Extended WebP: VP8X (flags) + VP8 + EXIF/XMP chunks."""
|
||||
flags = (0x08 if tiff is not None else 0) | (0x04 if xmp is not None else 0)
|
||||
vp8x = bytes([flags]) + b'\x00\x00\x00' + b'\x00\x00\x00' + b'\x00\x00\x00'
|
||||
body = b'WEBP' + riff_chunk(b'VP8X', vp8x) + riff_chunk(b'VP8 ', vp8_payload)
|
||||
if tiff is not None:
|
||||
body += riff_chunk(b'EXIF', tiff)
|
||||
if xmp is not None:
|
||||
body += riff_chunk(b'XMP ', xmp)
|
||||
return b'RIFF' + struct.pack('<I', len(body)) + body
|
||||
|
||||
|
||||
def bmff_box(typ, payload):
|
||||
return struct.pack('>I', 8 + len(payload)) + typ + payload
|
||||
|
||||
|
||||
def build_heic(tiff=None, xmp=None):
|
||||
"""HEIC: ftyp + meta (hdlr, iinf, iloc) + mdat holding the item."""
|
||||
ftyp = bmff_box(b'ftyp', b'heic\x00\x00\x00\x00heic')
|
||||
hdlr = bmff_box(b'hdlr', b'\x00\x00\x00\x00' + b'\x00\x00\x00\x00' +
|
||||
b'pict' + b'\x00' * 12 + b'\x00')
|
||||
item_data = tiff if tiff is not None else xmp
|
||||
if tiff is not None:
|
||||
infe = bmff_box(b'infe', b'\x02\x00\x00\x00' +
|
||||
struct.pack('>HH', 1, 0) + b'Exif' + b'\x00')
|
||||
else:
|
||||
# infe v2 mime item: item_name (empty), content_type, content_encoding
|
||||
infe = bmff_box(b'infe', b'\x02\x00\x00\x00' +
|
||||
struct.pack('>HH', 2, 0) + b'mime' +
|
||||
b'\x00' + b'application/rdf+xml\x00' + b'\x00')
|
||||
iinf = bmff_box(b'iinf', b'\x00\x00\x00\x00' + struct.pack('>H', 1) + infe)
|
||||
# iloc v0, offset/length sizes 4, base/index 0; extent offset patched below
|
||||
item_id = 1 if tiff is not None else 2
|
||||
iloc_payload = (b'\x00\x00\x00\x00' + b'\x44\x00' + struct.pack('>H', 1) +
|
||||
struct.pack('>HHH', item_id, 0, 1) +
|
||||
struct.pack('>II', 0, len(item_data)))
|
||||
iloc = bmff_box(b'iloc', iloc_payload)
|
||||
meta_body = b'\x00\x00\x00\x00' + hdlr + iinf + iloc
|
||||
meta = bmff_box(b'meta', meta_body)
|
||||
mdat_off = len(ftyp) + len(meta) + 8 # payload starts after mdat header
|
||||
# patch the extent offset inside iloc (last 8 bytes of iloc payload:
|
||||
# extent_offset u32 then extent_length u32)
|
||||
iloc = iloc[:-8] + struct.pack('>II', mdat_off, len(item_data))
|
||||
meta = bmff_box(b'meta', b'\x00\x00\x00\x00' + hdlr + iinf + iloc)
|
||||
mdat = bmff_box(b'mdat', item_data)
|
||||
return ftyp + meta + mdat
|
||||
|
||||
|
||||
def build_loci(lat=37.7749, lon=-122.4194, alt=10.0, name=b'San Francisco'):
|
||||
"""3GPP TS 26.244 loci box: ver/flags, language, name, role,
|
||||
lon/lat/alt as signed 16.16 fixed-point, body, notes."""
|
||||
def fx(v):
|
||||
return struct.pack('>i', int(round(v * 65536)))
|
||||
return (b'\x00\x00\x00\x00' + struct.pack('>H', 0x15C7) + name + b'\x00' +
|
||||
bytes([0]) + fx(lon) + fx(lat) + fx(alt) + b'earth\x00' + b'\x00')
|
||||
|
||||
|
||||
def build_mp4(xyz=None, xyz_prefixed=False, keys_iso=None, xmp=None,
|
||||
loci=None, moov_first=True, brand=b'isom'):
|
||||
mvhd = bmff_box(b'mvhd', b'\x00' * 100)
|
||||
udta_children = b''
|
||||
if xyz is not None:
|
||||
payload = xyz.encode()
|
||||
if xyz_prefixed:
|
||||
# canonical QuickTime user-data text: [u16 size][u16 lang]text
|
||||
payload = struct.pack('>HH', len(payload), 0x15C7) + payload
|
||||
udta_children += bmff_box(b'\xa9xyz', payload)
|
||||
if loci is not None:
|
||||
udta_children += bmff_box(b'loci', loci)
|
||||
if xmp is not None:
|
||||
udta_children += bmff_box(b'XMP_', xmp)
|
||||
meta = b''
|
||||
if keys_iso is not None:
|
||||
key = b'com.apple.quicktime.location.ISO6709'
|
||||
keys_entry = struct.pack('>I', 8 + len(key)) + b'mdta' + key
|
||||
keys = bmff_box(b'keys', b'\x00\x00\x00\x00' + struct.pack('>I', 1) +
|
||||
keys_entry)
|
||||
data = (struct.pack('>I', 16 + len(keys_iso)) + b'data' +
|
||||
struct.pack('>II', 1, 0) + keys_iso.encode())
|
||||
ilst_entry = struct.pack('>I', 8 + len(data)) + struct.pack('>I', 1) + data
|
||||
ilst = bmff_box(b'ilst', ilst_entry)
|
||||
# meta lives inside udta in the wild (ffmpeg/exiftool), with an
|
||||
# hdlr 'mdir' child; exiftool ignores a moov-level meta entirely.
|
||||
hdlr = bmff_box(b'hdlr', b'\x00\x00\x00\x00' + b'\x00\x00\x00\x00' +
|
||||
b'mdir' + b'\x00' * 12 + b'\x00')
|
||||
meta = bmff_box(b'meta', b'\x00\x00\x00\x00' + hdlr + keys + ilst)
|
||||
udta_children += meta
|
||||
udta = bmff_box(b'udta', udta_children) if udta_children else b''
|
||||
moov = bmff_box(b'moov', mvhd + udta)
|
||||
ftyp = bmff_box(b'ftyp', brand + b'\x00\x00\x00\x00' + brand)
|
||||
mdat = bmff_box(b'mdat', b'\x00' * 64)
|
||||
return ftyp + moov + mdat if moov_first else ftyp + mdat + moov
|
||||
|
||||
|
||||
# ---- EBML (Matroska) ----
|
||||
def vint_size(n):
|
||||
if n < 128:
|
||||
return bytes([0x80 | n])
|
||||
if n < 16384:
|
||||
return bytes([0x40 | (n >> 8), n & 0xFF])
|
||||
raise ValueError("size too big for test fixture")
|
||||
|
||||
|
||||
def ebml_elem(eid, payload):
|
||||
return eid + vint_size(len(payload)) + payload
|
||||
|
||||
|
||||
def build_mp4_uuid_xmp(xmp):
|
||||
"""ftyp + moov (mvhd only) + uuid box: XMP UUID + raw XMP packet."""
|
||||
ftyp = bmff_box(b'ftyp', b'isom\x00\x00\x00\x00isom')
|
||||
moov = bmff_box(b'moov', bmff_box(b'mvhd', b'\x00' * 100))
|
||||
uuid = bmff_box(b'uuid', bytes.fromhex('be7acfcb97a942e89c71999491e3afac') + xmp)
|
||||
return ftyp + moov + uuid
|
||||
|
||||
|
||||
def build_mkv(xmp=None, with_recording_location=False):
|
||||
def u8_elem(eid, v):
|
||||
return ebml_elem(eid, bytes([v]))
|
||||
def str_elem(eid, s):
|
||||
return ebml_elem(eid, s if isinstance(s, bytes) else s.encode())
|
||||
ebml = ebml_elem(b'\x1a\x45\xdf\xa3',
|
||||
u8_elem(b'\x42\x86', 1) + u8_elem(b'\x42\xf7', 1) +
|
||||
str_elem(b'\x42\x82', b'matroska') + u8_elem(b'\x42\x87', 1))
|
||||
seg_children = b''
|
||||
if with_recording_location:
|
||||
tag = ebml_elem(b'\x73\x73', ebml_elem(
|
||||
b'\x67\xc8',
|
||||
str_elem(b'\x45\xa3', b'RECORDING_LOCATION') +
|
||||
str_elem(b'\x44\x87', b'San Francisco')))
|
||||
seg_children += ebml_elem(b'\x12\x54\xc3\x67', tag)
|
||||
if xmp is not None:
|
||||
att = ebml_elem(b'\x61\xa7',
|
||||
str_elem(b'\x46\x6e', b'gps.xmp') +
|
||||
str_elem(b'\x46\x60', b'application/rdf+xml') +
|
||||
ebml_elem(b'\x46\x5c', xmp))
|
||||
seg_children += ebml_elem(b'\x19\x41\xa4\x69', att)
|
||||
segment = b'\x18\x53\x80\x67' + b'\xff' + seg_children # unknown size
|
||||
return ebml + segment
|
||||
|
||||
|
||||
def build_avi(xmp=None):
|
||||
avih = b'avih' + struct.pack('<I', 56) + b'\x00' * 56
|
||||
hdrl = b'LIST' + struct.pack('<I', 4 + len(avih)) + b'hdrl' + avih
|
||||
body = hdrl
|
||||
if xmp is not None:
|
||||
body += b'_PMX' + struct.pack('<I', len(xmp)) + xmp
|
||||
if len(xmp) % 2:
|
||||
body += b'\x00'
|
||||
return b'RIFF' + struct.pack('<I', 4 + len(body)) + b'AVI ' + body
|
||||
|
||||
|
||||
def build_cr3(tiff_direct, xmp):
|
||||
"""ftyp crx + moov/uuid Canon (CMT4 + CTBO) + mdat + XMP blob.
|
||||
CTBO offsets are absolute file offsets."""
|
||||
ftyp = bmff_box(b'ftyp', b'crx \x00\x00\x00\x00crx ')
|
||||
cmt4 = bmff_box(b'CMT4', tiff_direct)
|
||||
# layout pass 1: measure with placeholder CTBO (2 records x 20 bytes)
|
||||
ctbo_body = b'\x00\x00\x00\x02' + b'\x00' * 40
|
||||
ctbo = bmff_box(b'CTBO', ctbo_body)
|
||||
uuid_body = b'\x85\xc0\xb6\x87\x82\x0f\x11\xe0\x81\x11\xf4\xce\x46\x2b\x6a\x48'
|
||||
uuid_inner = cmt4 + ctbo
|
||||
uuid = bmff_box(b'uuid', uuid_body + uuid_inner)
|
||||
moov = bmff_box(b'moov', uuid)
|
||||
mdat = bmff_box(b'mdat', b'\x00' * 64)
|
||||
xmp_off = len(ftyp) + len(moov) + len(mdat)
|
||||
mdat_off = len(ftyp) + len(moov) + 8
|
||||
ctbo_body = (struct.pack('>I', 2) +
|
||||
struct.pack('>IQQ', 1, xmp_off, len(xmp)) +
|
||||
struct.pack('>IQQ', 3, mdat_off, 64))
|
||||
ctbo = bmff_box(b'CTBO', ctbo_body)
|
||||
uuid_inner = cmt4 + ctbo
|
||||
uuid = bmff_box(b'uuid', uuid_body + uuid_inner)
|
||||
moov = bmff_box(b'moov', uuid)
|
||||
assert len(moov) == len(ftyp) * 0 + len(bmff_box(b'moov', uuid)), "size drift"
|
||||
return ftyp + moov + mdat + xmp
|
||||
|
||||
|
||||
def build_exr(lon=-122.4194, lat=37.7749, alt=10.0):
|
||||
out = b'\x76\x2f\x31\x01' + struct.pack('<I', 2) # magic 20000630 LE
|
||||
def attr(name, typ, val):
|
||||
return name.encode() + b'\x00' + typ.encode() + b'\x00' + \
|
||||
struct.pack('<I', len(val)) + val
|
||||
chlist = (b'Y\x00' + struct.pack('<I', 2) + b'\x00\x00\x00\x00' +
|
||||
struct.pack('<II', 1, 1) + b'\x00')
|
||||
out += attr('channels', 'chlist', chlist)
|
||||
out += attr('compression', 'compression', b'\x00')
|
||||
out += attr('dataWindow', 'box2i', struct.pack('<iiii', 0, 0, 0, 0))
|
||||
out += attr('displayWindow', 'box2i', struct.pack('<iiii', 0, 0, 0, 0))
|
||||
out += attr('lineOrder', 'lineOrder', b'\x00')
|
||||
out += attr('pixelAspectRatio', 'float', struct.pack('<f', 1.0))
|
||||
out += attr('screenWindowCenter', 'v2f', struct.pack('<ff', 0.0, 0.0))
|
||||
out += attr('screenWindowWidth', 'float', struct.pack('<f', 1.0))
|
||||
out += attr('longitude', 'float', struct.pack('<f', lon))
|
||||
out += attr('latitude', 'float', struct.pack('<f', lat))
|
||||
out += attr('altitude', 'float', struct.pack('<f', alt))
|
||||
out += b'\x00' # end of header
|
||||
out += struct.pack('<Q', len(out) + 8) # chunk offset table (1 chunk)
|
||||
out += struct.pack('<II', 0, 4) + b'\x00' * 4 # one chunk, 4 bytes
|
||||
return out
|
||||
|
||||
|
||||
def build_jp2(xmp):
|
||||
sig = bmff_box(b'jP ', b'\x0d\x0a\x87\x0a')
|
||||
ftyp = bmff_box(b'ftyp', b'jp2 \x00\x00\x00\x00jp2 ')
|
||||
uuid = bmff_box(b'uuid', bytes.fromhex('be7acfcb97a942e89c71999491e3afac') + xmp)
|
||||
return sig + ftyp + uuid
|
||||
|
||||
|
||||
def build_psd(tiff, xmp):
|
||||
hdr = (b'8BPS' + struct.pack('>H', 1) + b'\x00' * 6 +
|
||||
struct.pack('>HIIHH', 1, 1, 1, 8, 3))
|
||||
def res_block(rid, data, name=b''):
|
||||
blk = b'8BIM' + struct.pack('>H', rid)
|
||||
blk += bytes([len(name)]) + name
|
||||
if (1 + len(name)) % 2 == 1:
|
||||
blk += b'\x00'
|
||||
blk += struct.pack('>I', len(data)) + data
|
||||
if len(data) % 2 == 1:
|
||||
blk += b'\x00'
|
||||
return blk
|
||||
resources = res_block(0x0422, tiff) + res_block(0x0424, xmp)
|
||||
return hdr + struct.pack('>I', 0) + struct.pack('>I', len(resources)) + resources
|
||||
|
||||
|
||||
def build_geotiff():
|
||||
"""Big-endian TIFF with GeoKeys 2048=4326 + tiepoint lon/lat."""
|
||||
e = '>'
|
||||
def u16(v):
|
||||
return struct.pack(e + 'H', v)
|
||||
def u32(v):
|
||||
return struct.pack(e + 'I', v)
|
||||
def f64(v):
|
||||
return struct.pack(e + 'd', v)
|
||||
scale = f64(1.0) + f64(1.0) + f64(0.0)
|
||||
tiepoint = f64(0.0) + f64(0.0) + f64(0.0) + f64(-122.4194) + f64(37.7749) + f64(0.0)
|
||||
geokeys = (u16(1) + u16(1) + u16(1) + u16(1) +
|
||||
u16(2048) + u16(0) + u16(1) + u16(4326))
|
||||
entries = [
|
||||
(33550, 12, 3, scale),
|
||||
(33922, 12, 6, tiepoint),
|
||||
(34735, 3, 8, geokeys),
|
||||
]
|
||||
ifd0, _ = build_ifd(e, entries, 8)
|
||||
hdr = b'MM\x00*' + u32(8)
|
||||
return hdr + ifd0
|
||||
|
||||
|
||||
def main():
|
||||
os.makedirs(OUT, exist_ok=True)
|
||||
tiff_le = build_tiff_gps(be=False)
|
||||
tiff_be = build_tiff_gps(be=True)
|
||||
fixtures = {
|
||||
'test-gps.jpg': build_jpeg(tiff_le),
|
||||
'test-gps-be.jpg': build_jpeg(tiff_be),
|
||||
'test-gps.tiff': tiff_le,
|
||||
'test-gps-be.tiff': tiff_be,
|
||||
'test-gps.dng': tiff_le,
|
||||
'test-gps.png': build_png(tiff_le),
|
||||
'test-gps-xmp.png': build_png(xmp=XMP_MIN),
|
||||
'test-gps.webp': build_webp(tiff_le),
|
||||
'test-gps-xmp.webp': build_webp(xmp=XMP_DMS),
|
||||
'test-gps.heic': build_heic(tiff_le),
|
||||
'test-gps-xmp.heic': build_heic(xmp=XMP_DMS),
|
||||
'test-gps.mp4': build_mp4(xyz='+37.7749-122.4194+010.000/',
|
||||
xyz_prefixed=True,
|
||||
keys_iso='+37.7749-122.4194+030.000/'),
|
||||
'test-gps-moov-end.mp4': build_mp4(xyz='+37.7749-122.4194+010.000/',
|
||||
moov_first=False),
|
||||
'test-gps.mov': build_mp4(xyz='+37.7749-122.4194+010.000/',
|
||||
xyz_prefixed=True, brand=b'qt '),
|
||||
'test-gps-3gp.3gp': build_mp4(loci=build_loci(), brand=b'3gp4'),
|
||||
'test-gps-xmp.mp4': build_mp4(xmp=XMP_DMS),
|
||||
'test-gps-xmp-uuid.mp4': build_mp4_uuid_xmp(XMP_DMS),
|
||||
'test-gps.mkv': build_mkv(xmp=XMP_MIN),
|
||||
'test-gps.avi': build_avi(xmp=XMP_DMS),
|
||||
'test-gps.cr3': build_cr3(build_tiff_gps_direct(), XMP_DMS),
|
||||
'test-gps.exr': build_exr(),
|
||||
'test-gps.jp2': build_jp2(XMP_DMS),
|
||||
'test-gps.psd': build_psd(tiff_le, XMP_DMS),
|
||||
'test-gps.geotiff': build_geotiff(),
|
||||
'test-gps-no-gps.jpg': build_jpeg(build_tiff_nogps()),
|
||||
'test-gps-no-gps.mkv': build_mkv(with_recording_location=True),
|
||||
}
|
||||
for name, data in fixtures.items():
|
||||
path = os.path.join(OUT, name)
|
||||
with open(path, 'wb') as fh:
|
||||
fh.write(data)
|
||||
print('wrote %s (%d bytes)' % (path, len(data)))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env python3
|
||||
"""run_geotag_tests.py -- round-trip checks for sfile's geotagging decoder.
|
||||
|
||||
For each fixture in tests/geotag/ (built by make_geotag_tests.py), run
|
||||
./sfile on it and assert the known GPS values appear in the Geotagging
|
||||
section. Exit non-zero if any check fails.
|
||||
|
||||
Usage: python3 run_geotag_tests.py [sfile_binary] [fixtures_dir]
|
||||
"""
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
SFILE = sys.argv[1] if len(sys.argv) > 1 else "./sfile"
|
||||
FIX = sys.argv[2] if len(sys.argv) > 2 else os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
LAT = "gps_latitude: 37.774900"
|
||||
LON = "gps_longitude: -122.419400"
|
||||
ALT10 = "gps_altitude_m: 10.000 (above sea level)"
|
||||
DATUM = "gps_datum: WGS-84"
|
||||
WHEN = "gps_datetime_utc: 2026-12-01 12:34:56"
|
||||
NONE = "none found"
|
||||
|
||||
CASES = {
|
||||
'test-gps.jpg': [LAT, LON, ALT10, DATUM, WHEN,
|
||||
"source: EXIF GPS IFD (JPEG APP1 segment)"],
|
||||
'test-gps-be.jpg': [LAT, LON, ALT10, DATUM, WHEN],
|
||||
'test-gps.tiff': [LAT, LON, ALT10, DATUM, WHEN,
|
||||
"source: EXIF GPS IFD (TIFF IFD0)"],
|
||||
'test-gps-be.tiff': [LAT, LON, ALT10, DATUM, WHEN],
|
||||
'test-gps.dng': [LAT, LON, ALT10, DATUM, WHEN],
|
||||
'test-gps.png': [LAT, LON, ALT10, DATUM, WHEN,
|
||||
"source: EXIF GPS IFD (PNG eXIf chunk)"],
|
||||
'test-gps-xmp.png': [LAT, LON, "gps_altitude_m: 10.000",
|
||||
"source: XMP packet (PNG iTXt chunk)"],
|
||||
'test-gps.webp': [LAT, LON, ALT10, DATUM, WHEN,
|
||||
"source: EXIF GPS IFD (WebP EXIF chunk)"],
|
||||
'test-gps-xmp.webp': [LAT, LON, "gps_altitude_m: 10.000",
|
||||
"source: XMP packet (WebP XMP chunk)"],
|
||||
'test-gps.heic': [LAT, LON, ALT10, DATUM, WHEN,
|
||||
"source: EXIF GPS IFD (HEIF meta Exif item)"],
|
||||
'test-gps-xmp.heic': [LAT, LON, "gps_altitude_m: 10.000",
|
||||
"source: XMP packet (HEIF meta mime item)"],
|
||||
# both QuickTime sources agree on lat/lon; altitudes differ (10 vs 30 m)
|
||||
'test-gps.mp4': [LAT, LON,
|
||||
"gps_altitude_m: 10.000 (above sea level)",
|
||||
"gps_altitude_m: 30.000 (above sea level)",
|
||||
"source: QuickTime location (moov/udta (c)xyz atom)",
|
||||
"source: QuickTime location (moov/udta/meta com.apple.quicktime.location.ISO6709)"],
|
||||
'test-gps-moov-end.mp4': [LAT, LON, ALT10,
|
||||
"source: QuickTime location (moov/udta (c)xyz atom)"],
|
||||
# canonical QuickTime text layout: [u16 size][u16 lang] + string
|
||||
'test-gps.mov': [LAT, LON, ALT10],
|
||||
# 16.16 fixed point: 37.7749 -> 37.774902, -122.4194 -> -122.419403
|
||||
'test-gps-3gp.3gp': ["gps_latitude: 37.774902",
|
||||
"gps_longitude: -122.419403", ALT10,
|
||||
"source: 3GPP location (moov/udta loci box)"],
|
||||
'test-gps-xmp.mp4': [LAT, LON, "gps_altitude_m: 10.000",
|
||||
"source: XMP packet (MP4/MOV udta XMP_ box)"],
|
||||
'test-gps-xmp-uuid.mp4': [LAT, LON, "gps_altitude_m: 10.000",
|
||||
"source: XMP packet (MP4/MOV uuid box)"],
|
||||
'test-gps.mkv': [LAT, LON, "gps_altitude_m: 10.000",
|
||||
"source: XMP packet (MKV attachment)"],
|
||||
'test-gps.avi': [LAT, LON, "gps_altitude_m: 10.000",
|
||||
"source: XMP packet (AVI _PMX chunk)"],
|
||||
'test-gps.cr3': [LAT, LON, ALT10, DATUM, WHEN,
|
||||
"source: EXIF GPS IFD (CR3 CMT4 box)",
|
||||
"source: XMP packet (CR3 CTBO entry 1)"],
|
||||
# float32: 37.7749 -> 37.774899, -122.4194 -> -122.419403
|
||||
'test-gps.exr': ["gps_latitude: 37.774899",
|
||||
"gps_longitude: -122.419403", ALT10,
|
||||
"source: EXR header attributes (longitude/latitude/altitude)"],
|
||||
'test-gps.jp2': [LAT, LON, "gps_altitude_m: 10.000",
|
||||
"source: XMP packet (JP2 uuid box)"],
|
||||
'test-gps.psd': [LAT, LON, ALT10, DATUM, WHEN,
|
||||
"source: EXIF GPS IFD (PSD resource 1058)",
|
||||
"source: XMP packet (PSD resource 1060)"],
|
||||
'test-gps.geotiff': [LAT, LON, "gps_datum: WGS-84 (EPSG:4326)",
|
||||
"source: GeoTIFF tiepoint (TIFF IFD0)"],
|
||||
'test-gps-no-gps.jpg': [NONE],
|
||||
# free-text RECORDING_LOCATION must NOT be reported as coordinates
|
||||
'test-gps-no-gps.mkv': [NONE],
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
n_pass = n_fail = 0
|
||||
failures = []
|
||||
for name, wants in sorted(CASES.items()):
|
||||
path = os.path.join(FIX, name)
|
||||
if not os.path.exists(path):
|
||||
print("MISSING fixture %s" % name)
|
||||
n_fail += 1
|
||||
failures.append((name, "fixture missing"))
|
||||
continue
|
||||
r = subprocess.run([SFILE, path], capture_output=True, text=True)
|
||||
out = r.stdout
|
||||
missing = [w for w in wants if w not in out]
|
||||
bad = []
|
||||
if r.returncode != 0:
|
||||
bad.append("exit code %d" % r.returncode)
|
||||
if "Geotagging:" not in out:
|
||||
bad.append("no Geotagging section")
|
||||
if missing:
|
||||
bad.append("missing: %s" % "; ".join(missing))
|
||||
# negative cases must not report coordinates
|
||||
if NONE in wants and ("gps_latitude:" in out or "gps_longitude:" in out):
|
||||
bad.append("reported coordinates where none exist")
|
||||
if bad:
|
||||
n_fail += 1
|
||||
failures.append((name, " | ".join(bad)))
|
||||
print("FAIL %s: %s" % (name, " | ".join(bad)))
|
||||
else:
|
||||
n_pass += 1
|
||||
print("PASS %s" % name)
|
||||
print("%d PASS, %d FAIL, %d total" % (n_pass, n_fail, n_pass + n_fail))
|
||||
return 1 if failures else 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
After Width: | Height: | Size: 264 B |
|
After Width: | Height: | Size: 28 B |
@@ -0,0 +1 @@
|
||||
Eߣ—B†�B÷�B‚ˆmatroskaB‡�S€gÿTÃg«ss¨gÈ¥E£’RECORDING_LOCATIOND‡�San Francisco
|
||||
|
After Width: | Height: | Size: 468 B |
|
After Width: | Height: | Size: 422 B |
|
After Width: | Height: | Size: 264 B |
@@ -0,0 +1,7 @@
|
||||
Eߣ—B†�B÷�B‚ˆmatroskaB‡�S€gÿA¤iA•a§A‘Fn‡gps.xmpF`“application/rdf+xmlF\Am<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
||||
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
||||
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<rdf:Description rdf:about="" xmlns:exif="http://ns.adobe.com/exif/1.0/" exif:GPSLatitude="37,46.494N" exif:GPSLongitude="122,25.164W" exif:GPSAltitude="10/1"/>
|
||||
</rdf:RDF>
|
||||
</x:xmpmeta>
|
||||
<?xpacket end="w"?>
|
||||
|
After Width: | Height: | Size: 331 B |
|
After Width: | Height: | Size: 304 B |
@@ -11120,6 +11120,11 @@
|
||||
"status": "ok",
|
||||
"task": 860
|
||||
},
|
||||
"861": {
|
||||
"note": "no sample file on disk",
|
||||
"result": "no-sample",
|
||||
"task": 861
|
||||
},
|
||||
"87": {
|
||||
"decoded": false,
|
||||
"exit": 0,
|
||||
|
||||
@@ -7555,6 +7555,34 @@
|
||||
"magic_off": 0,
|
||||
"name": "Zstandard archive"
|
||||
},
|
||||
"861": {
|
||||
"endian": "le",
|
||||
"ext": ".WEBP",
|
||||
"fields": [
|
||||
{
|
||||
"kind": "ascii",
|
||||
"name": "signature",
|
||||
"offset": 0,
|
||||
"size": 4
|
||||
},
|
||||
{
|
||||
"kind": "u32",
|
||||
"name": "file_size",
|
||||
"offset": 4,
|
||||
"size": 4
|
||||
},
|
||||
{
|
||||
"kind": "ascii",
|
||||
"name": "form_type",
|
||||
"offset": 8,
|
||||
"size": 4
|
||||
}
|
||||
],
|
||||
"magic": "52494646",
|
||||
"magic_off": 0,
|
||||
"name": "WebP image",
|
||||
"notes": "No blog task: WebP is not among the 860 fileformat.vpscoder.com tasks (task 861 assigned here for sfile coverage). RIFF container, form type WEBP (RFC 9649). EXIF in an EXIF chunk, XMP in an XMP chunk; see src/geotag.c."
|
||||
},
|
||||
"9": {
|
||||
"magic": "213c617263683e0a",
|
||||
"notes": "static libraries are ar archives, like .deb"
|
||||
|
||||