Extract GPS epoch timestamps from RMKN maker note in Ricoh Theta videos#814
Open
Extract GPS epoch timestamps from RMKN maker note in Ricoh Theta videos#814
Conversation
1e396ce to
1ac8cff
Compare
Ricoh Theta cameras write CAMM Type 5 GPS data (lat/lon/alt only, no
epoch timestamps). However, the RMKN (Ricoh Maker Note) box in the MP4
udta container includes a GPS IFD with GPSDateStamp and GPSTimeStamp
tags—true GPS-derived UTC timestamps recorded at the start of video
recording.
This change:
- Parses the RMKN TIFF/EXIF structure in camm_parser.py to extract the
GPS datetime from the GPS IFD (tags 0x001D and 0x0007)
- Adds a gps_datetime field to CAMMInfo to carry the extracted timestamp
- Enriches CAMM Type 5 points with computed epoch timestamps in
CAMMVideoExtractor using the formula:
epoch = rmkn_gps_epoch + (point.time - first_point.time)
- Converts enriched points to CAMMGPSPoint (Type 6) so downstream
consumers receive proper GPS epoch times
- Adds unit tests for RMKN parsing (valid, little-endian, missing GPS
IFD, truncated, bad magic) and point enrichment logic
1ac8cff to
b45aca4
Compare
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.
Ricoh Theta cameras write CAMM Type 5 GPS data (lat/lon/alt only, no epoch timestamps). However, the RMKN (Ricoh Maker Note) box in the MP4 udta container includes a GPS IFD with GPSDateStamp and GPSTimeStamp tags—true GPS-derived UTC timestamps recorded at the start of video recording.
This change: