ARVideoKit icon indicating copy to clipboard operation
ARVideoKit copied to clipboard

Framerate

Open kristokiis opened this issue 6 years ago • 9 comments

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.

kristokiis avatar Nov 19 '17 18:11 kristokiis

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

AFathi avatar Nov 19 '17 18:11 AFathi

Seems it does not help, recording still forces everything 2 times faster nomatter what those settings are.

kristokiis avatar Nov 19 '17 19:11 kristokiis

@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

AFathi avatar Nov 19 '17 19:11 AFathi

ok, but do you have any estimations when 1.2 will be released?

kristokiis avatar Nov 22 '17 21:11 kristokiis

@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.

AFathi avatar Nov 22 '17 22:11 AFathi

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.

kristokiis avatar Nov 22 '17 23:11 kristokiis

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 avatar Dec 30 '17 12:12 kristokiis

@kristokiis, I'm open-sourcing ARVideoKit this month and it will include an option attempting to fix that issue.

-Ahmed

AFathi avatar Jan 02 '18 18:01 AFathi

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!

avierkant avatar Jan 30 '18 16:01 avierkant