Describing this app, I cannot help mentioning the complexity of the challenge and the sagacity of our solution. The app is actually a part of an internal research and might be quite interesting for those who are working on video transitioning issues.
The task was to create a smooth transition between two separate videos using crossfading, wiping, scaling or other transitioning effects. We decided to implement the transitioning in the RGB color model because it is easier to process it and we already had a code base for a wide variety of video transitions in RGB.
Before we started, we decomposed the task into the following steps:
- Determine the area of overlapping.
- Mounting two frames into one.
- Implement a mechanism for mashing the frames.
While working on the first and second steps, we took the Appleās framework for iOS 7 and modernized the basic code to suit our needs.
The 3rd task made us transfer the mashing algorithms to GPU using OpenGL shaders, which significantly reduced the complexity of the algorithm development and adaptation; it also allowed us to apply filters while mashing.
In the end instead of writing a new frame mashing code for each transition, we have created a common logic that runs the respective transition code piece.
To expand your knowledge on the above-mentioned technology, please see our video.