Skip to content

source_range time uses project framerate instead of the one from the clip #66

@emcodem

Description

@emcodem

working with MCP 2024.12.2.
Steps to reproduce: Create a project with different framerate from source clip, cut the clip, export timeline.
Example: Project Framerate: 29.97, clip Framerate: 25, cut away the first second, then export the sequence and load with this code.


in_adapter = otio.adapters.from_filepath(args.input).name
result_tl = otio.adapters.read_from_file(args.input, in_adapter)

main_clip_list = CutClipList()

for track in result_tl.tracks:
    if track.kind != "Video":
        continue

    for item in track:
        if not isinstance(item, otio.schema.Clip):
            continue
        sr = item.source_range
        sr.start_time.value

sr.start_time.value is wrong because it uses the rate of the project, thus the values we get from start_time.to_seconds() are wrong as well.

Is that a bug, or intention or am i doing something wrong?
I tried the latest master version and the latest release. The behaviour is only changed in the sense that the new version works with the actual timecode instead of zero based tc but the framerate is still from the project so its the same.

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