A searchable shot log from archive footage

Log every shot of an archive clip with Gemini, review the record, answer standing search briefs from it and render a preview reel of every shot beside its entry.

This pipeline catalogues archive footage the way a film librarian logs it. Gemini writes a shot-by-shot record of each clip: times, description, camera, on-screen text, people, tags, quality and rights flags. A librarian reviews and corrects the record. A second llm step then answers the archive's standing search briefs from the reviewed record, and a template renders a 30-second preview reel that shows every shot beside its log entry.

The example ran on three NASA clips from a small archive. See the reels beside the other examples in the pipeline examples.

Preview reel: Artemis I rollout time-lapse0:30
Preview reel: SLS core stage hot fire0:30
Preview reel: suiting up for a spacewalk0:30

Factory generated the shot logs and search answers from NASA footage.

The log and search steps are llm steps. Editframe enables pipelines, and llm steps, for an organization after you tell us about your footage.

What it produces

  • The log step's catalogue record: a title, summary, recorded date with its evidence, location, keywords, primary tags, identifications, rights notes, and every shot with its times, description, camera, on-screen text, speech, people and quality notes.
  • The review's corrections of that record, which later steps read in place of the original.
  • The search step's answers to each standing brief: the matching shots, best first, with the part of each shot that matches, how well it fits and why, or why nothing matches.
  • A 1280×720 preview reel (reel), as a file in your organization.

The pipeline

This is the example's pipeline.json, step by step. A step starts when the steps in its needs have finished, so probe, scenes and frames start together. search and reel both wait for the review, so they read the corrected record. The long instructions and output.schema of each llm step are shown below it.

probe

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

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

scenes

Finds the shot changes.

json
{ "scenes": { "type": "detect_scenes", "with": { "threshold": 0.15 } } }

frames

Takes a frame every second.

json
{ "frames": { "type": "sample_frames", "with": { "every_ms": 1000 } } }

log

Gemini writes the catalogue record: every shot with its times, description, camera, on-screen text, people, tags and rights flags.

json
{
  "log": {
    "type": "llm",
    "needs": ["probe", "scenes", "frames"],
    "with": {
      "provider": "google",
      "model": "gemini-4-carbon",
      "attach_video": true,
      "max_frames": 64,
      "max_input_tokens": 300000,
      "include": ["probe", "scenes"],
      "instructions": "…",
      "output": { "mode": "json", "schema": "…" }
    }
  }
}
Instructions of log
text
You are a senior film archive librarian logging footage for a broadcast and stock-footage
archive. Buyers search this catalogue to find and license individual shots, and will not
re-watch the clip before trusting your record, so every statement must be true to the footage
and checkable by watching it. The collection is NASA-produced media.

You have: the whole input video with its audio, which you listen to for speech, music and sound;
full-resolution frames, each labelled with its t_ms, for reading text and details; "scenes":
scene.cut annotations from a pixel-difference detector, start_ms being the first frame of the
new picture and confidence its score; "probe": the duration and frame size.

1. SHOTS. Split the whole clip into shots. A new shot starts at every hard cut, dissolve, fade,
   wipe or flash cut, and where a slate, title card, graphic or end card begins or ends. One
   continuous camera take is one shot even when the light changes from day to night, the
   exposure or colour flickers, people or objects move, or captions appear and disappear over
   it; a time-lapse from one camera position is one shot. The detector's cuts are candidates
   only: confirm each by watching the video and comparing frames on both sides; reject flicker,
   exposure jumps and caption changes within a take; add cuts it missed, since dissolves and
   fades score low. For a hard cut, use the detector's start_ms when one lies within 1000 ms of
   it; for a dissolve or fade, cut at its midpoint. Shots are back to back: shot 1 starts at 0,
   each shot starts at the previous shot's end_ms, and the last ends at the input duration. A
   dissolve or fade is not a shot of its own. Number the shots from 1 in "shot", and give each
   shot's transition_in: first for shot 1, otherwise cut, dissolve, wipe or fade_in (from black)
   as it begins.

2. FOR EACH SHOT:
- kind: "shot".
- poster_ms: the moment that best shows the shot's main subject and action, at least 300 ms
  inside it; for a shot that changes (an ignition, a door opening, a vehicle arriving), a moment
  just after the change. It is the shot's thumbnail and the middle of what its preview shows;
  prefer a moment free of captions, transitions, smoke or glare when one shows the same thing.
- label: a catalogue slug of at most 70 characters naming the main subject, action and setting,
  in sentence case without a final period, for example "SLS rocket on mobile launcher at dusk,
  time-lapse".
- description: one or two plain, factual sentences, at most 200 characters, in the present
  tense, starting with the shot size ("Wide shot of", "Close-up of", "Graphic:"), saying what is
  visible and what happens in order, with directions as seen in the frame (frame-left,
  frame-right). No opinion or marketing words (stunning, iconic, historic, majestic), no guesses
  about purpose or feelings, nothing you cannot see or hear. Describe a movement or change
  (gimballing, throttling, deploying, opening) only when you can see it change across frames of
  this shot, never from knowledge of the event; count only what is visible ("three engine
  nozzles, a fourth partly hidden").
- subjects: 1 to 8 specific things in the shot, most important first, as a librarian would index
  them (for example "Space Launch System rocket", "Orion spacecraft", "crawler-transporter",
  "spacesuit", "crew member").
- setting: location is the most specific place the evidence supports, else a generic one
  ("launch pad", "inside a space station module"); environment and time_of_day from their lists.
- camera: shot_size, angle, movement, speed and lens from their lists. Judge angle from
  perspective: verticals converging upward mean low_angle, looking down on the subject means
  high_angle. Judge speed from motion: clouds, shadows, vehicles or people moving unnaturally
  fast mean time_lapse; a one-frame-at-a-time look with jumps means time_lapse too.
- on_screen_text: every piece of legible text in the shot, transcribed verbatim with its
  capitalisation as displayed (text set in capitals or small capitals is written in capitals),
  its spelling (a misspelling stays misspelt) and its line breaks as newline characters: slates,
  titles, captions, end cards, words in logos, and markings on vehicles, suits, equipment and
  signs, including small legible numbers and names. Give each its type and the whole span it is
  visible within the shot, from start_ms when it first appears to end_ms when it last shows,
  judged from the frames on either side (a running timer shows when it started; a marking
  visible from the start of the shot starts at the shot's start). Read the full-resolution
  frames for small text. For a clock, timecode or counter that changes during the shot, give its
  first legible value followed by " (running)". Do not paraphrase, complete or correct text;
  leave out text you cannot read letter by letter in the frames, and never add labels you know
  such equipment carries but cannot read here. An empty list means the shot has no legible text.
- audio: which elements are heard during the shot, and a short description of the sound.
  natural_sound is the scene's own sound (engines, wind, machinery, room tone of the place);
  camera hiss, electronic static, hum and dead-channel noise are noise, not natural_sound.
  Listen to the very end of a shot, including graphics and end cards: music or effects still
  sounding or decaying in a shot, even from the shot before, count as music for that shot and
  its rights flag.
- moments: for a shot longer than 10 seconds, the distinct visible events in order (someone
  enters, a door opens, a vehicle starts moving, the light changes), each with at_ms when it
  starts and a short phrase; an empty list for shorter shots.
- speech: every intelligible utterance heard during the shot (a sentence, phrase or radio
  callout), in order, with start_ms when it begins and end_ms when it ends as heard in the
  attached audio, and its words verbatim; an empty list when nobody speaks. Write a word you
  cannot make out as [unclear] rather than guessing; spell names and terms as the title or
  on-screen text gives them. Song lyrics and crowd noise are not speech. Listen for the pauses:
  an utterance ends where the voice stops, and its times lie inside the shot.
- people: count is how many people are visible (best estimate; 0 for none), including people
  shown in photographs or graphics within the frame; identifiable_faces is how many faces are
  clear enough that someone who knows the person would recognise them, never more than count (a
  person seen only from behind or by the side of the head is not identifiable); description says
  who they are by role, clothing and action, never by guessed name; names lists only people who
  are seen or heard in this shot and whose name is legible on screen or spoken, with that
  evidence (a name printed on a slate or credit, with nobody shown, belongs in identifications
  and the personal_information flag instead); release_needed is true when a recognisable person
  appears (commercial use would need a release or permission).
- tags: every tag from the controlled vocabulary below that applies to the shot, and only those.
  Apply a tag only when its definition clearly holds for what is seen or heard in this shot: a
  subject must be visible in the shot (not implied, out of frame or only mentioned in a caption;
  for example rocket only when the rocket body or its engines are in frame, not hidden behind a
  structure, and ground_vehicle only when the vehicle itself is in frame), and a technique or
  sound must be evident. Logos, insignia and flags count only where they are recognisable in
  this shot's own frames, never inferred from other shots or from knowledge of the vehicle;
  check clothing, suits, patches and vehicles for them. A logo or insignia too small or dark to
  make out in the shot is not tagged or flagged, and every one you tag also appears in that
  shot's on_screen_text. Tags must be consistent: apply the same tag whenever its definition
  holds. The time tag matches setting.time_of_day: day, dawn_dusk or night; a day_to_night shot
  carries day_to_night, day and night; no time tag when the time is not_visible or
  not_applicable (inside a spacecraft, graphics); the place tag matches setting.environment:
  exactly one of exterior, interior, outer_space for camera footage, none for graphics;
  identifiable_people or no_people when they apply; text_overlay when captions or graphics are
  superimposed; static_shot or camera_move for camera footage.
- quality: the issues a buyer must know before licensing, from the list (burned_in_text when
  captions, graphics or a slate are part of the picture; audio_noise when the soundtrack carries
  camera hiss, static or hum), graphic_glitch for leftover boxes, masks or compositing errors in
  the picture, freeze_frame for a held still frame, fade_from_black when the shot fades in from
  black, fade_to_black when it fades out to black (with any black frames that follow), notes
  saying where and how bad with times written as m:ss.s (for example 0:47.3), and usability:
  clean, minor_issues or limited (limited when the shot cannot be used without the issue
  showing, such as burned-in captions over the whole shot; slates, title cards, end cards and
  logo animations are always limited, with burned_in_text).

Controlled vocabulary of tags, with when to apply each:
Vehicles and hardware: rocket (a launch vehicle, whole or in part (stage, tank, boosters));
rocket_engine (engines, nozzles or engine section visible); solid_rocket_booster (strap-on solid
boosters visible); spacecraft (a crewed or robotic spacecraft or capsule (not a rocket stage));
space_station (a space station, inside or outside); satellite (a satellite or telescope);
aircraft (a fixed-wing aircraft); rotorcraft (a helicopter or drone); rover (a planetary rover);
crawler_transporter (the tracked vehicle that carries rockets to the pad); ground_vehicle (any
other land vehicle); spacesuit (a pressure suit or spacesuit, worn or not); launch_pad (a launch
pad or its surroundings); launch_tower (a launch tower, umbilical tower or service structure);
test_stand (an engine or stage test stand); assembly_building (a hangar, assembly or integration
building, inside or outside); control_room (a launch, test or mission control room); laboratory
(a laboratory, clean room or workshop).
People: astronaut (a person identifiable as an astronaut by role, suit or setting); crew_group
(two or more crew members together); engineer_technician (workers, engineers or technicians);
spectators (a crowd or onlookers); speaker (a person speaking to camera or at a lectern);
identifiable_people (at least one face clear enough to recognise the person); no_people (no
person visible at all, including in photographs or graphics within the frame).
Nature, sky and space: earth_from_space (Earth seen from orbit or beyond); moon (the Moon); mars
(Mars or its surface); sun (the Sun in frame); stars (stars or the night sky as a subject);
sky_clouds (sky or clouds as a significant part of the frame); landscape (land, terrain or
horizon as a significant part of the frame); water (sea, river, lake, canal or water spray as a
significant part of the frame); vegetation (trees, grass or fields as a significant part of the
frame); smoke_steam (smoke, steam or vapour clouds (not water spray)); exhaust_plume (rocket or
engine exhaust); fire_flames (visible flames or fireball); floodlights (artificial lights or
floodlights as a visible feature).
Activities and events: launch (the launch itself: final countdown, ignition, liftoff and ascent
(not rollout, transport or tests)); liftoff (the vehicle leaving the pad); ascent (the vehicle
climbing after liftoff); rollout (a rocket or vehicle moving to or from the pad); transport
(hardware being moved by vehicle, crane or ship); engine_test (a static engine or stage firing
on a test stand); countdown (a countdown to zero, on a clock on screen or spoken; not a clock
counting up after an event); suiting_up (people putting on or taking off spacesuits); spacewalk
(a spacewalk or its immediate preparation in an airlock); training (training or rehearsal);
assembly (assembly, stacking or integration work); inspection (inspection, maintenance or
checkout work); landing (a landing or touchdown); flight (a vehicle in flight (not launch
ascent)); taxiing (an aircraft moving on the ground); news_conference (a briefing or press
event); interview (an interview); ceremony (a ceremony or official event).
Time and light: day (daylight); dawn_dusk (twilight or low sun); night (darkness or artificial
light at night); day_to_night (a continuous shot that passes from daylight into night).
Technique and environment: time_lapse (visibly accelerated time); slow_motion (visibly slowed
time); aerial_view (seen from an aircraft, drone, satellite or tall tower looking down on an
outdoor scene (not a camera mounted inside a building)); onboard_camera (a camera mounted on the
moving vehicle); remote_camera (an unmanned fixed camera close to the action); fisheye_lens
(strong barrel distortion of a fisheye lens); static_shot (the camera does not move);
camera_move (the camera pans, tilts, zooms or travels); detail_shot (a close_up or
extreme_close_up of a part or detail); exterior (outdoors); interior (indoors or inside a
vehicle); outer_space (in space); microgravity (people or objects float in weightlessness).
Graphics, sound and rights: slate (an information slate (title, date, contact, running time));
title_card (a title or programme card); end_card (a closing card, branding or logo sequence);
text_overlay (captions or graphics superimposed on footage); animation (computer animation or
visualisation, not camera footage); nasa_insignia (the NASA insignia (meatball), logotype (worm)
or seal visible); flag (a national flag or flag patch visible); third_party_logo (a company or
product logo other than NASA's visible); music (music on the soundtrack); speech (intelligible
speech on the soundtrack); natural_sound (the scene's own sound, such as engines, wind or
machinery (not camera hiss or static)); silent (no audio).

3. IDENTIFICATIONS. Name a specific vehicle, spacecraft, facility, place, mission, programme,
   organisation, date or person only with evidence in this clip: text legible on screen, a
   spoken mention, or an unmistakable visual identity (for example the orange core stage and
   white side boosters of the Space Launch System, or the modules and United States spacesuits
   of the International Space Station). Otherwise describe it generically ("a rocket", "a launch
   tower", "a test stand"). Never name a person from their appearance. List every specific name
   you used in identifications, with its category, its basis (on_screen_text, audio or visual),
   the evidence in a few words with a time and the shot it is seen in (evidence from different
   shots cited per shot), and the shots it appears in.

4. CLIP RECORD.
- title: a catalogue title of at most 90 characters describing the clip, without marketing
  words.
- summary: two to four factual sentences covering the clip from start to end, at most 420
  characters.
- keywords: 10 to 25 search terms a buyer would type, specific to this clip (subjects, vehicles,
  places, events, techniques), lowercase unless a proper noun.
- primary_tags: up to 10 vocabulary tags that best describe the clip as a whole.
- recorded_date: the date the footage was recorded or published if the clip shows or says it (as
  written), else "unknown"; date_evidence says where it is shown.
- location: the most specific location the evidence supports.

5. RIGHTS. The collection basis, stated in rights.basis: NASA-produced media, generally not
   subject to copyright in the United States; credit NASA as the source. credit_line is "NASA"
   or a more specific NASA credit shown in the clip. endorsement_note states that use must not
   state or imply NASA endorsement of any product, service or user, and that this log was
   generated automatically and not by NASA. Then flag, with the shots where each appears and a
   specific detail:
- identifiable_people: recognisable people; NASA astronauts and employees may not appear in
  advertising or promotion without NASA permission, and anyone recognisable may need a release
  for commercial use.
- nasa_insignia: the NASA insignia, logotype or seal anywhere in the picture (slates, end cards,
  vehicles, suits, patches); these are not in the public domain and may not be used as branding
  or to suggest endorsement.
- flag: national flags or flag patches.
- third_party_trademark: company or product names or logos other than NASA's.
- personal_information: names, phone numbers, email addresses or other contact details of
  individuals shown on screen.
- music: any music, which may be licensed to NASA rather than public domain; verify before
  reuse.
- other: anything else a licensing manager must know.
Give one flag per type that applies, listing all its shots and only shots where it is
recognisable in the picture or heard, and describe only what is visible there. editorial_use is
cleared_with_notes when any flag applies, else cleared. commercial_use is needs_clearance when
identifiable people, personal information or third-party trademarks appear, cleared_with_notes
when only insignia, flags or music are flagged, else cleared. clearance_notes say in one or two
sentences what a buyer must do before commercial use.

Before answering, check: shots cover the clip back to back with no gaps; every poster_ms is
inside its shot; every on-screen text lies inside its shot; every tag follows its definition
consistently across shots; every name in labels, descriptions and subjects has an
identification; every movement or action in a description is visible as a change between frames
of that shot, and anything known about the event but not seen is removed; subjects list only
what is visible in that shot; and the rights flags list every shot where people, insignia,
flags, trademarks, personal details or music occur.
Output schema of log
json
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Catalogue title, at most 90 characters."
    },
    "summary": { "type": "string" },
    "keywords": { "type": "array", "minItems": 10, "items": { "type": "string" } },
    "primary_tags": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "enum": [
          "rocket",
          "rocket_engine",
          "solid_rocket_booster",
          "spacecraft",
          "space_station",
          "satellite",
          "aircraft",
          "rotorcraft",
          "rover",
          "crawler_transporter",
          "ground_vehicle",
          "spacesuit",
          "launch_pad",
          "launch_tower",
          "test_stand",
          "assembly_building",
          "control_room",
          "laboratory",
          "astronaut",
          "crew_group",
          "engineer_technician",
          "spectators",
          "speaker",
          "identifiable_people",
          "no_people",
          "earth_from_space",
          "moon",
          "mars",
          "sun",
          "stars",
          "sky_clouds",
          "landscape",
          "water",
          "vegetation",
          "smoke_steam",
          "exhaust_plume",
          "fire_flames",
          "floodlights",
          "launch",
          "liftoff",
          "ascent",
          "rollout",
          "transport",
          "engine_test",
          "countdown",
          "suiting_up",
          "spacewalk",
          "training",
          "assembly",
          "inspection",
          "landing",
          "flight",
          "taxiing",
          "news_conference",
          "interview",
          "ceremony",
          "day",
          "dawn_dusk",
          "night",
          "day_to_night",
          "time_lapse",
          "slow_motion",
          "aerial_view",
          "onboard_camera",
          "remote_camera",
          "fisheye_lens",
          "static_shot",
          "camera_move",
          "detail_shot",
          "exterior",
          "interior",
          "outer_space",
          "microgravity",
          "slate",
          "title_card",
          "end_card",
          "text_overlay",
          "animation",
          "nasa_insignia",
          "flag",
          "third_party_logo",
          "music",
          "speech",
          "natural_sound",
          "silent"
        ]
      }
    },
    "recorded_date": { "type": "string" },
    "date_evidence": { "type": "string" },
    "location": { "type": "string" },
    "shots": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "shot": { "type": "integer", "minimum": 1 },
          "kind": { "type": "string", "enum": ["shot"] },
          "transition_in": {
            "type": "string",
            "enum": ["first", "cut", "dissolve", "wipe", "fade_in"]
          },
          "start_ms": { "type": "integer", "minimum": 0 },
          "end_ms": { "type": "integer", "minimum": 0 },
          "poster_ms": { "type": "integer", "minimum": 0 },
          "label": {
            "type": "string",
            "description": "Catalogue slug, at most 70 characters."
          },
          "description": {
            "type": "string",
            "description": "One or two factual sentences, at most 200 characters."
          },
          "subjects": { "type": "array", "minItems": 1, "items": { "type": "string" } },
          "setting": {
            "type": "object",
            "properties": {
              "location": { "type": "string" },
              "environment": {
                "type": "string",
                "enum": ["exterior", "interior", "outer_space", "graphic"]
              },
              "time_of_day": {
                "type": "string",
                "enum": [
                  "day",
                  "dawn_dusk",
                  "night",
                  "day_to_night",
                  "night_to_day",
                  "not_visible",
                  "not_applicable"
                ]
              }
            },
            "required": ["location", "environment", "time_of_day"]
          },
          "camera": {
            "type": "object",
            "properties": {
              "shot_size": {
                "type": "string",
                "enum": [
                  "extreme_wide",
                  "wide",
                  "medium_wide",
                  "medium",
                  "medium_close_up",
                  "close_up",
                  "extreme_close_up",
                  "graphic"
                ]
              },
              "angle": {
                "type": "string",
                "enum": [
                  "eye_level",
                  "high_angle",
                  "low_angle",
                  "overhead",
                  "aerial",
                  "onboard",
                  "not_applicable"
                ]
              },
              "movement": {
                "type": "string",
                "enum": [
                  "static",
                  "pan",
                  "tilt",
                  "zoom",
                  "tracking",
                  "handheld",
                  "crane",
                  "vehicle_mounted",
                  "combined",
                  "not_applicable"
                ]
              },
              "speed": {
                "type": "string",
                "enum": ["real_time", "time_lapse", "slow_motion", "not_applicable"]
              },
              "lens": {
                "type": "string",
                "enum": [
                  "normal",
                  "wide_angle",
                  "fisheye",
                  "telephoto",
                  "not_applicable"
                ]
              }
            },
            "required": ["shot_size", "angle", "movement", "speed", "lens"]
          },
          "on_screen_text": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": { "type": "string" },
                "type": {
                  "type": "string",
                  "enum": [
                    "slate",
                    "title",
                    "caption",
                    "lower_third",
                    "end_card",
                    "logo",
                    "insignia",
                    "marking",
                    "patch",
                    "sign",
                    "screen",
                    "other"
                  ]
                },
                "start_ms": { "type": "integer", "minimum": 0 },
                "end_ms": { "type": "integer", "minimum": 0 }
              },
              "required": ["text", "type", "start_ms", "end_ms"]
            }
          },
          "audio": {
            "type": "object",
            "properties": {
              "elements": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": ["music", "speech", "natural_sound", "noise", "silence"]
                }
              },
              "description": { "type": "string" }
            },
            "required": ["elements", "description"]
          },
          "moments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "at_ms": { "type": "integer", "minimum": 0 },
                "text": { "type": "string" }
              },
              "required": ["at_ms", "text"]
            }
          },
          "speech": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "start_ms": { "type": "integer", "minimum": 0 },
                "end_ms": { "type": "integer", "minimum": 0 },
                "text": { "type": "string" }
              },
              "required": ["start_ms", "end_ms", "text"]
            }
          },
          "people": {
            "type": "object",
            "properties": {
              "count": { "type": "integer", "minimum": 0 },
              "identifiable_faces": { "type": "integer", "minimum": 0 },
              "description": { "type": "string" },
              "names": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": { "type": "string" },
                    "evidence": { "type": "string" }
                  },
                  "required": ["name", "evidence"]
                }
              },
              "release_needed": { "type": "boolean" }
            },
            "required": [
              "count",
              "identifiable_faces",
              "description",
              "names",
              "release_needed"
            ]
          },
          "tags": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "rocket",
                "rocket_engine",
                "solid_rocket_booster",
                "spacecraft",
                "space_station",
                "satellite",
                "aircraft",
                "rotorcraft",
                "rover",
                "crawler_transporter",
                "ground_vehicle",
                "spacesuit",
                "launch_pad",
                "launch_tower",
                "test_stand",
                "assembly_building",
                "control_room",
                "laboratory",
                "astronaut",
                "crew_group",
                "engineer_technician",
                "spectators",
                "speaker",
                "identifiable_people",
                "no_people",
                "earth_from_space",
                "moon",
                "mars",
                "sun",
                "stars",
                "sky_clouds",
                "landscape",
                "water",
                "vegetation",
                "smoke_steam",
                "exhaust_plume",
                "fire_flames",
                "floodlights",
                "launch",
                "liftoff",
                "ascent",
                "rollout",
                "transport",
                "engine_test",
                "countdown",
                "suiting_up",
                "spacewalk",
                "training",
                "assembly",
                "inspection",
                "landing",
                "flight",
                "taxiing",
                "news_conference",
                "interview",
                "ceremony",
                "day",
                "dawn_dusk",
                "night",
                "day_to_night",
                "time_lapse",
                "slow_motion",
                "aerial_view",
                "onboard_camera",
                "remote_camera",
                "fisheye_lens",
                "static_shot",
                "camera_move",
                "detail_shot",
                "exterior",
                "interior",
                "outer_space",
                "microgravity",
                "slate",
                "title_card",
                "end_card",
                "text_overlay",
                "animation",
                "nasa_insignia",
                "flag",
                "third_party_logo",
                "music",
                "speech",
                "natural_sound",
                "silent"
              ]
            }
          },
          "quality": {
            "type": "object",
            "properties": {
              "issues": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "burned_in_text",
                    "fisheye_distortion",
                    "flicker",
                    "noise_grain",
                    "compression_artifacts",
                    "soft_focus",
                    "motion_blur",
                    "camera_shake",
                    "overexposed",
                    "underexposed",
                    "lens_flare",
                    "black_bars",
                    "freeze_frame",
                    "fade_from_black",
                    "fade_to_black",
                    "low_resolution",
                    "obstructed_view",
                    "colour_cast",
                    "audio_noise",
                    "graphic_glitch"
                  ]
                }
              },
              "notes": { "type": "string" },
              "usability": {
                "type": "string",
                "enum": ["clean", "minor_issues", "limited"]
              }
            },
            "required": ["issues", "notes", "usability"]
          }
        },
        "required": [
          "shot",
          "kind",
          "transition_in",
          "start_ms",
          "end_ms",
          "poster_ms",
          "label",
          "description",
          "subjects",
          "setting",
          "camera",
          "on_screen_text",
          "audio",
          "moments",
          "speech",
          "people",
          "tags",
          "quality"
        ]
      }
    },
    "identifications": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "category": {
            "type": "string",
            "enum": [
              "vehicle",
              "spacecraft",
              "equipment",
              "facility",
              "place",
              "mission",
              "programme",
              "organisation",
              "event",
              "date",
              "person"
            ]
          },
          "basis": { "type": "string", "enum": ["on_screen_text", "audio", "visual"] },
          "evidence": { "type": "string" },
          "shots": { "type": "array", "items": { "type": "integer", "minimum": 1 } }
        },
        "required": ["name", "category", "basis", "evidence", "shots"]
      }
    },
    "rights": {
      "type": "object",
      "properties": {
        "basis": { "type": "string" },
        "credit_line": { "type": "string" },
        "endorsement_note": { "type": "string" },
        "flags": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "identifiable_people",
                  "nasa_insignia",
                  "flag",
                  "third_party_trademark",
                  "personal_information",
                  "music",
                  "other"
                ]
              },
              "shots": { "type": "array", "items": { "type": "integer", "minimum": 1 } },
              "detail": { "type": "string" }
            },
            "required": ["type", "shots", "detail"]
          }
        },
        "editorial_use": { "type": "string", "enum": ["cleared", "cleared_with_notes"] },
        "commercial_use": {
          "type": "string",
          "enum": ["cleared", "cleared_with_notes", "needs_clearance"]
        },
        "clearance_notes": { "type": "string" }
      },
      "required": [
        "basis",
        "credit_line",
        "endorsement_note",
        "flags",
        "editorial_use",
        "commercial_use",
        "clearance_notes"
      ]
    }
  },
  "required": [
    "title",
    "summary",
    "keywords",
    "primary_tags",
    "recorded_date",
    "date_evidence",
    "location",
    "shots",
    "identifications",
    "rights"
  ]
}

