Saving video from CMSampleBuffer while streaming using ReplayKit
问题 I'm streaming a content of my app to my RTMP server and using RPBroadcastSampleHandler. One of the methods is override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType) { switch sampleBufferType { case .video: streamer.appendSampleBuffer(sampleBuffer, withType: .video) captureOutput(sampleBuffer) case .audioApp: streamer.appendSampleBuffer(sampleBuffer, withType: .audio) captureAudioOutput(sampleBuffer) case .audioMic: () } } And the