Post

Replies

Boosts

Views

Activity

Reply to AVDevice is ignoring 60fps
I found the reason/solution for this behavior. You need to add an AVCaptureVideoDataOutput to your session. On Mac you need to set the FPS on the AVCaptureVideoDataOutput too #if os(OSX) if let connection = videoDataOutput.connection(with: .video) { connection.videoMinFrameDuration = CMTimeMake(value: 1, timescale: Int32(fps)) connection.videoMaxFrameDuration = CMTimeMake(value: 1, timescale: Int32(fps)) } #endif You need to change the AVCaptureSession.Preset. It defaults to high which I guess limits in an undocumented way the fps to 30. If you change it to hd4K3840x2160, hd1920x1080, ... it will run with the desired FPS. I am really upset with the documentation from Apple. As a beginner it is really, really hard to debug problems like this. There is nowhere a hint, that the default profile high is limiting the "output" to 30 fps.
Nov ’24