0

Can i reuse an existing GPUImageMovieWriter (after calling finishRecording) or is there a method to pause and resume the recording?

I get error if i call startRecoding after a finishRecording.

Terminating app due to uncaught exception 'NSInternalInconsistencyException', 
reason: '*** -[AVAssetWriter addInput:] Cannot call method when status is 2'
Vineet Singh
  • 4,009
  • 1
  • 28
  • 39

1 Answers1

0

You can't call startRecording() on the same movieWriter instance after calling finishRecording().

finishRecording() writes the completion block for the video into file, thus all subsequent frames added to the video file would be useless anyway. If what you want to achieve is to pause recording for a bit and append video at the end again after pausing, you should probably create a "pause" state where you don't record, but simply measure the amount of time paused, and then use an adjusted frame time for when you resume recording again.

Cheers! Vijay

Vijay
  • 14
  • 1