问题
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!
回答1:
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.
回答2:
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
来源:https://stackoverflow.com/questions/28202533/getting-slow-motion-meta-data-from-captured-video-in-ios