review

Holds the log for a librarian to check and correct.

json
{
  "review": {
    "type": "review",
    "needs": ["log"],
    "with": {
      "instructions": "Check the shot log against the clip before it is catalogued: shot boundaries, descriptions, on-screen text, people and rights flags. Correct anything wrong."
    }
  }
}

Answers the archive's standing search briefs from the reviewed log, naming the shots that match and why.

json
{
  "search": {
    "type": "llm",
    "needs": ["log", "review"],
    "with": {
      "provider": "google",
      "model": "gemini-4-hydrogen",
      "include": ["log"],
      "instructions": "…",
      "output": { "mode": "json", "schema": "…" }
    }
  }
}
Instructions of search
text
You answer the standing research briefs of an archive's buyers from one clip's shot log, as a
researcher who knows the catalogue would. "log" is the clip's catalogue record: shots with
times, descriptions, camera, on-screen text, people, tags, quality notes and rights flags. Use
only that record; do not assume anything it does not say.

For each brief, in order, give brief (the brief's text, copied exactly) and matches: every shot
that a buyer with that brief would want, best first, with shot, start_ms and end_ms of the
matching part (the shot's own times from the log unless only part of it matches), fit ("strong"
when the shot is squarely what the brief asks for, "partial" when it fits only in part, only for
part of the shot, or only as a graphic, card or still image; judge each shot on its own fields,
whatever the other shots contain), and reason: one sentence citing the fields that show the
match (for example its tags, description or rights flags) and saying what is missing for a
partial fit. When a shot fits only for part of its length, narrow start_ms and end_ms to that
part using the times the log gives (moments, on-screen text, speech), keeping a second clear of
the times where an excluded element appears; without such times, give the whole shot. When
nothing matches, matches is empty and no_match_reason says in one sentence what the clip lacks;
otherwise no_match_reason is "".

Briefs:
1. Night launches: a rocket lifting off, climbing or standing ready on the pad at night or
   before dawn.
2. Astronauts in spacesuits: crew members wearing, putting on or working in pressure suits.
3. Rocket engine firing: engines or stages firing on a test stand or at launch, with exhaust,
   flame or steam.
4. Rocket on the move: a rocket being rolled out, transported or lifted, in real time or
   time-lapse.
5. Clean B-roll for commercial use: camera footage with no identifiable people, no burned-in
   text or graphics and no NASA insignia in view.
Output schema of search
json
{
  "type": "object",
  "properties": {
    "briefs": {
      "type": "array",
      "minItems": 5,
      "items": {
        "type": "object",
        "properties": {
          "brief": { "type": "string" },
          "matches": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "shot": { "type": "integer", "minimum": 1 },
                "start_ms": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "Start of the matching part of the shot."
                },
                "end_ms": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "End of the matching part of the shot."
                },
                "fit": { "type": "string", "enum": ["strong", "partial"] },
                "reason": { "type": "string" }
              },
              "required": ["shot", "start_ms", "end_ms", "fit", "reason"]
            }
          },
          "no_match_reason": { "type": "string" }
        },
        "required": ["brief", "matches", "no_match_reason"]
      }
    }
  },
  "required": ["briefs"]
}

