Existing video filtering problem

4 replies [Last post]
nikita
User offline. Last seen 8 years 28 weeks ago. Offline
Joined: 05/06/2012
Posts:

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?

Brad Larson
Brad Larson's picture
User offline. Last seen 4 years 22 weeks ago. Offline
Joined: 05/14/2008
Posts:

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?

nikita
User offline. Last seen 8 years 28 weeks ago. Offline
Joined: 05/06/2012
Posts:

With the SimpleVideoFileFilter everything is ok. I get the error on 4.3.5 ipad 2 and 5.0 iphone 4.

Brad Larson
Brad Larson's picture
User offline. Last seen 4 years 22 weeks ago. Offline
Joined: 05/14/2008
Posts:

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.

nikita
User offline. Last seen 8 years 28 weeks ago. Offline
Joined: 05/06/2012
Posts:

ok, thanks, the problem was in blocks, setCompletionBlock solved the problem.

Syndicate content