feat: add @libre.graph.livePhoto facet to driveItem#50
Open
dschmidt wants to merge 3 commits into
Open
Conversation
7738de5 to
2c63279
Compare
Apple Live Photos are a pair of files (HEIC/JPEG still plus QuickTime video) sharing one content identifier, stored in the Apple maker note on the image and as com.apple.quicktime.* metadata keys on the video. Unlike Google Motion Photos there is no single embedded file, so the facet carries the shared contentId for pairing, plus the video-side properties auto, vitalityScore, vitalityScoringVersion and fullFrameRatePlaybackIntent. Validated with openapi-generator-cli v7.13.0 (validate plus a go client generation smoke test).
2c63279 to
602e5d9
Compare
The key is undocumented by Apple (known only from an ExifTool forum find) and not consumed anywhere, not even Apple's own LivePhotosKit JS player references it. No point in specifying a value nobody can act on.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new read-only @libre.graph.livePhoto facet to the driveItem schema to expose Apple Live Photo pairing metadata (via a shared contentId), mirroring the existing @libre.graph.motionPhoto extension approach.
Changes:
- Add
@libre.graph.livePhotofacet todriveItemreferencing a newlivePhotoschema. - Introduce
components.schemas.livePhotowithcontentIdplus optional video-half metadata fields (stillImageTimeUs,auto,vitalityScore,vitalityScoringVersion).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+5293
to
+5296
| vitalityScore: | ||
| type: number | ||
| format: float | ||
| description: | |
The rest of the spec consistently uses double for number properties (e.g. photo.fNumber, video.frameRate); float was an unintended inconsistency. Flagged by the Copilot review.
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.
Description
What are Live Photos?
Apple Live Photos are a pair of files: a still image (HEIC or JPEG) and a
short QuickTime video, captured together and linked by a shared content
identifier (a UUID). On the image it is stored in the Apple maker note,
on the video as
com.apple.quicktime.content.identifier. Unlike GoogleMotion Photos (#36) there is no single embedded file, the two halves are
separate driveItems.
There is no public file format specification; the metadata keys are
documented as AVFoundation metadata identifiers:
https://developer.apple.com/documentation/avfoundation/avmetadataidentifier
What this PR adds
A new read-only
@libre.graph.livePhotofacet on driveItem, following the@libre.graph.motionPhotopattern. Facet presence means the item wascaptured as part of a Live Photo; the counterpart is the driveItem whose
facet carries the same
contentId.contentIdstring(required)stillImageTimeUsinteger(int64)autobooleanvitalityScorenumber(double)vitalityScoringVersioninteger(int64)Example response
{ "@libre.graph.livePhoto": { "contentId": "CD28D161-D5EC-4CDE-8B60-DACCC1363B6B", "stillImageTimeUs": 1233333, "auto": true, "vitalityScore": 0.9398496, "vitalityScoringVersion": 4 } }Validated with openapi-generator-cli v7.13.0 (
validateplus a go clientgeneration smoke test; the generated model and driveItem wiring look as
expected).
Metadata extraction prerequisites on the server side: the video-side keys
are covered by apache/tika#2935, the image-side
Live Photo video index additionally needs
drewnoakes/metadata-extractor#739 (tracked in
https://issues.apache.org/jira/browse/TIKA-4776).
stillImageTimeUsisspecified now but will stay absent until the extraction side can parse
the
com.apple.quicktime.still-image-timetimed metadata track (mebx)of the video. The image side offers no reliable source: the Apple maker
note tag 0x0017, historically documented as a derivable video index,
does not encode a usable time on current iOS versions.