[Feature Request] support Motion Photos from Google Pixel Phones

Ideas for improvements and requests for new features in XnView MP

Moderators: helmut, XnTriq, xnview

Post Reply
bahivi5426
Posts: 1
Joined: Sat Oct 30, 2021 5:17 pm

[Feature Request] support Motion Photos from Google Pixel Phones

Post by bahivi5426 »

Hello! Some photos taken with Google Pixel smartphones contain an embedded video clip that can theoretically be used to extract another frame of the scene (for example, if there is a flashing person in the main frame of the image).

The offset of the video in the file is saved in the EXIF metadata and can be viewed with the following command:

Code: Select all

exiftool -a -G PXL_20210326_130406364.MP.jpg
Example output:

Code: Select all

Xmp.GCamera.MotionPhoto                      XmpText     1  1
Xmp.GCamera.MotionPhotoVersion               XmpText     1  1
Xmp.GCamera.MotionPhotoPresentationTimestampUs XmpText     6  233320
Xmp.xmpNote.HasExtendedXMP                   XmpText    32  E1F7505D2DD64EA6948D2047449F0FFA
Xmp.Container.Directory                      XmpText     0  type="Seq"
Xmp.Container.Directory[1]                   XmpText     0  type="Struct"
Xmp.Container.Directory[1]/Container:Item    XmpText     0  type="Struct"
Xmp.Container.Directory[1]/Container:Item/Item:Mime XmpText    10  image/jpeg
Xmp.Container.Directory[1]/Container:Item/Item:Semantic XmpText     7  Primary
Xmp.Container.Directory[1]/Container:Item/Item:Length XmpText     1  0
Xmp.Container.Directory[1]/Container:Item/Item:Padding XmpText     1  0
Xmp.Container.Directory[2]                   XmpText     0  type="Struct"
Xmp.Container.Directory[2]/Container:Item    XmpText     0  type="Struct"
Xmp.Container.Directory[2]/Container:Item/Item:Mime XmpText     9  video/mp4
Xmp.Container.Directory[2]/Container:Item/Item:Semantic XmpText    11  MotionPhoto
Xmp.Container.Directory[2]/Container:Item/Item:Length XmpText     7  1679555
Xmp.Container.Directory[2]/Container:Item/Item:Padding XmpText     1  0
Based on the video offset / length it's possible to extract the video (e.g. by using dd commandline app).

It would be nice, if it would be possible to view this embedded videos directly in XnView :)

Here are some links with more detailed format description:
https://gitlab.gnome.org/GNOME/shotwell ... te_1064700
https://feedback-readonly.photoshop.com ... 1eac350d81
https://medium.com/android-news/working ... a0aa49b50c
`
Post Reply