Closed pptlabs closed 5 years ago
Hi Ahmed, thanks for taking the time to chat with me to help lead me through possible approaches to troubleshooting this issue.
I have found the source of the problem is with the sourcePixelBufferAttributes being passed into the AVAssetWriterInputPixelBufferAdaptor in the WritAR class: https://github.com/AFathi/ARVideoKit/blob/master/ARVideoKit/Rendering/Writer/WritAR.swift#L67
Bypassing the attributes, and passing in nil, seems to resolve the problem.
pixelBufferInput = AVAssetWriterInputPixelBufferAdaptor(assetWriterInput: videoInput, sourcePixelBufferAttributes: nil)
I believe this indicates a bug on Apple's end, as it appears that the kCVPixelBuffer...CompatibilityKey references are likely missing from the X family of devices in iOS12.
Update: It has been fixed.
Even with the fix, the same error is still occurring for me.
Hello, we are finding that ARVideoKit (Swift 4.2 branch) is unable to write video/audio on iPhone XS/XR/XMax devices running iOS12. We have tested the Example project and are experiencing the same issue.
The error in the debugger is: ARVideoKit @ 1539003739.21878:- An error occurred while recording the video, status: 3, error: The operation could not be completed