Iphone12 pro record 4K 60FPS video always drop frame

I am using Iphone12 pro to test my camera app, when I record 4K 60FPS video, captureOutput didDrop will be invoked many times, the final fps only was about 45fps.

I found some weird things.
  1. If I move camera or let something moving front of the camera, the viewport is changing, the dropping frame will stop, If keep camera stable and static, dropping frame will start again.

  2. I made some debug info displayed in the top of view, If I display it, the dropping frame stopped, If I hide this debug view, dropping frame start agian.

  3. If I don't record ( with AVAssetWriter) , it will drop frame per 0.5 sec, If I start record, it drop frame very fast.

drop frame reason is "OutOfBuffers"

this problem is must shown on iphone12 pro, everything is fine on iphoneX.
Iphone12 pro record 4K 60FPS video always drop frame
 
 
Q