Getting Slow Motion meta data from captured video

2019-04-26 10:49发布

We have a video app that is importing video from the user's camera roll. Our problem is importing slo-mo video taken with the native Camera app. We can recognise that there is a higher than normal frame rate (e.g. 120 or 240 fps).

What we can't find is the meta information that specifies when the video drops into slow motion and when it speeds up again. Does anyone know where this information is kept, and/or how to get at it? Is it in the file itself, or stored in a separate meta file somewhere?

Any help would be hugely appreciated, thanks!

2条回答
走好不送
2楼-- · 2019-04-26 11:29

The slow motion segments are technically not metadata. They are of type UITrackSegment which you can read about here

The result of a scaling method on a track creates a timeMapping object that plays the track at the rate of it's source.duration / target.duration. You can read more about that in this blog post.

查看更多
爷的心禁止访问
3楼-- · 2019-04-26 11:38

Sadly the Answer is NO. The ALAsset of the video files does not contain any information pertaining to the start and end points of a Slo Mo segment in a High FPS video.

Refer : https://devforums.apple.com/message/1025773#1025773

查看更多
登录 后发表回答