I\'m using glReadPixels to read data into a CVPixelBufferRef. I use the CVPixelBufferRef as the input into an AVAssetWriter
glReadPixels
CVPixelBufferRef
AVAssetWriter
glReadPixels(0, 0, w*s, h*s, GL_BGRA, GL_UNSIGNED_BYTE, buffer);
Use GL_BGRA in glReadPixels. It works, just tried it myself.