Decoded another Apple MakerNotes field

Started by Neal Krawetz, May 12, 2022, 01:10:57 AM

Previous topic - Next topic

Neal Krawetz

I finally worked out another of the Apple MakerNotes fields.

Previously we figured out that 0x0003 contains a bplist with the in-use run-time.
The run-time is stored as a numerator (value) and denominator (scalar). (There's also an epoch, but that's zero right now.)

0x0011 is the media group. It's only populated when the picture is associated with a Live Photo video. The Live Photo video is a 1-3 second MOV taken at the same time as the photo.

New: 0x0017 is the offset time in the video where the still-image was captured.
It uses the same scalar as defined by 0x0003.

For example:
    0x0003
      value = 193305514623708
      timescale = 1000000000
      Detect: value/timescale = Run Time Since Power Up is 2 days 5:41:46
    0x0011
      Media Group UUID = B177639A-27D6-4E06-BF19-4F4CD7CF7A24
      Detect: Since this is defined, there must be a Live Photo video associated with this picture.
    0x0017 = 1112547328
      1112547328 / timescale = 1.112547328
      Assuming you have access to the Live Photo video, this is the exact frame in the Live Photo video that contains this picture. In this example, it is at 1.112547328 seconds into the Live video.

I can then extract the frame from the video using something like:
   /usr/bin/ffmpeg -ss 1.112547328 -i IMG_20210215_143128.MOV -frames:v 1 -q:v 2 output.jpg

Neal Krawetz

I propose labeling Apple MakerNotes 0x0017 as Live Photo Video Index.

Neal Krawetz

Had another idea for a test...

IF you take an iPhone picture with Live Photo (picture and associated video), THEN:

1. As expected, the Media Group UUID is present. This UUID is found in both the JPEG and MOV, so they can be associated with each other. (In the video, exiftool calls it the "Content Identifier" and not the "Media Group UUID".)

2. The JPEG MakerNotes 0x0017 identifies the exact frame in the video that matches the picture.

IF you take an iPhone picture without Live Photo (picture only, no associated video), THEN:

1. As expected, the Media Group UUID is not present.

2. The JPEG MakerNotes 0x0017 is still present.  I suspect that, behind the scenes, the Live Photo is still created but isn't saved since Live Photo is disabled.

Phil Harvey

Hi Neal,

Sorry for the delay in responding -- I've been busy outdoors with the recent good weather (finally!).

Thanks for this.  I'll take a look at this in detail as soon as I get a chance.

- 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 ($).

Phil Harvey

After a long delay, the LivePhotoVideoIndex will finally get added in ExifTool 12.46

- 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 ($).