I have a very large video and I need to chunk this video to upload it to Dropbox.
I tried to use NSData
, but because this file is too large, my application always crashes, so I don't know what I can do now.
For smaller videos, I used this:
NSData(contentsOfURL: self.newAsset.URL)!.subdataWithRange(NSMakeRange(0, 10000000))
and I didn't have any problem with that, but when the video is too large I have an error:
Cannot allocate memory
So, what can I do to chunk the data of large videos?