How do I record an Arkit session.

Hello all,


I want to record video during an arkit session (video of the scene) .

I found a library called SceneKitVideoRecorder but the quality of the recording was poor. Does anyone have any

reccomendations as to how I could do this ? Any help is deeply appreciated.


Kind regards.

Replies

I was looking for a way to do this within a program, but I could not find anything.


For now I just use iOS's built-in screen recorder.

https://support.apple.com/en-us/HT207935

iOS provides the ReplayKit framework to record video from the screen. You can check out the API here: https://developer.apple.com/documentation/replaykit
The attached file is a protocol with default implementations of startRecording and stopRecording. I start recording before presenting my AR view controller and stop in the unwind segue.

Code Block Swift
class MainViewController: UIViewController, ReplayKitScreenRecorder {
internal let recorder = RPScreenRecorder.shared()
@IBOutlet private weak var recordVideoOfSession: UISwitch!

Code Block
if recordVideoOfSession.isOn {
startRecording()
}

Code Block
if self.recordVideoOfSession.isOn {
stopRecording()
}




you can use ARVideokit. it is very simple to use for recording a video and saving.
ARVideoKit is excellent but it has one omission -> People occlusions are not recorded in the AR view so people passing behind objects is not recorded properly....