Looking to get the timestamp in the video portion of Apple Live Photos

Started by gordonfreeman5500, March 10, 2022, 09:08:24 PM

Previous topic - Next topic

gordonfreeman5500

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!

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

blue-j

I wasn't aware ExifTool parsed Live Photo metadata...?  Where is that?  I suspect Apple ain't sharing it!

- J

StarGeek

A quick check shows on the Quicktime tags page 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.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).