Skip to content

RationalTime Rate has some semantic meaning in some cases #14

@vade

Description

@vade

A conversation with Eric Reinecke in the ASWF slack mentioned the following

ll need to peek at the use case. CMTime -> RationalTime is a bit tricky because there is a bit of an implication that RationalTime.rate is the media frame rate and often is some non-integer value. CMTime is fps-ignorant and takes rates like 24000/1001 and multiplies them up into the numerator.

In all the usual time math, this works fine with OTIO - it’s just an issue when you have to quantize to frame counts (in the to_timecode or to_frames methods).

Both those methods provide rate args to handle this, but, unfortunately, there really isn’t a way to get that context down to the adapter without curating the rate fields on your RationalTime

Aside from all that, I think there is a way for the adapter to handle this more gracefully - like not trying to set the start timecode value on the file element when it doesn’t know how to convert a MediaReference.available_source_range into timecode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions