Skip to content

Float property inaccurate? #36

@mvanherk

Description

@mvanherk

I could be wrong but I think the float property is not returning the correct value:

return float(self.frames) / float(self._int_framerate)

I'm working with 23.976 timecode and this property seems to be giving me incorrect results, I had to change it to:
return float(self.frame_number) / (float(24000) / 1001)

So frame_number instead of frames to use the 0-based number rather than 1-based. 24000/1001 is not really necessary in most cases, but at large timecode values you may lose some time when dividing by 23.976

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions