AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.46k stars 288 forks source link

Flattening tracks sometimes splits contiguous clips into segments #1635

Open jminor opened 1 year ago

jminor commented 1 year ago

Incorrect Functionality

If a track has adjacent Gaps, then items below the boundary between those Gaps are sliced in an unexpected way.

To Reproduce

Using this test file "bug_before_flatten_redacted.otio"... flatten_bug_repro.zip

Run this command:

% otiotool -i bug_before_flatten_redacted.otio --flatten video -o out.otio

Expected Behavior

Clips below adjacent Gaps should not be segmented by the flatten operation. In the provided example, Clip #1 should be left as-is.

Screenshots

Here is a screenshot before flattening (note the highlighted Gap on the top track) Screenshot 2023-06-26 at 10 45 25 AM

Here is the result after flattening (note that Clip #1 has been split in two) Screenshot 2023-06-26 at 10 45 38 AM

douglascomet commented 1 year ago

Seems related to the behavior outlines in https://github.com/AcademySoftwareFoundation/OpenTimelineIO/issues/1430

praerie commented 1 month ago

hi, I'd like to work on this for DevDays!

jminor commented 1 month ago

That would be great @praerie - let us know if you want any guidance.

markreidvfx commented 1 month ago

Hi @praerie, someone on my team has been looking into this issue (and was kinda hoping to work on it for dev days too) but since you claimed it first, happy to share our findings.

Our initial thought is to combine the time ranges of contiguous non-visibile items before the recursively trimming occurs.

praerie commented 1 month ago

thank you, @markreidvfx! I would be happy to collaborate if your teammate still wants to work on this.

rameshbabuvfxtd commented 1 month ago

Hi @praerie, I'm the one looking into this issue. I have an idea for this issue happy to collaborate with you. Thanks for accepting for collaboration.

talk2mybot commented 1 month ago

Hi all, I'm also interested into collaborating on dev days with you on this project, if thats o'right

jminor commented 2 days ago

Hi, I'm just wondering, was anyone was able to make progress on this issue?