I have scratched my head for years but no outcome on this. When I have AVCaptureVideoDataOutput set and OpenGLES rendering of frames using AVCaptureVideoStabilizationModeCinematic, there is considerable delay in the preview. This can easily be reproduced with RosyWriter sample code by inserting a line
_videoConnection.preferredVideoStabilizationMode = AVCaptureVideoStabilizationModeCinematic;
The delay is much much much less if I use AVCaptureVideoPreviewLayer. Is there a way to eliminate the lag when rendering frames using OpenGLES, or I have no way but to use AVCaptureVideoPreviewLayer.