ππ» Background (1 min read)
Most visual effects (VFX) programs, such as Adobe After Effects, define video scenes using compositions that contain layers. Roughly speaking, the process of outputting a video from a composition is called rendering.
- A
Composition
is a simple container for a list of layers and also has the following properties: resolution
, frameRate
and duration
(in frames).
- A
Layer
is a description of a drawable object. Layers can be used to draw various things - like images, videos, vectors, or even just simple solid colors. They also have properties that define how to draw them within the composition - like position
and scale
.
- Since a composition usually contains multiple layers, maintaining correct Z order is important - layers are drawn on top of each other, with the last layer in the composition being topmost in the output.

π» The Task (2 min read)
Youβre to build a simple video rendering engine that supports compositions & layers.
interface RenderingEngine {
string render(Composition composition);
}
- The engine should accept a
Composition
object as input, render it, and output a path to the rendered mp4 video.
- The engine should support positioning and scaling layers (do consider future properties, like rotation, opacity and duration in your design).
- Layers could be image or video files (do consider what happens if we add more layer types in the future)
- Include a demo file that assembles a Composition object with a few layers (hardcoded is fine) and calls the engine to render it. No need for CLIs, cloud deployments or anything of the like - just a program that runs locally.
- You may use external libraries and even binaries, but do give an extra thought to how youβll be able to replace them with other libraries without changing the overall interface or touching existing code.