可以锁定相机的FPS吗?



我正在尝试使用前置摄像头锁定FPS的数量

我尝试将最小FPS锁定为5,最大FPS锁定为10,但没有任何变化,我总是在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()

有什么建议吗?

提前感谢!

这是可能的!除了您的代码,您还需要设置设备Output

movieFragmentInterval

最新更新