IOS: How to fix half dimensional frames while saving movie using AVAssetWriter

I am writing a movie file with AVAssetWriter and AVAssetWriterInputPixelBufferAdaptor.

CGImage, which is used to build CVPixelBuffer, looks normal (as shown on the screen), the output movie shows the input image compressed in the upper half of the frame. All widths, heights, and bytes_per_row are identical (for CGImage, AVAssetWriter settings, and CVPixelBuffer settings).

What can cause such a problem?

+3
source share
1 answer

- , AVAssetWriterInputPixelBufferAdaptor CVPixelBufferPool CVPixelBuffers CVPixelBufferPool, -, , . CVPixelBuffer . ​​ Apple, .

CVPixelBufferGetBytesPerRow (CVPixelBuffer) . !

+3

Source: https://habr.com/ru/post/1790096/


All Articles