Hello,
I have an issue with ios SDK while record video when broadcasting.
For a single video : start broadcast then stop, i have at least a good MP4 video.
But if broadcast again and stop again, the 2nd video is not good : the image is stuck.
Maybe i do something wrong with MP4Writer object…
Here how i start writing :
case WOWZBroadcastStateBroadcasting:
self.writeMP4 = NO;
self.mp4Writer = [MP4Writer new];
self.writeMP4 = [self.mp4Writer prepareWithConfig:self.goCoder.config];
if (self.writeMP4) {
[self.mp4Writer startWriting];
}
}
Here how i stop writing :
if (self.writeMP4 && self.mp4Writer.writing) {
if (self.video_capture_queue) {
dispatch_async(self.video_capture_queue, ^{
[self.mp4Writer stopWriting];
});
}
else {
[self.mp4Writer stopWriting];
}
}
self.writeMP4 = NO;
When view controller appear i initialize :
[self.goCoder registerVideoSink:self];
[self.goCoder registerAudioSink:self];
[self.goCoder registerVideoEncoderSink:self];
[self.goCoder registerAudioEncoderSink:self];
[self.goCoder registerDataSink:self eventName:@"onTextData"];
And i unregister only when i close the viewcontroller
[self.goCoder unregisterVideoSink:self];
[self.goCoder unregisterAudioSink:self];
[self.goCoder unregisterVideoEncoderSink:self];
[self.goCoder unregisterAudioEncoderSink:self];
[self.goCoder unregisterDataSink:self eventName:@"onTextData"];
Here you can see the video by download them here : https://we.tl/t-GFguFD1wsR
in attachment the 2nd video (because it is smaller that the first )