-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EDL with offset record time breaks trimmed_range_in_parent. #346
Comments
It's looking like the EDL reader is setting the track source time to -01:04:52:15, I assume this is wrong and it should be +01:04:52:15 |
This seems to be the problem, the clip source range is I thinks this code expects the child_range to already be relative to track.source_range, not 0
|
As you note, the clip is getting culled because it is outside the range of the track. The track has a massively negative start time which means all the clips are outside the range of the track. here is a repro script: #!/usr/bin/env python
import opentimelineio as otio
# original from al
"""
TITLE: Ep101_090418_12b.Sub.01
FCM: NON-DROP FRAME
000001 B007_C007_05245V_001 V C 14:48:20:03 14:48:21:21 01:04:52:15 01:04:54:09
*FROM CLIP NAME: 12B-09 (B)
*LOC: 01:04:52:15 RED TB_101_012_040
*ASC_SOP (1.000000 1.000000 1.000000)(0.000000 0.000000 0.000000)(1.000000 1.000000 1.000000)
*ASC_SAT 1.000000
*SOURCE FILE: B007_C007_05245V_001
000002 B007_C007_05245V_001 V C 14:48:41:19 14:48:49:11 01:05:10:12 01:05:18:04
*FROM CLIP NAME: 12B-09 (B)
*LOC: 01:05:10:12 RED TB_101_012_070
*ASC_SOP (1.000000 1.000000 1.000000)(0.000000 0.000000 0.000000)(1.000000 1.000000 1.000000)
*ASC_SAT 1.000000
*SOURCE FILE: B007_C007_05245V_001
"""
# minimal error
EDL_STRING = """TITLE: Ep101_090418_12b.Sub.01
FCM: NON-DROP FRAME
000001 B007_C007_05245V_001 V C 14:48:20:03 14:48:21:21 01:04:52:15 01:04:54:09
*FROM CLIP NAME: 12B-09 (B)
*LOC: 01:04:52:15 RED TB_101_012_040
*SOURCE FILE: B007_C007_05245V_001
000002 B007_C007_05245V_001 V C 14:48:41:19 14:48:49:11 01:05:10:12 01:05:18:04
*FROM CLIP NAME: 12B-09 (B)
*LOC: 01:05:10:12 RED TB_101_012_070
*SOURCE FILE: B007_C007_05245V_001
"""
def main():
edl = otio.adapters.read_from_string(EDL_STRING, "cmx_3600", rate=23.976)
# has a questionable source_range (-something big?)
bad_track = edl.tracks[0]
bad_clip = bad_track[0]
# (-93423, 613)
bad_range = bad_track.range_of_child_at_index(0)
# (0, 42)
clip_range = bad_clip.source_range
# for debugging
import ipdb; ipdb.set_trace()
# causes crash
bad_clip.trimmed_range_in_parent()
# bad_track.trim_child_range(clip_range)
if __name__ == '__main__':
main() I found a bug in The code in the EDL adapter that is setting the track Am investigating further... will get back to you. |
This test also fails (if added to the cmx edl adapter unit tests): def test_children_inside_track(self):
edl_path = SCREENING_EXAMPLE_PATH
timeline = otio.adapters.read_from_file(edl_path)
for cl in timeline.each_clip():
self.assertIsNotNone(cl.trimmed_range_in_parent())
self.assertTrue(timeline.tracks[0].source_range.start_time.value > 0) |
I'm assuming I've not done anything silly...
This EDLl causes this issue,
The text was updated successfully, but these errors were encountered: