cli

My feedback

  1. 9 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    8 comments  ·  Premiere Pro » General  ·  Flag idea as inappropriate…  ·  Admin →

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    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)/60000

    Once 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.30000000000000000000

    The same code running in Chrome gives:
    0.30000000000000004441

    cli supported this idea  · 

Feedback and Knowledge Base