问题
AVAssetWriter startWriting is returning BOOL False value when i'm writing movie on 2G device, but for all other devices its returning TRUE value and working fine.Anyone faced this problem or do you have any clue why its happening,help me please
回答1:
I am receiving false on startWriting on an iPad, when it works on both my iPhone3 and 4 (all have iOS 4.2). The status of the writer is failed, with the NSError as: "The operation couldn't be completed. (AVFoundationErrorDomain error -11800)."
Creation of the writer yielded no error when creating with file type: AVFileTypeQuickTimeMovie, and the file did NOT already exist. I've also tried using different pixel buffer pixel formats to no avail. Lastly, I've tried changing the video type to MPEG4 and M4V...again, to no avail.
I'm posting this here instead of creating a new problem, as they both are the same result and is not addressed. I need to have this resolved w/in a few days, so if I learn anything, I'll post what I find.
回答2:
The most likely cause is that the specific iOS device you are running on does not include the hardware H264 encoder. I think that versions of iPhone earlier than 3GS have no hardware, but I am not sure if the iPad 1 has H264 encoding hardware. I know iPad 2 does have this hardware.
来源:https://stackoverflow.com/questions/5041166/avassetwriter-startwriting-problem