AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

Transition duration incorrect in CMX 3600

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

Description

Hey, guys,

The [cmx_3600.py](https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/master/src/py-opentimelineio/opentimelineio/adapters/cmx_3600.py) adapter appears to use a duration for Transitions that doesn't conform to the CMX 3600 spec.

According to [this spec](https://xmil.biz/EDL-X/CMX3600.pdf) (Page 30), the duration is stored in a "RATE" field.

[This guide](http://www.edlmax.com/EdlMaxHelp/Edl/maxguide.html) makes it a little easier to read:
```
75 frame dissolve from reel 123 to reel 123B on video and A1:

Edit # Reel Name Channel Trans Dur Source IN Source OUT Record IN Record OUT
105 123 B C 03:05:57:17 03:05:57:17 01:00:21:20 01:00:21:20
105 123B B D 075 03:15:33:09 03:15:35:24 01:00:21:20 01:00:24:05
```

However, the `cmx_3600.py` adapter appears to use the length of the previous clip:
https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/84c8245c070b12d7e627c145435a5db9add0d2de/src/py-opentimelineio/opentimelineio/adapters/cmx_3600.py#L668

Test EDL:
[cmx_3600_transition.edl.zip](https://github.com/PixarAnimationStudios/OpenTimelineIO/files/6039542/cmx_3600_transition.edl.zip)

Recreation Steps:
```
In [13]: cat cmx_3600_transition.edl
TITLE: 0800_Cut_v3_ToLayout_021121_EDL
FCM: NON-DROP FRAME
001 ABC0100. V C 01:00:12:15 01:00:17:01 01:00:48:20 01:00:53:06
002 ABC0200. V C 01:00:11:07 01:00:14:09 01:00:53:06 01:00:56:08
003 ABC0200. V C 01:00:14:09 01:00:14:09 01:00:56:08 01:00:56:08
003 ABC0300. V D 026 01:00:10:08 01:00:13:09 01:00:56:08 01:00:59:09
* BLEND, DISSOLVE
004 ABC0400. V C 01:00:11:09 01:00:17:20 01:00:59:09 01:01:05:20

In [14]: import opentimelineio as otio

In [15]: timeline = otio.adapters.read_from_file("cmx_3600_transition.edl")

In [16]: timeline.tracks[0][2].duration()
Out[16]: otio.opentime.RationalTime(value=73, rate=24)
```

Contributor guide

Open the contributing guide

Research direction

Start in src/py-opentimelineio/opentimelineio/adapters/cmx_3600.py around the transition-duration logic at line 668. Read the CMX 3600 specification's RATE field and run the attached cmx_3600_transition.edl reproduction through opentimelineio.adapters.read_from_file. Done means the parsed transition duration follows the specified RATE value rather than the previous clip's length.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.