clmtrackr
clmtrackr copied to clipboard
Camera stream freezes once the clmtrackr detects a face (MacOs Mojave, Safari)
The tracker causes the camera stream to freeze on the latest Mac OS version, with the latest Safari. First I saw it on my project which uses clmtrackr and then I tested it with this demo: https://www.auduno.com/clmtrackr/examples/clm_video.html
Mac OS version: Mojave 10.14.1 Safari version: 12.0.1 No errors in the console, the tracker works but very slow.
I tested my project and the demo on previous Mac OS versions and no problems there... Works good as well on: Chrome for Mac Mojave and Safari on IOS 12.
I saw already an open ticket 1 month ago that may be related to the same issue but as the ticket was lack of information I decided to create a separated one (https://github.com/auduno/clmtrackr/issues/159)
So probably this is a bug in the latest Safari version but the question is if there is something that we can do from our side?
We're seeing the same behavior as well.
I can confirm this issue, I'll try to investigate the cause.
It looks like the issue might be related to clmtrackr triggering too many updates per second. I've added a parameter in the dev-branch to limit the amount of iterations per animation frame, that seems to help.
Could you verify if the latest build in the dev-branch resolves the issue?
@auduno Thanks for the quick response! Your last change made it a bit faster but it still very laggy. I played with the maxIterationsPerAnimFrame parameter and I tried to change the value and the results are: maxIterationsPerAnimFrame=2 , less laggy but still noticeable maxIterationsPerAnimFrame=1, work fluently
Hmm, it's a bit of a bummer to have to limit updates to 60 fps (which setting maxIterationsPerAnimFrame to 1 effectively does). I've been trying to figure out what changes in Mojave and/or Safari could cause the issue, but I haven't found anything obvious. Does anyone know exactly which Safari version introduced the issue?
I saw it once I upgraded my Mac, 12.0.1 is the only version I got once my OS was upgraded..
Hi, @DavidEdi-6over6 please could help me find at which line are you changing the maxIterationsPerAnimFrame to 1
Can you please share it with me? Many Thanks,
Hi, @DavidEdi-6over6 please could help me find at which line are you changing the maxIterationsPerAnimFrame to 1
Can you please share it with me? Many Thanks,
clm.js line 48 params.maxIterationsPerAnimFrame = 1
But see auduno's response, this is not recommend
Thank you @DavidEdi-6over6 I still can't get the current position. It's always false.
Do you have any hint on how to fix this issue?
Is it related to Canvas Size Video Size