Skip to content

Handle "moving photo" video files #180

Open
@michaelkebe

Description

@michaelkebe

Just tested gpth with a takeout. I have a Google Pixel 6a. It has a "Top Shot" feature, which records a video instead of making a single photo.

It looks like in the takeout these top shots are stored as follows:

Photos from 2023/PXL_20230205_164128403.MP.jpg.json
Photos from 2023/PXL_20230205_164128403.MP.jpg
Photos from 2023/PXL_20230205_164128403.MP

Currently these .MP files are ignored by gpth and are kept in the input folder.

I have no concrete idea how to deal with these files. Any discussions are welcome.

The .MP file is a MPEG-4. Here is the output of mediainfo:

$ mediainfo PXL_20230205_164128403.MP
General
Complete name                            : PXL_20230205_164128403.MP
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/mp41)
File size                                : 4.39 MiB
Duration                                 : 2 s 772 ms
Overall bit rate                         : 13.3 Mb/s
Encoded date                             : UTC 2023-02-05 16:41:28
Tagged date                              : UTC 2023-02-05 16:41:28
FileExtension_Invalid                    : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v

Video #1
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : [email protected]@Main
Codec ID                                 : hvc1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 2 s 772 ms
Bit rate                                 : 12.9 Mb/s
Width                                    : 1 440 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 4:3
Rotation                                 : 180°
Frame rate                               : 27.056 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.306
Stream size                              : 4.26 MiB (97%)
Title                                    : VideoHandle
Language                                 : English
Encoded date                             : UTC 2023-02-05 16:41:28
Tagged date                              : UTC 2023-02-05 16:41:28
Color range                              : Full
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Codec configuration box                  : hvcC

Video #2
ID                                       : 2
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : [email protected]@Main
Codec ID                                 : hvc1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 747 ms
Bit rate                                 : 1 095 kb/s
Width                                    : 2 048 pixels
Height                                   : 1 536 pixels
Display aspect ratio                     : 4:3
Rotation                                 : 180°
Frame rate mode                          : Constant
Frame rate                               : 1.338 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.260
Stream size                              : 99.9 KiB (2%)
Title                                    : VideoHandle
Language                                 : English
Encoded date                             : UTC 2023-02-05 16:41:28
Tagged date                              : UTC 2023-02-05 16:41:28
Color range                              : Full
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Codec configuration box                  : hvcC

Other #1
Type                                     : meta
Duration                                 : 2 s 772 ms
Bit rate mode                            : Constant

Other #2
Type                                     : meta
Duration                                 : 1 s 121 ms
Bit rate mode                            : Constant

More information is available here:
https://support.google.com/googlecamera/answer/9937175?hl=en
https://support.google.com/photos/thread/139943915/open-or-convert-mp-file?hl=en

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions