Is it possible to lock the FPS of a camera?

Viewed 152

I'm trying to lock the number of FPS using the front camera

I trier to lock the min FPS to 5 and the max to 10 but nothing change, I'm always around 30.

guard let device = createDevice(position: .front) else {
 return
}    
try device.lockForConfiguration()
device.activeVideoMinFrameDuration = CMTimeMake(value: 1, timescale: 5)
device.activeVideoMaxFrameDuration = CMTimeMake(value: 1, timescale: 10)
device.unlockForConfiguration()

Any suggestions ?

Thanks in advance!

1 Answers

It is possible! In addition to your code, you need to set the movieFragmentInterval of the device Output

Related