rFlex / SCRecorder

iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
Apache License 2.0
3.06k stars 583 forks source link

Switching cameras during recording produces video delay and sync issue #298

Open numen31337 opened 8 years ago

numen31337 commented 8 years ago

When you recording video and switching camera source during recording, audio is starting to go ahead from video

amilham commented 8 years ago

I'm experiencing this as well. Switching cameras (front camera to back camera or vice versa) causes the video and audio to go out-of-sync (and sometimes produces popping artifacts in the audio), with the audio getting ahead of the video. I haven't been able to find a solution for this.

Amalous commented 7 years ago

Did anyone ever find a solution to this? I get this problem when switching from back to front, but not vice versa.

freeubi commented 7 years ago

I'm experiencing this as well. Also i found a solution: before you switch the capturedevice, just pause the recording. Like this:

  • (IBAction)changeCameraClicked:(UIButton *)sender { if ([self.recorder isRecording]) { [self.recorder pause]; [self.recorder switchCaptureDevices]; [self.recorder record]; }else { [self.recorder switchCaptureDevices]; } }

So basically the recording stops while the camera is changing.

Amalous commented 7 years ago

Thank you!