相册问题中的实况照片:未先播放片段

问题描述

我已经成功创建了一张livephoto,也可以在相册中查看(播放)了。

但是仔细看的话,你会发现一个东西,就是当你浏览系统相机拍摄的livephoto时(用手指滑动而不是按下),它总是先播放一小段,然后回到开头(移动物体会更容易区分)。

我想知道是不是某些视频的元数据信息没有设置导致的,但现在我不知道具体的关键。到目前为止,我自己在任何文档中都找不到某些元密钥。

这是我使用 AVAssetWriter 创建的视频(.mov)配置文件删除了一般信息部分

Video
Count                                    : 342
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : High@L3.2
Format settings                          : CABAC / 2 Ref Frames
Format settings,CABAC                   : Yes
Format settings,ReFrames                : 2
Format settings,ReFrames                : 2 frames
Internet media type                      : video/H264
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Codec                                    : AVC
Codec                                    : AVC
Codec/Family                             : AVC
Codec/Info                               : Advanced Video Codec
Codec/Url                                : http://developers.videolan.org/x264.html
Codec/CC                                 : avc1
Codec profile                            : High@L3.2
Codec settings                           : CABAC / 2 Ref Frames
Codec settings,CABAC                    : Yes
Codec_Settings_RefFrames                 : 2
Duration                                 : 3002
Duration                                 : 3 s 2 ms
Duration                                 : 3 s 2 ms
Duration                                 : 3 s 2 ms
Duration                                 : 00:00:03.002
Duration                                 : 00:00:03:01
Duration                                 : 00:00:03.002 (00:00:03:01)
Bit rate                                 : 9920417
Bit rate                                 : 9 920 kb/s
Width                                    : 1308
Width                                    : 1 308 pixels
Clean aperture width                     : 1308
Clean aperture width                     : 1 308 pixels
Height                                   : 980
Height                                   : 980 pixels
Clean aperture height                    : 980
Clean aperture height                    : 980 pixels
Stored_Width                             : 1312
Stored_Height                            : 992
Sampled_Width                            : 1308
Sampled_Height                           : 980
Pixel aspect ratio                       : 1.000
Clean aperture pixel aspect ratio        : 0.000
display aspect ratio                     : 1.335
display aspect ratio                     : 4:3
Rotation                                 : 90.000
Rotation                                 : 90°
Frame rate mode                          : VFR
Frame rate mode                          : Variable
Frame rate                               : 29.317
Frame rate                               : 29.317 FPS
Minimum frame rate                       : 15.000
Minimum frame rate                       : 15.000 FPS
Maximum frame rate                       : 30.000
Maximum frame rate                       : 30.000 FPS
Frame count                              : 88
Resolution                               : 8
Resolution                               : 8 bits
Colorimetry                              : 4:2:0
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Interlacement                            : PPF
Interlacement                            : Progressive
Bits/(Pixel*Frame)                       : 0.264
Stream size                              : 3722229
Stream size                              : 3.55 MiB (93%)
Stream size                              : 4 MiB
Stream size                              : 3.5 MiB
Stream size                              : 3.55 MiB
Stream size                              : 3.550 MiB
Stream size                              : 3.55 MiB (93%)
Proportion of this stream                : 0.93281
Title                                    : Core Media Video
Encoded date                             : UTC 2021-05-26 08:07:41
Tagged date                              : UTC 2021-05-26 08:07:41
Color range                              : Full
colour_description_present               : Yes
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.601

Audio
Count                                    : 275
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Format                                   : PCM
Commercial name                          : PCM
Format settings                          : Little / Signed
Format settings,Endianness              : Little
Format settings,Sign                    : Signed
Codec ID                                 : lpcm
Codec                                    : PCM
Codec                                    : PCM
Codec/Family                             : PCM
Codec/CC                                 : lpcm
Codec settings                           : Little / Signed
Codec settings,Endianness               : Little
Codec settings,Sign                     : Signed
Duration                                 : 3000
Duration                                 : 3 s 0 ms
Duration                                 : 3 s 0 ms
Duration                                 : 3 s 0 ms
Duration                                 : 00:00:03.000
Duration                                 : 00:00:03.000
Bit rate mode                            : CBR
Bit rate mode                            : Constant
Bit rate                                 : 705600
Bit rate                                 : 705.6 kb/s
Channel(s)                               : 1
Channel(s)                               : 1 channel
Sampling rate                            : 44100
Sampling rate                            : 44.1 kHz
Samples count                            : 132300
Resolution                               : 16
Resolution                               : 16 bits
Bit depth                                : 16
Bit depth                                : 16 bits
Stream size                              : 264600
Stream size                              : 258 KiB (7%)
Stream size                              : 258 KiB
Stream size                              : 258 KiB
Stream size                              : 258 KiB
Stream size                              : 258.4 KiB
Stream size                              : 258 KiB (7%)
Proportion of this stream                : 0.06631
Title                                    : Core Media Audio
Encoded date                             : UTC 2021-05-26 08:07:41
Tagged date                              : UTC 2021-05-26 08:07:41

Other
Count                                    : 113
Count of stream of this kind             : 1
Kind of stream                           : Other
Kind of stream                           : Other
Stream identifier                        : 0
Type                                     : Meta
Duration                                 : 67
Duration                                 : 67 ms
Duration                                 : 67 ms
Duration                                 : 67 ms
Duration                                 : 00:00:00.067
Duration                                 : 00:00:00.067
Frame count                              : 1

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)