9

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!

George Sealy
  • 956
  • 1
  • 11
  • 23
  • Hi, any updates on that? – Evgeny Karkan Jun 26 '15 at 12:06
  • 1
    Not really, although it seems that exporting the video using the new Photos framework bakes in the slow motion, which is better than nothing. Would be nice to get the actual data though... – George Sealy Jul 08 '15 at 05:37
  • 1
    @EvgenyKarkan You can check my post below for more information on how to get the details of slow motion segments. Also, as far as Photos framework baking in slow motion, I got this response from an Apple rep about that: "According to PhotoKit engineering, when an original slow-mo file (strictly speaking, an AVAsset whose first video track’s nominal frame rate is > 105) is added to the photo library via PhotoKit, a default slow-mo region (and adjustment) would be automatically created. This would explain the behavior you are seeing." – Daniel Williams Jun 29 '17 at 01:43

2 Answers2

2

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.

Daniel Williams
  • 246
  • 1
  • 12
0

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

Xcoder
  • 1,747
  • 13
  • 17