Existing video filtering problem
I'm trying to filter and re-encode an existing movie, I'm trying the code example from the github page, but at runtime when finishRecording method is called I get an error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetWriter finishWriting] Cannot call method when status is 0'
*** Call stack at first throw:
(
0 CoreFoundation 0x319a264f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x3324ac5d objc_exception_throw + 24
2 AVFoundation 0x30f33bb3 -[AVAssetWriterHelper finishWriting] + 106
3 AVFoundation 0x30f325f7 -[AVAssetWriter finishWriting] + 26
4 Qweeq 0x0024539b -[GPUImageMovieWriter finishRecording] + 50
5 Qweeq 0x0023c2db __block_global_1 + 54
6 libdispatch.dylib 0x318f18e7 _dispatch_call_block_and_release + 10
7 libdispatch.dylib 0x318e7533 _dispatch_worker_thread2 + 298
8 libsystem_c.dylib 0x31e76591 _pthread_wqthread + 264
9 libsystem_c.dylib 0x31e76bc4 _init_cpu_capabilities + 4294967295
)
terminate called after throwing an instance of 'NSException'
What can be the problem?
With the SimpleVideoFileFilter everything is ok. I get the error on 4.3.5 ipad 2 and 5.0 iphone 4.
OK, then something about how you are setting up your video is causing a problem. What is the code you use to set up your movie source, filters, and movie recorder?
Perhaps by looking at how it differs from the SimpleVideoFileFilter example, you might be able to see something different that could be causing a problem.
ok, thanks, the problem was in blocks, setCompletionBlock solved the problem.
It looks like something is interrupting your video. Do you see this same problem with the SimpleVideoFileFilter example? What iOS version and device is this on?