AcademySoftwareFoundation / OpenTimelineIO

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

Should there be some sort of validation of transitions? #387

Open apetrynet opened 6 years ago

apetrynet commented 6 years ago

Hi!

I was working on my Hiero plugin today and came across an issue when attempting to read the transitions_test.otio file in the sample_data folder. In this file there is a cross dissolve between two clips that doesn't work in Hiero since there isn't enough media to create that dissolve. To create a cross dissolve there needs to be overlapping media between them. If you look at the file mentioned above in otioview you'll notice that the duration of A and B are both 50 and that B has a start_time of 0 in the source_range. AFAIK the dissolve between them would not be possible. Hiero won't accept it at least. So my question is: Should there be added some validation logic for transitions to make sure they're usable in NLE's etc?

jminor commented 6 years ago

At the low level, OTIO intentionally allows a Clip's source_range to span a larger range than its media's available_range. The same goes for Transitions. In some cases this is just because the available_range of the media is not known, or when different media is swapped in that is too short. Also, in some apps/workflows this is done intentionally as a way for one group to request media to fulfill the desired range.

We should probably include a method to help you find these, since it can be surprising and/or confusing if you're not expecting it. Also, in some adapters, like the RV one, where the target application doesn't support that, then extra blank media needs to be inserted to handle this.

apetrynet commented 6 years ago

Thanks for the clarification. For now in the plugin, I just catch cases where there's not enough media etc. and ignore them. This of course results in some potentially missing transitions, but I don't think it will be a big problem in real life. Should I close this issue or do you want it open as reminder for the future method to describe above?

jminor commented 6 years ago

Let's leave this open as a reminder that we should document this clearly and provide validation API to help people understand this.

apetrynet commented 6 years ago

Ok, thanks!

apetrynet commented 4 years ago

Hey! Ran into this again. The sample file is "impossible" to recreate and reproduce. I'll add a warning for the user.