Getting Slow Motion meta data from captured video in iOS

血红的双手。 提交于 2019-12-07 00:10:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!