Skip to content

Fix fabricated source duration in OTIO exports - #580

Open
nikhiljangid120 wants to merge 1 commit into
Breakthrough:mainfrom
nikhiljangid120:fix/otio-unknown-media-duration
Open

nikhiljangid120 wants to merge 1 commit into
Breakthrough:mainfrom
nikhiljangid120:fix/otio-unknown-media-duration

Conversation

@nikhiljangid120

Copy link
Copy Markdown

Summary

Stop declaring every source media file as exactly 1,980 frames long in OTIO exports.

write_scene_list_otio receives selected scene ranges, but not the source's full duration. The current ExternalReference.1.available_range always starts at zero and lasts 1,980 frames regardless of the source. This can declare exported clips (for example, frames 2,400–4,800) outside the media's available range.

Represent the unknown media available range as null, which OpenTimelineIO supports. Leave each clip's source_range, frame rate, media target, and track layout unchanged. A scene subset's final frame should not be substituted for the full source duration.

Regression coverage

  • Add 16 parameterized cases covering CFR/NTSC frame rates, audio enabled/disabled, empty scenes, short scenes, scenes beyond frame 1,980, and disjoint scene subsets.
  • Check the unknown available range and unchanged source start/duration for every clip on each track.
  • Update the six media references in existing CLI OTIO golden expectations.
  • Add a changelog entry.

Validation

  • New regression cases against unchanged production code: 12 failed, 4 passed; after the fix: 16 passed.
  • Output-writer test selection: 58 passed; both CLI OTIO snapshot tests pass.
  • Native OpenTimelineIO 0.18.1 deserialization and trimmed_range() checks pass for all 16 combinations without changing clip timing.
  • Repository-wide ruff check ., ruff format --check ., and git diff --check pass.
  • A complete suite attempt exceeded this sandbox's 4 GiB memory limit in test_fan_out_n1_matches_single_consumer, which retains both full decoded videos. With test_fan_out_n1_matches_single_consumer and test_fan_out_frame_equality_across_consumers excluded, the broader suite completes: 477 passed, 3 skipped, 85 deselected (83 default release-test deselections plus these 2 exclusions), Python 3.12.15. No claim of a fully passing complete suite.
  • Actual editor GUI import and other operating systems were not tested.

Prepared and tested with AI assistance. No claim of independent human line-by-line review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant