我已将图像和视频文件都提取到iOS中的临时目录中,准备将运动图像发送到Android。
因此,我需要将文件转换为运动图像,这要求我将两个文件合并为一个.jpg。这很容易,因为视频只是标记在图像上:
[jpg data][mp4 data]
我一直在看https://android.jlelse.eu/working-with-motion-photos-da0aa49b50c,看来我需要在照片中添加一些XMP元数据来告诉它偏移量在哪里。
但是,我有一张动态照片,我提取了元数据,但与上面的说明不匹配。
任何人都可以做到这一点,并且我没有找到官方指南吗?
这是exiftool(https://sno.phy.queensu.ca/~phil/exiftool/)提取的元数据
$ exiftool 20190306_145122.jpg
ExifTool Version Number : 11.32
File Name : 20190306_145122.jpg
Directory : .
File Size : 6.0 MB
File Modification Date/Time : 2019:03:06 14:51:22+00:00
File Access Date/Time : 2019:03:20 18:18:17+00:00
File Inode Change Date/Time : 2019:03:15 20:06:40+00:00
File Permissions : rwxr-----
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
Exif Byte Order : Little-endian (Intel, II)
Make : samsung
Camera Model Name : SM-G930F
Orientation : Rotate 90 CW
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : G930FXXS2DRC3
Modify Date : 2019:03:06 14:51:22
Y Cb Cr Positioning : Centered
Exposure Time : 1/100
F Number : 1.7
Exposure Program : Program AE
ISO : 50
Exif Version : 0220
Date/Time Original : 2019:03:06 14:51:22
Create Date : 2019:03:06 14:51:22
Shutter Speed Value : 1/100
Aperture Value : 1.7
Brightness Value : 4.3
Exposure Compensation : 0
Max Aperture Value : 1.7
Metering Mode : Center-weighted average
Flash : No Flash
Focal Length : 4.2 mm
Maker Note Version : 0100
Device Type : Cell Phone
Raw Data Byte Order : Little-endian (Intel, II)
Raw Data CFA Pattern : Swap
Face Detect : Off
User Comment :
Sub Sec Time : 0040
Sub Sec Time Original : 0040
Sub Sec Time Digitized : 0040
Flashpix Version : 0100
Color Space : sRGB
Exif Image Width : 4032
Exif Image Height : 3024
Interoperability Index : R98 - DCF basic file (sRGB)
Interoperability Version : 0100
Exposure Mode : Auto
White Balance : Auto
Focal Length In 35mm Format : 26 mm
Scene Capture Type : Standard
Image Unique ID : C12LLJB18VM C12LLKH01GM.
GPS Version ID : 2.2.0.0
GPS Latitude Ref : North
GPS Longitude Ref : West
GPS Altitude Ref : Above Sea Level
GPS Time Stamp : 14:51:18
GPS Date Stamp : 2019:03:06
Compression : JPEG (old-style)
Thumbnail Offset : 1218
Thumbnail Length : 25490
Image Width : 4032
Image Height : 3024
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1)
Time Stamp : 2019:03:06 14:51:22+00:00
Embedded Video Type : MotionPhoto_Data
Embedded Video File : (Binary data 2803773 bytes, use -b option to extract)
Aperture : 1.7
GPS Altitude : 61 m Above Sea Level
GPS Date/Time : 2019:03:06 14:51:18Z
GPS Latitude : 51 deg 53' 47.00" N
GPS Longitude : 8 deg 26' 33.00" W
GPS Position : 51 deg 53' 47.00" N, 8 deg 26' 33.00" W
Image Size : 4032x3024
Megapixels : 12.2
Scale Factor To 35 mm Equivalent: 6.2
Shutter Speed : 1/100
Create Date : 2019:03:06 14:51:22.0040
Date/Time Original : 2019:03:06 14:51:22.0040
Modify Date : 2019:03:06 14:51:22.0040
Thumbnail Image : (Binary data 25490 bytes, use -b option to extract)
Circle Of Confusion : 0.005 mm
Field Of View : 69.4 deg
Focal Length : 4.2 mm (35 mm equivalent: 26.0 mm)
Hyperfocal Distance : 2.14 m
Light Value : 9.2