Skip to content

Read GPS from the embedded XMP of videos #1260 - #1346

Open
cycsmail wants to merge 1 commit into
bpatrik:masterfrom
cycsmail:video-xmp-gps-1260
Open

cycsmail wants to merge 1 commit into
bpatrik:masterfrom
cycsmail:video-xmp-gps-1260

Conversation

@cycsmail

Copy link
Copy Markdown
Contributor

Videos with GPS in their embedded XMP had no position (#1260). ffprobe only exposes that XMP with -export_xmp 1, and up to ffprobe 4.3 the flag aborts the probe for any container whose demuxer doesn't know it (4.4+ only warns). So loadVideoMetadata now runs a second probe with the flag when the first one reports the mov/mp4 demuxer, and passes the XMP through the existing mapGPS, same parsing as the photo branch and XMP sidecars (sidecars still win). That is one extra ffprobe run per mp4/mov at index time. Only GPS is taken from the embedded XMP on purpose: mapping everything would also change the creation dates of videos that carry Adobe XMP.

Added a test that appends an XMP uuid box with GPS to a copy of video.mp4 at runtime (no new binary fixture); it failed before the fix. The MetadataLoader, DiskManagerWorker and ffmpeg video worker specs pass with it (120 passing).

Two notes. It reads the standard exif:GPSLatitude/exif:GPSLongitude XMP tags (what exiftool writes); the XMP-crd namespace from the issue is non-standard and I had no sample for it. And the folder overview map is fed through the photosOnly pipe, so after a reindex the video shows its position in the lightbox info panel and mini map, but not yet on the overview map. Happy to add videos there in a follow-up if you want them.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant