Open DikeyKing opened 2 years ago
Hello
I want to save some data from ARFrame and associate the data to the video frame captured from SCNRecorder
How I can not read the time when recorder is recording
func append(pixelBuffer: CVPixelBuffer, withPresentationTime time: CMTime) throws { guard pixelBufferAdaptor.assetWriterInput.isReadyForMoreMediaData else { return } guard pixelBufferAdaptor.append(pixelBuffer, withPresentationTime: time) else { if assetWriter.status == .failed { throw assetWriter.error ?? Error.unknown } return } let seconds = time.seconds duration += seconds - lastSeconds lastSeconds = seconds }
Here I want to get the CMTime here to save with my ARFrame data.
Thanks a lot
I think you can implement your own AVAssetWriter and use
func capturePixelBuffers( handler: @escaping (CVPixelBuffer, CMTime) -> Void ) -> PixelBufferOutput
to supply it with pixel buffers.
Hello
I want to save some data from ARFrame and associate the data to the video frame captured from SCNRecorder
How I can not read the time when recorder is recording
Here I want to get the CMTime here to save with my ARFrame data.
Thanks a lot