I have an AVMutableComposition
made from a Slo-Mo video. In AVPlayer it plays in the right speed, because I have requested it from Photos using PHVideoRequestOptions.Original
which doesn't include the Slo-Mo part for the video. However, exporting the mutable composition will export it with full FPS, which causes the Slo-Mo to come back if the FPS is too high.
How can I export video with frame rate of 30? Is there a specific file type that doesn't include slow motion or some other way to do this?
Two (bad) solutions I've found:
- Setting
AVAssetExportSession
toAVAssetExportPresetMediumQuality
or less will cause the frame rate to drop but quality will also be worse. Not good. - Setting
AVAssetExportSession.videoComposition
to a video composition with frameDuration that isCMTimeMake(1, 30)
but it takes really long to export the video with that, which is not good either. I don't know what causes it to take so long.