I have a very large video and I need to record this video in order to upload it to Dropbox .
I tried to use NSData, but since this file is too large, my application always crashes, so I don’t know what I can do now.
For small videos, I used this:
NSData(contentsOfURL: self.newAsset.URL)!.subdataWithRange(NSMakeRange(0, 10000000))
and I had no problems with this, but when the video is too large, I have an error:
Unable to allocate memory
So what can I do to organize the data of large videos?
source
share