Bug: marker times
First of all, I do not have an idea, i have a bug ;)
I try to markers.createMarker(secondsFloatWithFraction), and there are problems with some frames (@25fps).
For example: I manually set a marker (via the markers-menu) @08:09 (which is the 209th frame @8.36 seconds).
Then I detect that marker (markers.getFirstMarker()), and it shows 08:09 and 8.36s (which is correct).
Then I delete that marker and create a new one markers.createMarker(8.36)
.
This new marker in the timeline now shows @08:09, but in the markers-panel in the markers list, it shows 08:08.
In ExtendScript this marker shows 8.35999999999606s in start.seconds/end.seconds. The ticks look like they are losing 1 tick.
I cannot set time objects to this existing marker, i cannot set the ticks and I cannot set the start.seconds/end.seconds:
marker.start.seconds = 8.36
Trying to set start.seconds leads to "Bad argument: start".
Trying to set the ticks does nothing.
I also desperately tried to add the fraction of a frame, which causes the timeline to display the marker between two frames, and I cannot correct the values, no matter what I do.
The activeSequence position of the pointer in the timeline always gives the correct timecode.
I attached some pictures showing the problem.
The fraction deviance only seems to be appearing when creating a marker with ExtendScript. As I said, setting the marker via the menu sets correct times.
p.s.: I had to downgrade to PPro 14.3, because 14.4 crashes all our panels...

-
guntram pollock commented
They said they are not gonna fix this :(
(and that we should calculate with ticks, which feels like a dirty hack, and you still have to handle the wrong precision) -
cli commented
I ran into a similar issue. A small test case:
Use a 59.94 fps clip
Calling the ExtendScript
clip.getMarkers().createMarker(10 * 1001 / 60000) // ExtendScript
clip.getMarkers().createMarker(20 * 1001 / 60000)
clip.getMarkers().createMarker(30 * 1001 / 60000)Results in the markers:
{"end":{"seconds":0.16683333333333,"ticks":"42378336000"},"start":{"seconds":0.16683333333333,"ticks":"42378336000"}}
{"end":{"seconds":0.33366666666667,"ticks":"84756672000"},"start":{"seconds":0.33366666666667,"ticks":"84756672000"}}
{"end":{"seconds":0.50049999999606,"ticks":"127135007999"}, "start":{"seconds":0.50049999999606,"ticks":"127135007999"}}The first two are good. The third is offset by 1 frame or 1 tick.
I’d expect the code as simple as above to just work fine. The Marker API should allow to provide start/end time also in ticks.
Another test Case with the Time API:
var t = new Time(); // ExtendScript
t.seconds = 0.5005; // (30*1001)/60000Once set, seconds will become 0.50049999999606.
0.50049999999606 doesn't seems to be the nearest floating point number for 0.5005 in double or single precision, and seems to be rather the rounded result of the division of 127135007999 by 254016000000.
So the Time API seems to be an error source. But decimal arithmetic in ExtentScript seems to be precise. A test case :
var t = 0.1 + 0.2; // ExtendScript
t.toPrecision(20);gives:
0.30000000000000000000The same code running in Chrome gives:
0.30000000000000004441 -
guntram pollock commented
I can confirm this bug for PPro v14.5 with new world on and off on windows 10.
-
Nicolas from Autokroma commented
"that does not work" :
I didn't test (I'm working with Panel and JSX but not with markers), but I just know that for in/out points for example in the timeline, an exception is raised but it works ! (So for in/out points you just need to call the line under try catch and it does the job).
So when you said that it didn't work, is it because you had an exception or because the marker didn't change its location ?
-
guntram pollock commented
Hey,
thanks for commenting! :)``marker.start`` cannot be modified by setting a time object, that does not work.
``marker.start.ticks`` does not change, no matter what I set it to.I could not find a workaround or a way to correct the marker timecode :(
p.s: lol markdown works in the bug description but not in the comments :D
-
Nicolas from Autokroma commented
Hello,
For me it seems to be a precision issue. You should not set Times with seconds but with Ticks. (I know you said that setting Ticks did nothing, but you should keep trying in this direction).
The "createMarker" functions only takes float in input, so we need another workaround.
Create your marker with the seconds you want (so there will be your error), then get the Marker Object, and set the "marker.start.ticks" attribute of it (it needs to be a string !). If it doesn't work, try to create a "Time" object, then set the ticks, and write marker.start = myNewTimeCreated.
-
Antoine Autokroma.com (Independent Developer of AfterCodecs, BRAW Studio, PlumePack, Influx) commented
8.35999965667724609375 is the closest float to "decimal 8.36".
But I had the exact issue of loosing 1 tick when getting markers in AfterCodecs. And had the same strange behavior I could move the marker 1 pixel ahead without changing the frame it is on
-
Antoine Autokroma.com (Independent Developer of AfterCodecs, BRAW Studio, PlumePack, Influx) commented
I had the exact same problem