Bug using dan eberts clock expression
I've never seen this behavior before I've got after effects updated to 22.2.1
The buggy behavior is illustrated below. It happens on whole seconds for one frame.
I've set up the clock to display in tenths of a second. Below is the clock output for every frame.
1.9, 1.9 1.9, 1.0 ,2.0 ,2.0, 2.1, 2.1, 2.1, 2.2 ... 2.9, 2.9, 2.9, 2.0, 3.0, 3.0 etc
the error is in bold
the video ive been given is 30.303 fps
Here is the code I'm using
rate = 1.0101;
//tried making the rate 30.303/30
//ive tried 1 same behavior
clockStart = -10.06501006501007;
function padZero(n){
return (n < 10 ? "0" : "") + n;
}
clockTime = clockStart + rate*(time - inPoint)
// this is all to get the clock to start at 0 in a certain part of the clip
//clockTime = clockStart + rate*(time - inPoint); start frame was 5024 then divided by 30.303
// now i cliped it so clockstart will be at frame 5024 identified by wmh so 5024-4720 / 30.303 = 10.03201003201003
//still off by one frame so add 1/30.303
if (clockTime < 0){
sign = "-";
clockTime = -clockTime;
}else{
sign = "";
}
t = Math.floor(clockTime);
hr = Math.floor(t/3600);
min = Math.floor((t%3600)/60);
sec = Math.floor(t%60);
ms = clockTime.toFixed(1).substr(-1);
//sign + padZero(hr) + ":" + padZero(min) + ":" + padZero(sec) + "." + ms
sign + padZero(sec) + "." + ms
I wish I could post the file anyways thanks for taking a look.
