ruanjx / VideoLab

High-performance and flexible video editing and effects framework, based on AVFoundation and Metal.
MIT License
845 stars 176 forks source link

Adding better support for Transitions #18

Open joeypatino opened 2 years ago

joeypatino commented 2 years ago

This is a general callout for input / advice / support on adding better Transitions to the Framework.

I've reviewed the demo project and see the limited options for Transitions available. I would like to expand on this and implement full support for Transitions but am having trouble finding the best approach for this. A lack of technical documentation also makes this more challenging.

My initial thought was to add a TransitionLayer which would hold any RenderLayers which you'd like the Transition applied on. But this felt too restrictive. Ex: What if you want different Transitions for each cut within your composition? I think this is a deadend idea but happy to hear other ways it might work at this level.

My next idea / approach was to add the Transition as a property directly to RenderLayer. The Transition should be applied / rendered when the current RenderLayer's content finishes playback. This felt like the best approach but curious if I'm overlooking any downsides.

The biggest issue is that even adding these classes, I haven't been able to figure out how to correctly apply the Filter effects to the composition. The LayerCompositor class seemed like the obvious place but, again without any technical docs, it's all remaining a bit cryptic for me at the moment.

I would love if I could get some input from @ruanjx here or anyone else who's used this extensively.