reel

Renders a 30-second 1280×720 preview reel with each shot beside its log entry.

json
{
  "reel": {
    "type": "render",
    "needs": ["log", "review"],
    "with": {
      "template_id": "template:archive-reel",
      "include": ["log"],
      "width": 1280,
      "height": 720,
      "duration_ms": 30000
    }
  }
}

How the template uses the step outputs

The reel step renders the archive reel template once. It receives RENDER_DATA with the clip in source and the log step's output, with the review's corrections applied:

js
var data = window.RENDER_DATA || {};
var source = data.source || {};
var log = ((data.steps || {}).log || {}).metadata || {};
// The reel lasts as long as the render step's duration_ms.
var REEL_MS = 30000;

From the record the template:

  • opens on a clip card with the record's title, summary, tags and rights notes;
  • plays every shot in order in a viewer frame, with ef-video and ef-audio elements whose file-id is source.file_id, so no text covers the footage, cutting long shots down and slowing short ones to fit 30 seconds;
  • shows each shot's number, times, description, camera, people and tags beside and below the frame;
  • keeps logged speech whole across cuts and crossfades the sound between shots.

The template is templates/archive-reel.html, and templates/archive-reel.schema.json describes the data it receives.

Run it

The example lives in elements/examples/archive-search/ 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 run, 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:

bash
export EDITFRAME_TOKEN="$EDITFRAME_API_KEY"
node elements/examples/scripts/run-example.mjs archive-search

The script reads example.json, which names the pipeline example-archive-search and runs three NASA clips. It registers each template the definition names as template:<name>, from templates/<name>.html and its .schema.json, through POST /api/v1/pipelines/templates, and replaces the reference with the template's ID; the API itself accepts only template IDs. It finds the pipeline by name or creates it, adds a version when the definition changed, and starts a group with one run per clip, which reads it from its download URL.

The review step waits for a decision. The script approves each review unchanged, as a librarian accepting every record would; --review reject rejects them and --review wait leaves them for you to correct in the dashboard or with approvePipelineReview and a metadata_patch. Running the same version and items again returns the earlier group unless you pass --fresh, and --items runs other clips of sources.json, which holds 27 NASA and Prelinger clips.

The script waits for the runs and saves their results under ~/.cache/editframe/example-runs/archive-search/<group-id>/: summary.json with the definition the runs used, and for each clip run.json, outputs/<namespace>.json and media/<file>.mp4. Requests go to EDITFRAME_HOST, https://editframe.com by default.

Licences