I want to let the user of my app pick a video from his camera roll and play it,
So I created my own custom picker (need custom UI) to choose the video and when the user pick a video I use AVAssetExportSession
to export the video's asset to mp4 file.
If you didn't knew the new iPhone 5S has an option to apply slow motion on a video. However when I export a video with slow motion, the slow motion is gone.
I suspect there is some extra data on the video asset that represent the slow motion part and store information of witch part of the video should be play in lower FPS.
I had a similar issue before with photos, for example if you edit a photo with one of the native iOS filters or crop, and than load the photo using AVAsset to an image view, you will see the original photo (without the filters or crop).
Only after examining the ALAssetRepresentation
metadata "AdjustmentXMP" key, and applying CIFilter
's accordingly, you will get the edited image.
Any ideas?
The video is not 'recorded in slow-mo' it's recorded in 60 frames per second, and then there is an option to play back in 30 frames per second, creating the effect of slow motion. Try setting the frame-rate on your playback after accessing the asset to 30.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With