You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if let currentVideoDimensions = self.currentVideoDimensions {
sourcePixelBufferAttributes[String(kCVPixelBufferWidthKey)] = NSNumber(value: currentVideoDimensions.width as Int32)
sourcePixelBufferAttributes[String(kCVPixelBufferHeightKey)] = NSNumber(value: currentVideoDimensions.height as Int32)
}
I try to make Video filler functionality in live camera with recording facility
I followed the reference code of IMAGLY but it can't record video, it shows only blank video file so please give me some hint or reference code
Please see my code and give suggestions
*********************** AVAssetWriter ***********************
func setUpWriter() {
self.captureVideoOrientation = .landscapeLeft
motionManager.startAccelerometerUpdates(to: motionManagerQueue, withHandler: { accelerometerData, _ in
guard let accelerometerData = accelerometerData else {
return
}
if let currentVideoDimensions = self.currentVideoDimensions {
sourcePixelBufferAttributes[String(kCVPixelBufferWidthKey)] = NSNumber(value: currentVideoDimensions.width as Int32)
sourcePixelBufferAttributes[String(kCVPixelBufferHeightKey)] = NSNumber(value: currentVideoDimensions.height as Int32)
}
********************** captureOutput ***********************
func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer)
The text was updated successfully, but these errors were encountered: