ExifTool Forum

General => Metadata => Topic started by: gordonfreeman5500 on March 10, 2022, 09:08:24 PM

Title: Looking to get the timestamp in the video portion of Apple Live Photos
Post by: gordonfreeman5500 on March 10, 2022, 09:08:24 PM
Hi, I've been working on a tool to convert Apple Live Photos to Google's "Motion Photo" format. I have most of my tool working, but currently I have it 1.5s hardcoded as the time in the video where the photo frame appears. If it's possible with exiftool, I'd like to be able to extract the exact timestamp so that I can add it as metadata to the Motion Photo to get closer to a 1:1 representation of the original Live Photo.

Is that something exiftool can help with? So far in exploring the docs, I saw that ''still-image-time'' always is -1, and the real timestamp can be gathered from the SampleTime when ExtractEmbedded is set, but my video sample shows many "Sample Time" values when running `exiftool -ee IMG_0898.MOV`. I'm guessing each of these corresponds to a frame that iOS lets you select as the photo frame, but is there a way to tell which one it's currently set to?

Thanks!
Title: Re: Looking to get the timestamp in the video portion of Apple Live Photos
Post by: Phil Harvey on March 11, 2022, 07:58:58 AM
Quote from: gordonfreeman5500 on March 10, 2022, 09:08:24 PM
I'm guessing each of these corresponds to a frame that iOS lets you select as the photo frame, but is there a way to tell which one it's currently set to?

Try extracting all metadata then changing the frame and see if any of the metadata changes.

- Phil
Title: Re: Looking to get the timestamp in the video portion of Apple Live Photos
Post by: blue-j on March 11, 2022, 03:03:04 PM
I wasn't aware ExifTool parsed Live Photo metadata...?  Where is that?  I suspect Apple ain't sharing it!

- J
Title: Re: Looking to get the timestamp in the video portion of Apple Live Photos
Post by: StarGeek on March 11, 2022, 03:35:08 PM
A quick check shows on the Quicktime tags page (https://exiftool.org/TagNames/QuickTime.html) that exiftool can extract these tags
LivePhotoInfo
LivePhotoAuto
LivePhotoVitalityScore
LivePhotoVitalityScoringVersion

Otherwise I believe a Live Photo is just a regular image and a regular video.  A jpg and a mov I think.  I could be wrong and don't have an Apple product to check with.