AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

Flattening tracks sometimes splits contiguous clips into segments

Open
#1,635 9 comments 0 reactions 0 assignees View on GitHub
bug good first issue help wanted
Dominant language
C++
Stars
2k
Forks
351
Avg merge
1d 12h
Merged PRs (30d)
1

Description

### 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](https://github.com/AcademySoftwareFoundation/OpenTimelineIO/files/11872212/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](https://github.com/AcademySoftwareFoundation/OpenTimelineIO/assets/169599/832d50ac-0dc5-446d-bc49-3e01963477a8)

Here is the result after flattening (note that `Clip #1` has been split in two)
![Screenshot 2023-06-26 at 10 45 38 AM](https://github.com/AcademySoftwareFoundation/OpenTimelineIO/assets/169599/5576d951-fa80-469d-ad7b-f8fda50e4d03)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with otiotool using bug_before_flatten_redacted.otio from flatten_bug_repro.zip and the documented --flatten video command. Trace the flatten operation from that CLI entry point and verify the fix by confirming that Clip #1 remains contiguous rather than being split at adjacent Gaps.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.