0

I have video in .mp4 format and I would like to get last frame of this video then blur it and put into UIImageView. My problem is that I dont know how to get last frame of video. How can I do this in iOS?

2 Answers 2

1

Use AVAssetImageGenerator.

https://developer.apple.com/librarY/mac/documentation/AVFoundation/Reference/AVAssetImageGenerator_Class/Reference/Reference.html#//apple_ref/occ/cl/AVAssetImageGenerator

I haven't personally used it, but it looks pretty straight forward if you've used AVFoundation before. Looks like you just initialize it with an asset and then you can generate a CGImage at a specific time using copyCGImageAtTime:actualTime:error:

1

You may try MPMoviePlayer, here is document related:

https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006953-CH3-SW69

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.