[
https://issues.apache.org/jira/browse/TIKA-2861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18094715#comment-18094715
]
ASF GitHub Bot commented on TIKA-2861:
--------------------------------------
dschmidt opened a new pull request, #2935:
URL: https://github.com/apache/tika/pull/2935
JIRA: https://issues.apache.org/jira/browse/TIKA-2861
MP4Parser drops GPS location and other QuickTime metadata from videos:
the box handler skips the `keys`/`ilst` boxes inside `moov/meta`, losing all
`com.apple.quicktime.*` metadata written by modern iOS devices, and the older
`udta` "(c)xyz" path only matched latitude/longitude, dropping the altitude.
Changes (one commit each):
* Parse `keys`/`ilst` in `TikaMp4BoxHandler` and emit UTF-8 text values under
their key names (e.g. `com.apple.quicktime.content.identifier`). Additive,
the existing fields are untouched.
* Map the `com.apple.quicktime.location.ISO6709` value to `geo:lat`,
`geo:long` and `geo:alt` in addition to the raw value.
* Capture the optional ISO 6709 altitude in the "(c)xyz" path and expose it
as `geo:alt`. Older iOS versions and Google Photos write altitude there;
Android writes lat/long only, which is unaffected. ExifTool parses the
same optional component.
Alternatives considered:
* Switching MP4Parser to a different reader (e.g. metadata-extractor's
QuickTime/MOV reader, which does handle this metadata): rejected as much
higher risk, since it would change the parser's existing output wholesale
instead of adding the missing fields.
* Fixing this upstream in metadata-extractor's `Mp4BoxHandler`: awkward,
since it would duplicate functionality of their QuickTime reader, and
upstream would likely (and reasonably) answer that MOV files should just
be read with that reader instead. Tika already extends the box handler
with Tika-specific boxes, so this follows the established pattern.
Testing: two new minimal fixtures (`testMP4_QuickTimeMetadata.mov` for the
keys/ilst path, `testMP4_udtaLocation.mp4` for the previously untested udta
path) with `MP4ParserTest` assertions for the raw values and geo properties.
> MP4Parser not getting gps metadata
> ----------------------------------
>
> Key: TIKA-2861
> URL: https://issues.apache.org/jira/browse/TIKA-2861
> Project: Tika
> Issue Type: Bug
> Components: metadata
> Reporter: Junran
> Priority: Major
> Attachments: 1.mp4, 2.MOV
>
>
> Hello, MP4Parser is not getting video GPS metadata which is extracted for
> images such as jpeg. I have checked both MP4 and MOV files, the files I
> checked all have GPS Exif data embedded in the same fields as image. Any
> idea? Thanks!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)