Add cut_diff example: structural editorial diff between two cuts#2030
Open
chaoz23 wants to merge 1 commit into
Open
Add cut_diff example: structural editorial diff between two cuts#2030chaoz23 wants to merge 1 commit into
chaoz23 wants to merge 1 commit into
Conversation
Matches clips by identity (media url + source in-point) rather than position, then classifies added / removed / retimed / moved / shifted. Works across formats via adapters (e.g. EDL vs FCP XML). Exit codes follow diff(1). Signed-off-by: chaoz23 <chaoz23@gmail.com>
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2030 +/- ##
=======================================
Coverage 84.58% 84.58%
=======================================
Files 181 181
Lines 13306 13306
Branches 1221 1221
=======================================
Hits 11255 11255
Misses 1868 1868
Partials 183 183
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an
examples/cut_diff.pyscript that answers "what changed between cut A and cut B" — which clips were added, removed, retimed, moved, or shifted — in the spirit of existing examples likeconform.pyandshot_detect.py. The OTIO docs list "Shots Added or Removed From The Cut" as a first-class use case; this example implements it.Because both inputs go through adapters, the cuts don't need to share a format — an EDL can be diffed against an FCP XML export of the revision:
Design notes:
target_url+ source in-point), not timeline position — one insertion shifts every downstream timecode, so positional diffing reports everything as changed.--jsonoutput anddiff(1)exit codes for scripting.Validated against sample files from the cmx3600 and fcpx-xml adapter test suites, including hand-modified known-change cases. A packaged version with a test suite and an MCP server lives at chaoz23/otio-diff; this example is self-contained.
🤖 Generated with Claude Code