The problem:
When saving a video that is recorded in my app, if the video size/duration is too big/long, my app crashes without a log/exception.
why bother pulling the entire contents of the media stream from
[[info objectForKey:UIImagePickerControllerMediaURL] path]
into an NSData*
and then writing them back out? your media stream is going to be huge!
the reason this is happening at save is because you are recording the data, it is going to "disk", and then you read it into memory to write it back out to another disk file.
have you considered using NSFileManager
to copy the file from [[info objectForKey:UIImagePickerControlMediaURL] path]
to the name you create (fullPath) ? this should avoid pulling the whole thing into memory; it should be a "file-to-file" transfer.