What would be the best way to resize user recorded video on iphone?
Currently, I have the ability to receive video in two ways:
1) Get the file url UIImagePickerControllerafter the video was recorded
2) Get the frames of the video as sending using AVCaptureSession
For 1) I will need something that can read .mov h.264 files and spit out individual frames. Is there such a thing?
For 2) I was thinking about getting a UIImage for each frame, resizing the image and then recompiling the video with something like AVAssetWriter. But this seems like a very intensive operation, and I wonder if there is a better way to approach this problem.
Is the general idea of resizing video to resize each individual frame and then recompiling the video? Or is there a way to directly resize the entire video?
I just need the user to record a video, and then resize this video to 320x320, without fancy editing.
Thanks for any help you can provide.
Edit: Maybe “resize” is the wrong word. I just need to trim the video so that it is from 480x360 to 320x320. Also this cropping is not required in real time, I can do it as soon as the video has been recorded.
source
share