Update to AI Producer by OpusClip
Snapshot Nov 18, 2026 · 12:14 UTC · version 1.2.16
Collection source: downloaded plugin package.
Instructions updated for aip-dynamic-caption
Skill instructions — Now says: write like any other motion graphic: one visual moment per stretch of speech, each a composition under the [composition...
Observed in instructions or declared skills. Runtime behavior has not been tested.
Up to 3 plugins free · no card required.
All fields and original values.
Skill instructions
Nov 11, 2026 · 12:09 UTC
write, the same way as any other motion graphic: one visual moment per stretch of speech, each a composition under the [composition contract](../aip-composition/SKILL.md) whose cues are static text elements shown and hidden on the moment...
Nov 18, 2026 · 12:14 UTC
write like any other motion graphic: one visual moment per stretch of speech, each a composition under the [composition contract](../aip-composition/SKILL.md) whose cues are static text elements shown and hidden on the moment's own pause...
Supporting files
Nov 11, 2026 · 12:09 UTC
[{"relative_path":"agents/openai.yaml","size_in_bytes":137}]
Nov 18, 2026 · 12:14 UTC
[{"relative_path":"agents/openai.yaml","size_in_bytes":137},{"relative_path":"references/service-captions.md","size_in_bytes":1092},{"relative_path":"references/writing-captions.md","size_in_bytes":757}]
Compare saved observations
Download comparison JSONSKILL.md text changes
− removed · + added
--- before +++ after @@ -5,7 +5,7 @@ # Captions for an AI Producer project -Captions are moments you write, the same way as any other motion graphic: one visual moment per stretch of speech, each a composition under the [composition contract](../aip-composition/SKILL.md) whose cues are static text elements shown and hidden on the moment's own paused timeline. Static text in a moment is what the editor lets the user select, retype, recolor and change the font of, so every word a caption shows is written in the composition's HTML, never generated by its script. Never call `build_captions`, never use the `narrator-captions` id, and never write `compositions/narrator_captions.html` or `compositions/transcript-src.json`: those are the service's own caption layer, which this skill does not use. +Captions are moments you write like any other motion graphic: one visual moment per stretch of speech, each a composition under the [composition contract](../aip-composition/SKILL.md) whose cues are static text elements shown and hidden on the moment's own paused timeline. The editor lets the user select, retype, recolor and refont static text, so every word a caption shows is written in the composition's HTML, never generated by its script. Never call `build_captions`, never use the `narrator-captions` id, and never write `compositions/narrator_captions.html` or `compositions/transcript-src.json`: those are the service's own caption layer, which this skill does not use. ## Timing @@ -15,7 +15,9 @@ python3 <loaded-aip-skill>/scripts/caption_cues.py <render-engine-root> --max-words 4 ``` -It synchronizes `compositions/editing-script.json` with the cut in `index.html`, as preflight's `--sync-editing-script` does, so that document goes in the same upload, and prints one row per caption moment: `id`, `src`, `start` on the cut, `duration`, `src_anchor` (the source second at `start`), and `cues`, each with `in`, `out` and its `words` as `[text, in, out]`, in seconds from the moment's start. Take every time from it, never from arithmetic of your own on `get_transcript`. A moment never spans a speaker cut, a sentence end or a long pause, so when the user later cuts between two moments in the editor, each moves whole with its source anchor. A cut inside a moment leaves its later words early, and one that removes its first word hides the whole moment, because the editor hides a moment whose anchor is cut away; either way the moment is right again once you write it afresh for the new cut. `--max-words` is how many words a cue shows at once: 4 by default, 1 for a look that shows one word at a time, and 8 to 12 for speech whose transcript words are a character or two each, such as Chinese or Japanese. You may merge two cues or split one at a word boundary, using the words' own times, and correct a word's spelling, casing or punctuation; never change what was said. +It synchronizes `compositions/editing-script.json` with the cut in `index.html`, as preflight's `--sync-editing-script` does, so that document goes in the same commit, and prints one row per caption moment: `id`, `src`, `start` on the cut, `duration`, `src_anchor` (the source second at `start`), and `cues`, each with `in`, `out` and its `words` as `[text, in, out]`, in seconds from the moment's start. Take every time from it, never from arithmetic of your own on `get_transcript`. A moment never spans a speaker cut, a sentence end or a long pause, so when the user later cuts between two moments in the editor, each moves whole with its source anchor. A cut inside a moment leaves its later words early, and one that removes its first word hides the whole moment, because the editor hides a moment whose anchor is cut away; either way the moment is right again once you write it afresh for the new cut. + +When a look shows one word at a time, the speech's transcript words are a character or two each (such as Chinese or Japanese), or you would merge, split or correct a cue, read [writing captions](references/writing-captions.md) before running the script or editing its cues; never change what was said. Mount each row as a moment host, after every other moment inside the root and all on one track no other moment uses, so the captions draw above every moment: @@ -27,7 +29,7 @@ Publish the caption moments with their hosts in `index.html`, the synchronized EditingScript and the font files. One commit carries at most 200 files and at most 256 KiB of inline `content` in all, so a long video's captions go out over several commits in timeline order: each mounts only the caption hosts whose files it or an earlier commit carried, and only the last one closes authoring. -The EditingScript sync refuses a cut change while caption moments are mounted (`editing_script_mounted_captions_require_rebake`), because their timing belongs to the old cut. To recut a captioned project, take the caption hosts out of `index.html` and drop their files from the next commit, make the cut, run the script again and write the captions afresh. A project whose captions the service built earlier, a `narrator-captions` host, keeps them until the user asks to change its captions or its cut; then replace that layer the same way. +The EditingScript sync refuses a cut change while caption moments are mounted (`editing_script_mounted_captions_require_rebake`), because their timing belongs to the old cut. To recut a captioned project, take the caption hosts out of `index.html` and drop their files from the next commit, make the cut, run the script again and write the captions afresh. A project whose captions the service built earlier, a `narrator-captions` host, keeps them, as [service-built captions](references/service-captions.md) says, until the user asks to change its captions or its cut; then replace that layer the same way. ## A caption moment @@ -57,20 +59,19 @@ </template> ``` -- One cue element per cue, its text written in the HTML, its `data-in` and `data-out` from the script's row. The timeline reads them, so retiming a cue never touches its text, and a cue's entrance or exit tween starts at its `data-in` or ends at its `data-out`. A look that treats words one by one wraps each word in its own span, with that word's times, inside the cue. -- One cue on screen at a time: the next appears as the previous leaves. -- Each caption file is at most 64 KiB, a moment's own. Repeat the `@font-face` and the cue rules in every caption file, so each moment renders on its own. +- One cue element per cue, its text written in the HTML, its `data-in` and `data-out` from the script's row. The timeline reads them, so retiming a cue never touches its text, and a cue's entrance tween starts at its `data-in` and its exit tween ends at its `data-out`. A look that treats words one by one wraps each word in its own span, with that word's times, inside the cue. +- Repeat the `@font-face` and the cue rules in every caption file, so each moment renders on its own. - A caption moment is not a beat: it takes no sound effect, and it does not count toward the visual moments of the fine cut. ## The default look -Without a reference or the user's words about it, every caption is the same plain look: Inter Bold, white, with a soft dark shadow, centred, at about 6% of the canvas's short side (64 px on a 1080-wide canvas), at most two lines, with no emphasized word. Its band is centred at 70% of the frame height on a portrait canvas and at 78% on a landscape or square one while the speaker owns the frame; under a visual moment it sits where the [framing skill](../aip-framing/SKILL.md) puts the caption for that moment's layout, set on each cue that plays there. +Without a reference or the user's words about it, every caption is the same plain look: Inter Bold, white, with a soft dark shadow, centred, at about 6% of the canvas's short side (64 px on a 1080-wide canvas), at most two lines, with no emphasized word. Its band is centred at 70% of the frame height on a portrait canvas (75% on a 4:5 one) and at 78% on a landscape or square one while the speaker owns the frame; under a visual moment it sits where the [framing skill](../aip-framing/SKILL.md) puts the caption for that moment's layout, set on each cue that plays there. Download the font from Google Fonts or its Fontsource mirror and stage it under `public/fonts/`, in the same upload as the first caption file. Stage every file the captions' characters need, and for speech in a script Inter lacks, such as Chinese, Japanese, Korean, Arabic or Hindi, take the Noto Sans family for that script instead. Never name a font you have not staged: the export renders on a machine with its own fonts, so an unstaged name renders there as another face. ## With a reference -When the user's edit copies a reference, the [reference style skill](../aip-reference-style/SKILL.md) decides the caption look, which cues show together and how they are laid out; it replaces the default look wholesale. This skill's timing, mounting and legibility still apply. +When the user's edit copies a reference, the [reference style skill](../aip-reference-style/SKILL.md) decides the caption look, which cues show together and their layout, replacing the default look wholesale. This skill's timing, mounting and legibility still apply. ## What keeps captions legible
Full technical diff · 2 changed fields
changed /included_files
[
{
"relative_path": "agents/openai.yaml",
"size_in_bytes": 137
}
][
{
"relative_path": "agents/openai.yaml",
"size_in_bytes": 137
},
{
"relative_path": "references/service-captions.md",
"size_in_bytes": 1092
},
{
"relative_path": "references/writing-captions.md",
"size_in_bytes": 757
}
]changed /skill_md_contents
"---\nname: aip-dynamic-caption\ndescription: \"Write an AI Producer project's captions as caption moments: static text the user can select, retype and restyle in the editor, timed to the cut by a script. How to time and mount them, the default look, and what keeps them legible. Listed, it makes captions the default.\"\n---\n\n# Captions for an AI Producer project\n\nCaptions are moments you write, the same way as any other motion graphic: one visual moment per stretch of speech, each a composition under the [composition contract](../aip-composition/SKILL.md) whose cues are static text elements shown and hidden on the moment's own paused timeline. Static text in a moment is what the editor lets the user select, retype, recolor and change the font of, so every word a caption shows is written in the composition's HTML, never generated by its script. Never call `build_captions`, never use the `narrator-captions` id, and never write `compositions/narrator_captions.html` or `compositions/transcript-src.json`: those are the service's own caption layer, which this skill does not use.\n\n## Timing\n\nWrite the captions once the speaker cut is final. Run [caption_cues.py](../aip/scripts/caption_cues.py) on the render-engine directory:\n\n```sh\npython3 <loaded-aip-skill>/scripts/caption_cues.py <render-engine-root> --max-words 4\n```\n\nIt synchronizes `compositions/editing-script.json` with the cut in `index.html`, as preflight's `--sync-editing-script` does, so that document goes in the same upload, and prints one row per caption moment: `id`, `src`, `start` on the cut, `duration`, `src_anchor` (the source second at `start`), and `cues`, each with `in`, `out` and its `words` as `[text, in, out]`, in seconds from the moment's start. Take every time from it, never from arithmetic of your own on `get_transcript`. A moment never spans a speaker cut, a sentence end or a long pause, so when the user later cuts between two moments in the editor, each moves whole with its source anchor. A cut inside a moment leaves its later words early, and one that removes its first word hides the whole moment, because the editor hides a moment whose anchor is cut away; either way the moment is right again once you write it afresh for the new cut. `--max-words` is how many words a cue shows at once: 4 by default, 1 for a look that shows one word at a time, and 8 to 12 for speech whose transcript words are a character or two each, such as Chinese or Japanese. You may merge two cues or split one at a word boundary, using the words' own times, and correct a word's spelling, casing or punctuation; never change what was said.\n\nMount each row as a moment host, after every other moment inside the root and all on one track no other moment uses, so the captions draw above every moment:\n\n```html\n<div class=\"visual-host clip\" data-composition-id=\"captions-01\" data-title=\"Captions 1\"\n data-composition-src=\"compositions/captions-01.html\" data-start=\"<start>\" data-duration=\"<duration>\"\n data-src-anchor=\"<src_anchor>\" data-track-index=\"<n>\" data-width=\"W\" data-height=\"H\"></div>\n```\n\nPublish the caption moments with their hosts in `index.html`, the synchronized EditingScript and the font files. One commit carries at most 200 files and at most 256 KiB of inline `content` in all, so a long video's captions go out over several commits in timeline order: each mounts only the caption hosts whose files it or an earlier commit carried, and only the last one closes authoring.\n\nThe EditingScript sync refuses a cut change while caption moments are mounted (`editing_script_mounted_captions_require_rebake`), because their timing belongs to the old cut. To recut a captioned project, take the caption hosts out of `index.html` and drop their files from the next commit, make the cut, run the script again and write the captions afresh. A project whose captions the service built earlier, a `narrator-captions` host, keeps them until the user asks to change its captions or its cut; then replace that layer the same way.\n\n## A caption moment\n\n```html\n<template>\n <div data-composition-id=\"captions-01\" data-width=\"1080\" data-height=\"1920\">\n <style>\n @font-face { font-family: \"Inter\"; font-weight: 700; src: url(\"public/fonts/Inter-700.woff2\") format(\"woff2\"); }\n [data-composition-id=\"captions-01\"] .cue {\n position: absolute; left: 8%; right: 12%; top: 70%; transform: translateY(-50%);\n text-align: center; font: 700 64px/1.15 \"Inter\"; color: #ffffff;\n text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6); visibility: hidden;\n }\n </style>\n <div class=\"cue\" data-in=\"0\" data-out=\"0.82\">What do you like</div>\n <div class=\"cue\" data-in=\"0.82\" data-out=\"1.9\">about using Opus</div>\n <script>\n const root = document.querySelector('[data-composition-id=\"captions-01\"]');\n const tl = gsap.timeline({ paused: true });\n root.querySelectorAll(\".cue\").forEach((cue) => {\n tl.set(cue, { visibility: \"visible\" }, Number(cue.dataset.in));\n tl.set(cue, { visibility: \"hidden\" }, Number(cue.dataset.out));\n });\n window.__timelines[\"captions-01\"] = tl;\n </script>\n </div>\n</template>\n```\n\n- One cue element per cue, its text written in the HTML, its `data-in` and `data-out` from the script's row. The timeline reads them, so retiming a cue never touches its text, and a cue's entrance or exit tween starts at its `data-in` or ends at its `data-out`. A look that treats words one by one wraps each word in its own span, with that word's times, inside the cue.\n- One cue on screen at a time: the next appears as the previous leaves.\n- Each caption file is at most 64 KiB, a moment's own. Repeat the `@font-face` and the cue rules in every caption file, so each moment renders on its own.\n- A caption moment is not a beat: it takes no sound effect, and it does not count toward the visual moments of the fine cut.\n\n## The default look\n\nWithout a reference or the user's words about it, every caption is the same plain look: Inter Bold, white, with a soft dark shadow, centred, at about 6% of the canvas's short side (64 px on a 1080-wide canvas), at most two lines, with no emphasized word. Its band is centred at 70% of the frame height on a portrait canvas and at 78% on a landscape or square one while the speaker owns the frame; under a visual moment it sits where the [framing skill](../aip-framing/SKILL.md) puts the caption for that moment's layout, set on each cue that plays there.\n\nDownload the font from Google Fonts or its Fontsource mirror and stage it under `public/fonts/`, in the same upload as the first caption file. Stage every file the captions' characters need, and for speech in a script Inter lacks, such as Chinese, Japanese, Korean, Arabic or Hindi, take the Noto Sans family for that script instead. Never name a font you have not staged: the export renders on a machine with its own fonts, so an unstaged name renders there as another face.\n\n## With a reference\n\nWhen the user's edit copies a reference, the [reference style skill](../aip-reference-style/SKILL.md) decides the caption look, which cues show together and how they are laid out; it replaces the default look wholesale. This skill's timing, mounting and legibility still apply.\n\n## What keeps captions legible\n\nThese hold over the default, a reference and the user's words:\n\n- Every word stays wholly inside the frame's safe area for its whole time on screen, at its largest scale in any entrance or emphasis: the safe area the [aesthetic rules](../aip/references/aesthetic-rules.md) set for the canvas, clear of a portrait canvas's platform buttons on the right edge and its caption bar at the bottom.\n- A cue wraps inside its box rather than shrinking; split a cue that would take a third line instead of making its type smaller.\n- No cue plays under a `headline` overlay or a `statement` full cover, which already draw the phrase, under any other graphic that shows the spoken words itself, such as a title set in the speaker's own words, under a logo with text or a quote card, which the aesthetic rules give their beat alone, or under a full cover whose detail must occupy the band; drop those cues, and the whole moment when every cue falls there.\n""---\nname: aip-dynamic-caption\ndescription: \"Write an AI Producer project's captions as caption moments: static text the user can select, retype and restyle in the editor, timed to the cut by a script. How to time and mount them, the default look, and what keeps them legible. Listed, it makes captions the default.\"\n---\n\n# Captions for an AI Producer project\n\nCaptions are moments you write like any other motion graphic: one visual moment per stretch of speech, each a composition under the [composition contract](../aip-composition/SKILL.md) whose cues are static text elements shown and hidden on the moment's own paused timeline. The editor lets the user select, retype, recolor and refont static text, so every word a caption shows is written in the composition's HTML, never generated by its script. Never call `build_captions`, never use the `narrator-captions` id, and never write `compositions/narrator_captions.html` or `compositions/transcript-src.json`: those are the service's own caption layer, which this skill does not use.\n\n## Timing\n\nWrite the captions once the speaker cut is final. Run [caption_cues.py](../aip/scripts/caption_cues.py) on the render-engine directory:\n\n```sh\npython3 <loaded-aip-skill>/scripts/caption_cues.py <render-engine-root> --max-words 4\n```\n\nIt synchronizes `compositions/editing-script.json` with the cut in `index.html`, as preflight's `--sync-editing-script` does, so that document goes in the same commit, and prints one row per caption moment: `id`, `src`, `start` on the cut, `duration`, `src_anchor` (the source second at `start`), and `cues`, each with `in`, `out` and its `words` as `[text, in, out]`, in seconds from the moment's start. Take every time from it, never from arithmetic of your own on `get_transcript`. A moment never spans a speaker cut, a sentence end or a long pause, so when the user later cuts between two moments in the editor, each moves whole with its source anchor. A cut inside a moment leaves its later words early, and one that removes its first word hides the whole moment, because the editor hides a moment whose anchor is cut away; either way the moment is right again once you write it afresh for the new cut.\n\nWhen a look shows one word at a time, the speech's transcript words are a character or two each (such as Chinese or Japanese), or you would merge, split or correct a cue, read [writing captions](references/writing-captions.md) before running the script or editing its cues; never change what was said.\n\nMount each row as a moment host, after every other moment inside the root and all on one track no other moment uses, so the captions draw above every moment:\n\n```html\n<div class=\"visual-host clip\" data-composition-id=\"captions-01\" data-title=\"Captions 1\"\n data-composition-src=\"compositions/captions-01.html\" data-start=\"<start>\" data-duration=\"<duration>\"\n data-src-anchor=\"<src_anchor>\" data-track-index=\"<n>\" data-width=\"W\" data-height=\"H\"></div>\n```\n\nPublish the caption moments with their hosts in `index.html`, the synchronized EditingScript and the font files. One commit carries at most 200 files and at most 256 KiB of inline `content` in all, so a long video's captions go out over several commits in timeline order: each mounts only the caption hosts whose files it or an earlier commit carried, and only the last one closes authoring.\n\nThe EditingScript sync refuses a cut change while caption moments are mounted (`editing_script_mounted_captions_require_rebake`), because their timing belongs to the old cut. To recut a captioned project, take the caption hosts out of `index.html` and drop their files from the next commit, make the cut, run the script again and write the captions afresh. A project whose captions the service built earlier, a `narrator-captions` host, keeps them, as [service-built captions](references/service-captions.md) says, until the user asks to change its captions or its cut; then replace that layer the same way.\n\n## A caption moment\n\n```html\n<template>\n <div data-composition-id=\"captions-01\" data-width=\"1080\" data-height=\"1920\">\n <style>\n @font-face { font-family: \"Inter\"; font-weight: 700; src: url(\"public/fonts/Inter-700.woff2\") format(\"woff2\"); }\n [data-composition-id=\"captions-01\"] .cue {\n position: absolute; left: 8%; right: 12%; top: 70%; transform: translateY(-50%);\n text-align: center; font: 700 64px/1.15 \"Inter\"; color: #ffffff;\n text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6); visibility: hidden;\n }\n </style>\n <div class=\"cue\" data-in=\"0\" data-out=\"0.82\">What do you like</div>\n <div class=\"cue\" data-in=\"0.82\" data-out=\"1.9\">about using Opus</div>\n <script>\n const root = document.querySelector('[data-composition-id=\"captions-01\"]');\n const tl = gsap.timeline({ paused: true });\n root.querySelectorAll(\".cue\").forEach((cue) => {\n tl.set(cue, { visibility: \"visible\" }, Number(cue.dataset.in));\n tl.set(cue, { visibility: \"hidden\" }, Number(cue.dataset.out));\n });\n window.__timelines[\"captions-01\"] = tl;\n </script>\n </div>\n</template>\n```\n\n- One cue element per cue, its text written in the HTML, its `data-in` and `data-out` from the script's row. The timeline reads them, so retiming a cue never touches its text, and a cue's entrance tween starts at its `data-in` and its exit tween ends at its `data-out`. A look that treats words one by one wraps each word in its own span, with that word's times, inside the cue.\n- Repeat the `@font-face` and the cue rules in every caption file, so each moment renders on its own.\n- A caption moment is not a beat: it takes no sound effect, and it does not count toward the visual moments of the fine cut.\n\n## The default look\n\nWithout a reference or the user's words about it, every caption is the same plain look: Inter Bold, white, with a soft dark shadow, centred, at about 6% of the canvas's short side (64 px on a 1080-wide canvas), at most two lines, with no emphasized word. Its band is centred at 70% of the frame height on a portrait canvas (75% on a 4:5 one) and at 78% on a landscape or square one while the speaker owns the frame; under a visual moment it sits where the [framing skill](../aip-framing/SKILL.md) puts the caption for that moment's layout, set on each cue that plays there.\n\nDownload the font from Google Fonts or its Fontsource mirror and stage it under `public/fonts/`, in the same upload as the first caption file. Stage every file the captions' characters need, and for speech in a script Inter lacks, such as Chinese, Japanese, Korean, Arabic or Hindi, take the Noto Sans family for that script instead. Never name a font you have not staged: the export renders on a machine with its own fonts, so an unstaged name renders there as another face.\n\n## With a reference\n\nWhen the user's edit copies a reference, the [reference style skill](../aip-reference-style/SKILL.md) decides the caption look, which cues show together and their layout, replacing the default look wholesale. This skill's timing, mounting and legibility still apply.\n\n## What keeps captions legible\n\nThese hold over the default, a reference and the user's words:\n\n- Every word stays wholly inside the frame's safe area for its whole time on screen, at its largest scale in any entrance or emphasis: the safe area the [aesthetic rules](../aip/references/aesthetic-rules.md) set for the canvas, clear of a portrait canvas's platform buttons on the right edge and its caption bar at the bottom.\n- A cue wraps inside its box rather than shrinking; split a cue that would take a third line instead of making its type smaller.\n- No cue plays under a `headline` overlay or a `statement` full cover, which already draw the phrase, under any other graphic that shows the spoken words itself, such as a title set in the speaker's own words, under a logo with text or a quote card, which the aesthetic rules give their beat alone, or under a full cover whose detail must occupy the band; drop those cues, and the whole moment when every cue falls there.\n"Full snapshot data
{
"description": "Write an AI Producer project's captions as caption moments: static text the user can select, retype and restyle in the editor, timed to the cut by a script. How to time and mount them, the default look, and what keeps them legible. Listed, it makes captions the default.",
"included_files": [
{
"relative_path": "agents/openai.yaml",
"size_in_bytes": 137
},
{
"relative_path": "references/service-captions.md",
"size_in_bytes": 1092
},
{
"relative_path": "references/writing-captions.md",
"size_in_bytes": 757
}
],
"name": "aip-dynamic-caption",
"skill_md_contents": "---\nname: aip-dynamic-caption\ndescription: \"Write an AI Producer project's captions as caption moments: static text the user can select, retype and restyle in the editor, timed to the cut by a script. How to time and mount them, the default look, and what keeps them legible. Listed, it makes captions the default.\"\n---\n\n# Captions for an AI Producer project\n\nCaptions are moments you write like any other motion graphic: one visual moment per stretch of speech, each a composition under the [composition contract](../aip-composition/SKILL.md) whose cues are static text elements shown and hidden on the moment's own paused timeline. The editor lets the user select, retype, recolor and refont static text, so every word a caption shows is written in the composition's HTML, never generated by its script. Never call `build_captions`, never use the `narrator-captions` id, and never write `compositions/narrator_captions.html` or `compositions/transcript-src.json`: those are the service's own caption layer, which this skill does not use.\n\n## Timing\n\nWrite the captions once the speaker cut is final. Run [caption_cues.py](../aip/scripts/caption_cues.py) on the render-engine directory:\n\n```sh\npython3 <loaded-aip-skill>/scripts/caption_cues.py <render-engine-root> --max-words 4\n```\n\nIt synchronizes `compositions/editing-script.json` with the cut in `index.html`, as preflight's `--sync-editing-script` does, so that document goes in the same commit, and prints one row per caption moment: `id`, `src`, `start` on the cut, `duration`, `src_anchor` (the source second at `start`), and `cues`, each with `in`, `out` and its `words` as `[text, in, out]`, in seconds from the moment's start. Take every time from it, never from arithmetic of your own on `get_transcript`. A moment never spans a speaker cut, a sentence end or a long pause, so when the user later cuts between two moments in the editor, each moves whole with its source anchor. A cut inside a moment leaves its later words early, and one that removes its first word hides the whole moment, because the editor hides a moment whose anchor is cut away; either way the moment is right again once you write it afresh for the new cut.\n\nWhen a look shows one word at a time, the speech's transcript words are a character or two each (such as Chinese or Japanese), or you would merge, split or correct a cue, read [writing captions](references/writing-captions.md) before running the script or editing its cues; never change what was said.\n\nMount each row as a moment host, after every other moment inside the root and all on one track no other moment uses, so the captions draw above every moment:\n\n```html\n<div class=\"visual-host clip\" data-composition-id=\"captions-01\" data-title=\"Captions 1\"\n data-composition-src=\"compositions/captions-01.html\" data-start=\"<start>\" data-duration=\"<duration>\"\n data-src-anchor=\"<src_anchor>\" data-track-index=\"<n>\" data-width=\"W\" data-height=\"H\"></div>\n```\n\nPublish the caption moments with their hosts in `index.html`, the synchronized EditingScript and the font files. One commit carries at most 200 files and at most 256 KiB of inline `content` in all, so a long video's captions go out over several commits in timeline order: each mounts only the caption hosts whose files it or an earlier commit carried, and only the last one closes authoring.\n\nThe EditingScript sync refuses a cut change while caption moments are mounted (`editing_script_mounted_captions_require_rebake`), because their timing belongs to the old cut. To recut a captioned project, take the caption hosts out of `index.html` and drop their files from the next commit, make the cut, run the script again and write the captions afresh. A project whose captions the service built earlier, a `narrator-captions` host, keeps them, as [service-built captions](references/service-captions.md) says, until the user asks to change its captions or its cut; then replace that layer the same way.\n\n## A caption moment\n\n```html\n<template>\n <div data-composition-id=\"captions-01\" data-width=\"1080\" data-height=\"1920\">\n <style>\n @font-face { font-family: \"Inter\"; font-weight: 700; src: url(\"public/fonts/Inter-700.woff2\") format(\"woff2\"); }\n [data-composition-id=\"captions-01\"] .cue {\n position: absolute; left: 8%; right: 12%; top: 70%; transform: translateY(-50%);\n text-align: center; font: 700 64px/1.15 \"Inter\"; color: #ffffff;\n text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6); visibility: hidden;\n }\n </style>\n <div class=\"cue\" data-in=\"0\" data-out=\"0.82\">What do you like</div>\n <div class=\"cue\" data-in=\"0.82\" data-out=\"1.9\">about using Opus</div>\n <script>\n const root = document.querySelector('[data-composition-id=\"captions-01\"]');\n const tl = gsap.timeline({ paused: true });\n root.querySelectorAll(\".cue\").forEach((cue) => {\n tl.set(cue, { visibility: \"visible\" }, Number(cue.dataset.in));\n tl.set(cue, { visibility: \"hidden\" }, Number(cue.dataset.out));\n });\n window.__timelines[\"captions-01\"] = tl;\n </script>\n </div>\n</template>\n```\n\n- One cue element per cue, its text written in the HTML, its `data-in` and `data-out` from the script's row. The timeline reads them, so retiming a cue never touches its text, and a cue's entrance tween starts at its `data-in` and its exit tween ends at its `data-out`. A look that treats words one by one wraps each word in its own span, with that word's times, inside the cue.\n- Repeat the `@font-face` and the cue rules in every caption file, so each moment renders on its own.\n- A caption moment is not a beat: it takes no sound effect, and it does not count toward the visual moments of the fine cut.\n\n## The default look\n\nWithout a reference or the user's words about it, every caption is the same plain look: Inter Bold, white, with a soft dark shadow, centred, at about 6% of the canvas's short side (64 px on a 1080-wide canvas), at most two lines, with no emphasized word. Its band is centred at 70% of the frame height on a portrait canvas (75% on a 4:5 one) and at 78% on a landscape or square one while the speaker owns the frame; under a visual moment it sits where the [framing skill](../aip-framing/SKILL.md) puts the caption for that moment's layout, set on each cue that plays there.\n\nDownload the font from Google Fonts or its Fontsource mirror and stage it under `public/fonts/`, in the same upload as the first caption file. Stage every file the captions' characters need, and for speech in a script Inter lacks, such as Chinese, Japanese, Korean, Arabic or Hindi, take the Noto Sans family for that script instead. Never name a font you have not staged: the export renders on a machine with its own fonts, so an unstaged name renders there as another face.\n\n## With a reference\n\nWhen the user's edit copies a reference, the [reference style skill](../aip-reference-style/SKILL.md) decides the caption look, which cues show together and their layout, replacing the default look wholesale. This skill's timing, mounting and legibility still apply.\n\n## What keeps captions legible\n\nThese hold over the default, a reference and the user's words:\n\n- Every word stays wholly inside the frame's safe area for its whole time on screen, at its largest scale in any entrance or emphasis: the safe area the [aesthetic rules](../aip/references/aesthetic-rules.md) set for the canvas, clear of a portrait canvas's platform buttons on the right edge and its caption bar at the bottom.\n- A cue wraps inside its box rather than shrinking; split a cue that would take a third line instead of making its type smaller.\n- No cue plays under a `headline` overlay or a `statement` full cover, which already draw the phrase, under any other graphic that shows the spoken words itself, such as a title set in the speaker's own words, under a logo with text or a quote card, which the aesthetic rules give their beat alone, or under a full cover whose detail must occupy the band; drop those cues, and the whole moment when every cue falls there.\n"
}SHA-256 of public snapshot: 4d98474d50b19a2f497b529caaca4bf8cbf3881dd06f2c4bca0780203f14efc4