A listing film from walkthrough clips

Turn an agent's walkthrough clips of one home into a branded 16:9 listing film and a 9:16 teaser, planned by Gemini and rendered by one template.

This pipeline turns an agent's walkthrough clips of one property into a listing film for the listing page and a vertical teaser for social feeds. Gemini studies every clip and frame, chooses the best part of each room, orders the tour and labels what is visible, and one template renders a 1920×1080 film and a 1080×1920 teaser from that plan.

The example ran on four walkthrough clips of one house, joined into one upload. See the film and teaser beside the other examples in the pipeline examples.

Listing film, 16:90:30
Teaser, 9:160:13

Northlight Realty is a placeholder brand.

The plan step is an llm step. Editframe enables pipelines, and llm steps, for an organization after you tell us about your footage.

What it produces

  • The listing film (film) and the teaser (teaser), as files in your organization, with playback URLs from publish.
  • The plan step's answer: the joined clips with their usable ranges, rooms, features and problems, a headline, and the shots of the film and the teaser in tour order with room labels and callouts.
  • The cuts between the joined clips and the sampled frames, readable by namespace.

A run processes one input file, and only a step that sees every room can choose and order them, so the clips are joined back to back into one upload before the run. The example's runner does this; in your application, join them before you upload.

The pipeline

This is the example's pipeline.json, step by step. A step starts when the steps in its needs have finished. The long instructions and output.schema of the llm step are shown below it.

probe

Reads the upload's duration, frame size and tracks.

json
{ "probe": { "type": "probe" } }

frames

Takes a frame every half second.

json
{
  "frames": { "type": "sample_frames", "needs": ["probe"], "with": { "every_ms": 500 } }
}

cuts

Finds where each joined clip begins.

json
{ "cuts": { "type": "detect_scenes", "needs": ["probe"] } }

plan

Gemini studies every clip and frame, then plans the film and the teaser: shots in tour order, room labels and callouts of visible features.

json
{
  "plan": {
    "type": "llm",
    "needs": ["probe", "frames", "cuts"],
    "with": {
      "provider": "google",
      "model": "gemini-4-carbon",
      "attach_video": true,
      "max_input_tokens": 200000,
      "max_frames": 64,
      "include": ["probe", "cuts"],
      "instructions": "…",
      "output": { "mode": "json", "schema": "…" }
    }
  }
}
Instructions of plan
text
You are a senior real-estate videographer and listing copywriter at Northlight Realty. The input
video is an agent's walkthrough upload of ONE property: several separate clips joined back to
back in no particular order. Each scene.cut annotation in cuts.annotations marks, at its
start_ms, where a new clip begins; probe gives the duration. Frames are labelled with their
t_ms. Watch the whole video and study every frame before planning.

First fill clips: one entry per source clip, in upload order, with its start_ms and end_ms (from
the cuts), the usable range inside it, the rooms or areas it shows, the features clearly
visible, named as callouts name them (below), and its problems.

Then plan two deliverables, using only what is visible:
1. film: one 16:9 listing film, name "listing-film", format "16:9". It opens on a brand card
   with the headline and closes on a brand card; between them the shots play, joined by
   crossfades.
2. teaser: one 9:16 vertical teaser for social feeds, name "listing-teaser", format "9:16": the
   3 or 4 most striking shots, best first, then a brand card.

Shots, in both deliverables:
- A shot is one continuous range start_ms to end_ms inside one clip. Never let a shot contain a
  cut; keep it at least 200 ms away from every cut and from the start and end of the video.
- Leave out unusable footage: a door frame, wall or object sweeping across the lens; frames
  where the camera is still settling or turning away; blur, exposure jumps, people, or anything
  unflattering.
- Order the film the way a buyer tours a home: the main living spaces first (living room, then
  dining area, then kitchen), then private rooms (bedrooms, then bathrooms), then outdoor
  spaces. Show each room once, as one shot or two consecutive shots, and never return to it.
  Include every distinct room that has usable footage.
- Film shots last 3000 to 7000 ms of source. Use enough usable footage that the film's
  duration_ms (below) is at least 30000; when the usable footage cannot reach that, use all of
  it, but never pad the film with unusable frames. When one clip shows two areas (for example a
  dining area with the kitchen beyond it), you may split it into two consecutive shots, each
  labelled by the area it shows.
- Teaser shots last 2400 to 3400 ms. Choose the moments with the strongest composition and
  smooth motion; they may be tighter ranges within film shots, from different rooms. Open on the
  most striking room: the first teaser shot carries the headline instead of a room label. After
  it, keep the film's room order.
- For each teaser shot give focus_x_start and focus_x_end: the horizontal centre (0 is the left
  edge, 1 the right edge of the 16:9 frame) of the area the vertical window shows at the shot's
  start and at its end. The window shows a third of the frame's width, so centre it on the
  room's key feature (the window wall, the island, the ovens, the bed) and follow that feature
  as the camera moves. Keep the two values within 0.15 of each other unless the feature moves
  further. The window crops away everything further than about 0.17 from its centre, so a teaser
  shot's callout must name a feature inside the window for most of the shot, ideally the one it
  is centred on.

Room labels and callouts appear on screen and must be true:
- room: what a buyer calls the space, in sentence case, such as "Living room", "Dining area",
  "Kitchen", "Bedroom", "Bathroom" or "Home office". Write "Primary bedroom" only when an
  en-suite or the room's scale shows it; when unsure, use the plainer name.
- callouts: one feature in a teaser shot, and in a film shot one, or two when the shot lasts at
  least 4000 ms; each of at most 22 characters, in sentence case without punctuation, and
  clearly visible for most of its shot. Call out only permanent features that convey with the
  property: architecture and layout, windows and natural light, views through windows, ceilings,
  millwork, fireplaces, built-ins, cabinetry, fitted appliances and light fixtures, such as
  "Coffered ceiling", "Double wall ovens", "Kitchen island", "Tall windows", "Crown molding" or
  "Range hood". Name each feature by what it is and its shape, never by what it is made of or
  finished in: video cannot tell hardwood from laminate or vinyl, stone from engineered quartz,
  or stainless steel from other metal, so never name a wood, stone, metal or other material or
  finish ("Range hood", not "Stainless range hood"). Never call out furniture, staging, decor or
  belongings (beds, headboards, sofas, chairs, tables, lamps, rugs, art, plants, linens). Name a
  light fixture by its shape ("Pendant light", not "Chandelier", unless it is one). Never claim
  what footage cannot show: square footage or dimensions, numbers of bedrooms or bathrooms,
  compass direction or sun orientation, views you cannot see, brands, age, renovations, price,
  location, schools or neighbourhood. No superlatives or hype words such as "stunning",
  "luxury", "dream" or "perfect". Two shots of the same room get different callouts.
- headline: 3 to 7 words on the home's visible character, true to the footage, in sentence case
  without a final full stop, such as "Warm, light-filled family home". It makes no claim the
  footage cannot support. Use the same headline in both deliverables.

duration_ms: the film plays a 4500 ms open card, the shots slowed so that each lasts 1.2 times
its source length on screen, and a 5000 ms close card, with 700 ms crossfades between
consecutive parts, so the film's duration_ms = 4500 + 1.2 x (sum of shot lengths) + 5000 - 700 x
(number of shots + 1). The teaser has no open card: its duration_ms = (sum of shot lengths) +
3200 - 500 x (number of shots). Compute both exactly.
Output schema of plan
json
{
  "type": "object",
  "properties": {
    "clips": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "start_ms": { "type": "integer", "minimum": 0 },
          "end_ms": { "type": "integer", "minimum": 0 },
          "usable_start_ms": { "type": "integer", "minimum": 0 },
          "usable_end_ms": { "type": "integer", "minimum": 0 },
          "areas": { "type": "array", "items": { "type": "string" } },
          "visible_features": { "type": "array", "items": { "type": "string" } },
          "problems": { "type": "string" }
        },
        "required": [
          "start_ms",
          "end_ms",
          "usable_start_ms",
          "usable_end_ms",
          "areas",
          "visible_features",
          "problems"
        ]
      }
    },
    "headline": { "type": "string" },
    "film": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string", "enum": ["listing-film"] },
          "format": { "type": "string", "enum": ["16:9"] },
          "headline": { "type": "string" },
          "shots": {
            "type": "array",
            "minItems": 2,
            "maxItems": 14,
            "items": {
              "type": "object",
              "properties": {
                "start_ms": { "type": "integer", "minimum": 0 },
                "end_ms": { "type": "integer", "minimum": 0 },
                "room": { "type": "string" },
                "callouts": { "type": "array", "items": { "type": "string" } }
              },
              "required": ["start_ms", "end_ms", "room", "callouts"]
            }
          },
          "duration_ms": { "type": "integer", "minimum": 10000, "maximum": 120000 }
        },
        "required": ["name", "format", "headline", "shots", "duration_ms"]
      }
    },
    "teaser": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string", "enum": ["listing-teaser"] },
          "format": { "type": "string", "enum": ["9:16"] },
          "headline": { "type": "string" },
          "shots": {
            "type": "array",
            "minItems": 3,
            "maxItems": 5,
            "items": {
              "type": "object",
              "properties": {
                "start_ms": { "type": "integer", "minimum": 0 },
                "end_ms": { "type": "integer", "minimum": 0 },
                "room": { "type": "string" },
                "callouts": { "type": "array", "items": { "type": "string" } },
                "focus_x_start": { "type": "number", "minimum": 0, "maximum": 1 },
                "focus_x_end": { "type": "number", "minimum": 0, "maximum": 1 }
              },
              "required": [
                "start_ms",
                "end_ms",
                "room",
                "callouts",
                "focus_x_start",
                "focus_x_end"
              ]
            }
          },
          "duration_ms": { "type": "integer", "minimum": 6000, "maximum": 30000 }
        },
        "required": ["name", "format", "headline", "shots", "duration_ms"]
      }
    }
  },
  "required": ["clips", "headline", "film", "teaser"]
}

