How to extract the Photo/Video component of a MVIMG?

前端 未结 4 807
遥遥无期
遥遥无期 2021-02-13 23:17

The Google Pixel 2 and probably other phones since have the capability to cover \"Motion Photos\". These are saved as MVIMG and comparatively big.

I’m looking for a way

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-14 00:15

    The EXIF tag is useful, but the offset is with the respect to the end of the file. The mp4 file is embedded at:

    [file_size-micro_video_offset, file_size)
    

    For example:

    $ exiftool -xmp:all MVIMG_123.jpg
    XMP Toolkit                     : Adobe XMP Core 5.1.0-jc003
    Micro Video                     : 1
    Micro Video Version             : 1
    Micro Video Offset              : 2107172
    Micro Video Presentation Timestamp Us: 966280
    $ python -c 'import os; print os.path.getsize("MVIMG_123.jpg") - 2107172'
    3322791
    $ dd if=MVIMG_123.jpg of=video.mp4 bs=3322791 skip=1
    $ file video.mp4 
    video.mp4: ISO Media, MP4 v2 [ISO 14496-14]
    

提交回复
热议问题