Skip to main content
Inspiring
April 5, 2018
Answered

Create Marker missing frames by tiny fraction

  • April 5, 2018
  • 1 reply
  • 1255 views

Hi,

I'm trying to move all existing markers in my Sequence by exactly 2 frames to the right.

Each individual frame is incremented by 0.04170833333333 (time in seconds) from previous frame. (my video is 23.976 fps)

So I tried to add 2 Frames worth of value 0.04170833333333. i.e., 0.08341666666666 to each marker; and create new markers and remove old markers.

It worked for most of the frames. Most markers are moved by 2 frames.

BUT some markers have only moved by 1 frame.

They failed to move because of a very tiniest fraction difference.

Can anyone help, how to fix this.

Example:

A marker at 00:33:16:06  (in frames) whose start.seconds value is 1998.24625. I want to advance this marker by 2 frames.

If I add 2 frames worth of time in seconds to 1998.24625, it becomes 1998.32966666666.

When I create a marker, using markers.createMarker (1998.32966666666), method, its only advanced to 00:33:16:07 (in frames) instead of 00:33:16:08 (in frames)

So I have added a new frame manually at 00:33:16:08 and checked its time in seconds which came to 1998.32966666667.

This means a new frame move is missed by 0.0000000001 difference.

This topic has been closed for replies.
Correct answer e_d_

Just to double check: With the change proposed by Trevor_Asq, you're now getting the desired result; but when you close and re-open the sequence, (project is kept open and not saved) the marker's positions are back to their old values?

What changes if

a) you save the project before closing the sequence?

b) you close the sequence, save the project, and re-open the sequence?

c) you close the project (keep sequence open) -- are you being prompted to save changes? What happens when you re-open the project?

1 reply

Legend
April 6, 2018

I think your maths might be wrong, my iphone calculator gives 1/23.976 as 0.041708375041708.

Inspiring
April 6, 2018

Seems working. Thanks Trevor_Asq.

However the changes made by script execution are not saving.

I mean the markers are moving. But when I reopen the Sequence, the changes are gone.

Why are the changes not committing ? Is there any script statement that need to be added to save?

e_d_Correct answer
Inspiring
April 16, 2018

Just to double check: With the change proposed by Trevor_Asq, you're now getting the desired result; but when you close and re-open the sequence, (project is kept open and not saved) the marker's positions are back to their old values?

What changes if

a) you save the project before closing the sequence?

b) you close the sequence, save the project, and re-open the sequence?

c) you close the project (keep sequence open) -- are you being prompted to save changes? What happens when you re-open the project?