ARVideoKit
ARVideoKit copied to clipboard
Framerate
I have some problems with frame rate. Default in ARKit is 60fps, when i turn on recording the whole scene goes 2 times faster, all physics and animations work 2 times faster in record mode than in non record mode. In debug i see that scenekit fps is turned to 120fps while in recording. Is there any workaround ? I tried setting recorder fps to 60, but still same behaviour happens.
Hey @kristokiis!
I have noticed this issue recently. Can you try setting the RecordAR
fps to fps30
.
If that doesn't make any difference, you may create a workaround by setting the the SceneKit animation to half what it is right now.
Or try adding the following in viewDidLoad
:
sceneView.preferredFramesPerSecond = 30
recorder?.fps = .fps30
Please inform me how those steps will workout for you.
-Ahmed
Seems it does not help, recording still forces everything 2 times faster nomatter what those settings are.
@kristokiis, Thank you for informing me. I'll be including a fix to this issue in version 1.2.
At this moment, the only workaround would be slowing down the nodes' animations to half what it originally is.
-Ahmed
ok, but do you have any estimations when 1.2 will be released?
@kristokiis, I can't give estimates at this moment; however, I'll try to have it published by end of December.
Also to fix your issue, you may slow down the animation into half what you're using right now. For example, if your animation is taking 5 seconds you'd change the intervals to 2.5 seconds.
but it would affect them when recording is not active. Problem is switching between recording and normal state, physics and world is too different. Question how did you change fps in recording mode that it also affects scenekit fps? Maybe i can use that code to keep same fps in both cases.
Is there any updates coming up with this project? Need to know if i can use this one or need to create my own.
@kristokiis, I'm open-sourcing ARVideoKit this month and it will include an option attempting to fix that issue.
-Ahmed
Has anyone figured out a workaround for this issue? Trying to push an app that would incorporate ARVideoKit later this month and still having a huge issue with the frame rate. Have tried the suggested code above but no matter what video output stays locked around 60fps Thanks!