Repository navigation
Read video locations and dates, and every common photo GPS layout - #305
Merged
Merged
Conversation
GLEAPP read no metadata from videos, so a phone video's location (QuickTime UserData GPSCoordinates, or the iPhone location key) never reached the map, the KMZ or the reports. gleapp/videometa.py reads both ISO 6709 forms, plus the iPhone creation date as the video's Captured time, by walking the MP4/MOV boxes; no frames, no new dependency. It runs before decoding, so a clip that will not decode still gets its location. Photo GPS accepted only three-part degrees/minutes/seconds. Degrees and decimal minutes (two parts) and decimal degrees (one) were dropped, and a 0/0 seconds part stored NaN. All three now convert, a 0/0 part counts as 0, anything that is not a real coordinate (NaN, out of range, 0,0) is refused, and XMP GPS and capture date fill in when EXIF has none. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it fixes
Videos had no location in GLEAPP. GLEAPP read no metadata from videos, only duration and size. So a phone video's GPS never reached the details-pane map, the Locations overview, the KMZ or the reports, even though ExifTool shows it (as
UserData:GPSCoordinates). This was found on a real case, where every video's location was missing.Some photo GPS was dropped, and one layout stored NaN. The EXIF GPS converter accepted only three-part degrees/minutes/seconds:
0/040,26.78N)How
gleapp/videometa.py(new). Walks the MP4/MOV box tree; it reads no frames and adds no dependency. It reads:moov/udta/©xyz: UserData GPSCoordinates, written by Android and many cameras.moov/metakeys/ilst: the iPhone'scom.apple.quicktime.location.ISO6709andcreationdate.creationdateas the device's local time, the same wall-clock form a photo's EXIF capture time has. The movie header's creation time is deliberately not used, because most devices write it in UTC and Captured means camera-local.gleapp/metadata.py: the photo converter accepts 1, 2 or 3 parts and treats a0/0part as 0. A value that isn't a real coordinate (NaN, out of range, 0,0) is refused rather than stored. XMP GPS and the capture date fill in when EXIF has none.Existing cases pick this up only when processed again (
gleapp process --force) or ingested into a new case. The docs say so; there's no in-app reprocess button.Testing
tests/test_video_gps.py(19 tests, all synthetic) covers:[UserData] GPS Coordinates,[Keys] GPS Coordinates/Creation Date).Docs: MANUAL §6 and the in-app help (Location row).
🤖 Generated with Claude Code