> ## Documentation Index
> Fetch the complete documentation index at: https://docs.framelane.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Layered Video Composition

> Stack multiple video layers with vintage and bokeh effects, add a picture-in-picture overlay, and sequence text with fade, difference, overlay, and evaporate motion — all in 4K from a single request.

A cinematic edit built entirely from layered elements: two full-frame video tracks carry different looks, a bordered PiP clip drops in mid-timeline, and four text elements each use a different motion preset to land, blend, overlay, and dissolve on cue.

**Features used:** [`vintage` / `camera_lens_blur` effects](/renders/examples/effects), [video positioning & borders](/renders/elements#video), [`fade` / `difference` / `overlay` / `evaporate` motion presets](/renders/examples/motion)

***

```json theme={null}
{
  "width": 3840,
  "height": 2160,
  "elements": [
    {
      "type": "video",
      "id": "vid2",
      "source_url": "https://cdn-assets.framelane.io/shared/videos/clip6.mp4",
      "effects": [
        {
          "type": "vintage",
          "intensity": 100
        }
      ]
    },
    {
      "type": "video",
      "id": "vid1",
      "source_url": "https://cdn-assets.framelane.io/shared/videos/clip5.mp4",
      "volume": 50,
      "effects": [
        {
          "type": "camera_lens_blur",
          "intensity": 100
        }
      ]
    },
    {
      "type": "video",
      "id": "vid3",
      "source_url": "https://cdn-assets.framelane.io/shared/videos/clip1.mp4",
      "time": 30,
      "fade_in_duration": 1,
      "fade_out_duration": 1,
      "x": "85%",
      "y": "85%",
      "width": "20%",
      "height": "20%",
      "border_radius": 0.1,
      "border_width": 1,
      "border_color": "#000000",
      "z_index": 1
    },
    {
      "type": "text",
      "id": "t1",
      "text": "We destroy the world?!",
      "font_family": "Komika Axis",
      "text_color": "#FFFFFF",
      "stroke_color": "#000000",
      "stroke_width": 0.1,
      "font_size": 360,
      "text_align": "left",
      "x": "20%",
      "y": "50%",
      "width": "50%",
      "height": "50%",
      "time": 5,
      "duration": 10,
      "motion": [
        { "type": "fade", "time": 5, "duration": 5 }
      ]
    },
    {
      "type": "text",
      "id": "t2",
      "text": "Albert",
      "font_family": "Alfa Slab One",
      "text_color": "#FFFFFF",
      "font_size": 380,
      "x": "20%",
      "y": "80%",
      "time": 30,
      "duration": 15,
      "motion": [
        {
          "type": "difference",
          "time": 30,
          "duration": 15
        }
      ]
    },
    {
      "type": "text",
      "id": "t3",
      "text": "we thoughtwe might start a chain reaction that would destroy the entire world",
      "font_family": "Alfa Slab One",
      "text_color": "#FFFFFF",
      "font_size": 140,
      "x": "30%",
      "y": "40%",
      "width": "80%",
      "height": "60%",
      "time": 35,
      "duration": 10,
      "motion": [
        {
          "type": "overlay",
          "time": 30,
          "duration": 15
        }
      ]
    },
    {
      "type": "text",
      "id": "t4",
      "text": "I believe we did!",
      "font_family": "Poppins",
      "font_weight": 700,
      "text_color": "#FFFFFF",
      "font_size": 360,
      "duration": 10,
      "x": "50%",
      "y": "50%",
      "time": 50,
      "motion": [
        {
          "type": "evaporate",
          "time": 50,
          "duration": 10
        }
      ]
    }
  ]
}
```

### How the video layers stack

`vid2` and `vid1` are both full-frame clips that play from the start — `vid2` carries a `vintage` effect while `vid1` sits on top at 50% volume with a `camera_lens_blur`. At second 30, `vid3` fades in as a picture-in-picture in the bottom-right corner (`x`/`y`/`width`/`height` as percentages), with rounded corners and a thin black border via `border_radius`, `border_width`, and `border_color`.

### Text motion by beat

| Text                     | `motion.type` | Effect                                              |
| ------------------------ | ------------- | --------------------------------------------------- |
| "We destroy the world?!" | `fade`        | Fades in over 5 seconds starting at second 5        |
| "Albert"                 | `difference`  | Difference-blend mode for the full 15-second window |
| Chain reaction quote     | `overlay`     | Overlay blend layered on the same timeline window   |
| "I believe we did!"      | `evaporate`   | Dissolves away character-by-character at the close  |

Each text element uses `time` and `duration` to control when it appears and how long the motion runs. See the [motion presets](/renders/examples/motion) page for all available types.
