AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

CMX 3600 does not handle correctly transitions

Open
#1,328 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
2k
Forks
351
Avg merge
1d 12h
Merged PRs (30d)
1

Description

## Bug Report

### Incorrect Functionality and General Questions

CMX 3600 reads everything in an EDL as Clips and then perform a conversion to `Transitions` when needed. However, instead of keeping the Clip before the transition (in the EDL), it removes it from the `Timeline` and keeps the `Clip` for the EDL transition, loosing meta data and possibly media for `Clip` at the end of the transition (in the timeline).

## To Reproduce
Load the following EDL:

```
TITLE: OTIO_TEST
FCM: NON-DROP FRAME

001 ABC0100 V C 01:00:00:00 01:00:01:00 01:00:00:00 01:00:01:00
* FROM CLIP NAME: shot_001_v001
* COMMENT: shot_001

002 ABC0200 V C 01:00:01:00 01:00:01:00 01:00:01:00 01:00:01:00
* COMMENT: shot_002

002 ABC0200 V D 024 01:00:01:00 01:00:02:00 01:00:01:00 01:00:02:00
* FROM CLIP NAME: shot_001_v001
* TO CLIP NAME: shot_002_v001

003 ABC0300 V C 00:00:05:00 00:00:15:00 01:00:02:00 01:00:12:00
* FROM CLIP NAME: shot_003_v001
* COMMENT: shot_003
```
_note: The last entry is needed because of another problem with the cmx 3600 adapter when the last entry is a transition._

`edl_timeline = otio.adapters.read_from_string(edl_text, adapter_name="cmx_3600")`

Check the result by looping over children:
```
for child in edl_timeline.tracks[0]:
logger.info("Child %s" % child)
```

This gives:

```
Clip("shot_001_v001", MissingReference('', None, {}), TimeRange(RationalTime(86400, 24), RationalTime(36, 24)), {'cmx_3600': {'comments': ['COMMENT: shot_001'], 'reel': 'ABC0100'}})
Transition("shot_002_v001", "SMPTE_Dissolve", RationalTime(12, 24), RationalTime(12, 24), {'cmx_3600': {'reel': 'ABC0200', 'transition': 'D', 'transition_duration': 24.0}})
Clip("shot_002_v001", MissingReference('', None, {}), TimeRange(RationalTime(86436, 24), RationalTime(12, 24)), {'cmx_3600': {'reel': 'ABC0200', 'transition': 'D', 'transition_duration': 24.0}})
Clip("shot_003_v001", MissingReference('', None, {}), TimeRange(RationalTime(120, 24), RationalTime(240, 24)), {'cmx_3600': {'comments': ['COMMENT: shot_003'], 'reel': 'ABC0300'}})
```

The `Clip` after the `Transition` has wrong meta data, since it is the `Clip` which was created when reading the EDL, before treating transitions. The same would apply for media reference if there was some.

## Expected Behavior

The `Transition` should be inserted between the `Clips` contributing to the transition, and those `Clips` should be kept, with just their time range adjusted.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with adapters.read_from_string using adapter_name="cmx_3600" and the EDL shown. Inspect the CMX 3600 transition handling and verify that the transition is inserted between the original clips, whose metadata or media references remain intact and whose time ranges are adjusted.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.