film

Renders the 1920×1080 listing film.

json
{
  "film": {
    "type": "render",
    "needs": ["plan", "cuts"],
    "with": {
      "template_id": "template:listing-film",
      "for_each": "plan.metadata.film",
      "include": ["cuts"],
      "width": 1920,
      "height": 1080
    }
  }
}

teaser

Renders the 1080×1920 teaser.

json
{
  "teaser": {
    "type": "render",
    "needs": ["plan", "cuts"],
    "with": {
      "template_id": "template:listing-film",
      "for_each": "plan.metadata.teaser",
      "include": ["cuts"],
      "width": 1080,
      "height": 1920
    }
  }
}

publish

Returns playback URLs for both videos.

json
{ "publish": { "type": "publish", "needs": ["film", "teaser"] } }

How the template uses the step outputs

The film and teaser steps render the same template, once for each item of plan.metadata.film and plan.metadata.teaser. Each render receives RENDER_DATA with the upload in source, the deliverable's plan in item and the cuts annotations:

js
var data = window.RENDER_DATA || {};
var item = data.item || {};
var source = data.source || {};
var vertical = item.format === "9:16";
var cuts = ((((data.steps || {}).cuts || {}).annotations) || [])
  .filter(function (annotation) {
    return annotation && annotation.kind === "scene.cut";
  })
  .map(function (annotation) {
    return Math.round(annotation.start_ms);
  });

From these the template:

  • plays each planned shot of the upload with an ef-video whose file-id is source.file_id, keeping it inside the joined clip its middle falls in and clear of the cut frames, so no shot shows a jump between clips;
  • slows the film's footage so each shot lasts 1.2 times its source length, and plays the teaser in real time;
  • labels each shot with its room and callouts, leaving out a callout that names a material or finish, which footage cannot verify, and fades between shots;
  • opens on the plan's headline, as a card in the film and over the first shot in the teaser, and ends both on a card that asks viewers to schedule a showing.

The brand kit at the top of the template, "Northlight Realty", is a placeholder for a brokerage's own name and call to action. The template is templates/listing-film.html, and templates/listing-film.schema.json describes the data it receives.

Run it

The example lives in elements/examples/listing-film/ in the Editframe repository: pipeline.json, the template in templates/, sources.json with each clip's download URL, licence and attribution, example.json with the pipeline's name and the clips to join, and rubric.md, the criteria its output is judged by. From the repository root, with an API key of an organization that has pipelines and llm steps enabled, and Docker for FFmpeg:

bash
export EDITFRAME_TOKEN="$EDITFRAME_API_KEY"
node elements/examples/listing-film/start.mjs

start.mjs joins the clips that example.json lists under walkthrough.clips, in that order, with the linuxserver/ffmpeg image, and uploads the walkthrough to the organization, reusing an earlier upload with the same MD5. It runs the pipeline example-listing-film on that file, registering the template the definition names as template:listing-film and replacing the reference with the template's ID, and then hands the group to elements/examples/scripts/run-example.mjs --group. That script waits for the run and saves its results under ~/.cache/editframe/example-runs/listing-film/<group-id>/: summary.json with the definition the run used, and run.json, outputs/<namespace>.json and media/<file>.mp4. --fresh starts a new group, and --upload-only prints the walkthrough's file ID for render-template.mjs. Requests go to EDITFRAME_HOST, https://editframe.com by default.

To change the template without running the pipeline again, render it on a saved run's outputs with node elements/examples/scripts/render-template.mjs listing-film listing-film --data <data.json>.

Licences