mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 16:42:27 +00:00
docs: add documentation quality gates
This commit is contained in:
@@ -3,6 +3,8 @@ title: Editing existing videos
|
||||
description: "Direct the agent like an editor — trim, move, retime, swap, restyle — with the NLE verb you already know mapped to the prompt that lands it in one pass."
|
||||
---
|
||||
|
||||
import { DocsVideo } from "/snippets/docs-video.jsx";
|
||||
|
||||
A [storyboard](/prompting/storyboards)'s frames still get edited, and so does everything else you build — a templated composition, a one-shot scene, all of it. Most HyperFrames time isn't the first render — it's the twenty edits after it. A composition is plain HTML with `data-*` timing attributes and a GSAP timeline, so every edit you'd make in a non-linear editor maps to a specific, inspectable change in the source. You don't re-specify the video; you name the edit the way you'd say it to a human editor, and the agent makes the smallest change that does it.
|
||||
|
||||
This page maps the editor verbs to the prompts that land them. The examples name elements from a typical composition — swap the noun ("the lower third", "scene 2") for whatever yours is called. Two habits from [Iterating](/prompting/iterating) apply to every one of them, so keep them in mind: **change one thing per render**, and **state targets as absolute values** ("scene 2 = 2 seconds", not "a bit shorter") so the agent lands it in a single pass instead of oscillating.
|
||||
@@ -21,7 +23,7 @@ Every timeline verb resolves to a `data-*` attribute or an inline style. This is
|
||||
| "the audio bed is too loud" | Level | `data-volume` |
|
||||
|
||||
<Note>
|
||||
The mental model the Studio timeline uses: **move** changes when a clip *starts*, **right trim** changes when it *ends*, and **front trim** only exists for media clips — a `<video>` or `<audio>` can skip into its own content, but a GSAP-driven `<div>` can't start halfway through its animation. See [Timeline editing](/guides/timeline-editing) for the full clip-type breakdown. One more surface the map can't show: retiming a scene that spans the whole composition also needs the root's `data-duration` bumped — the root governs total length, so a longer child never renders past it.
|
||||
The mental model the Studio timeline uses: **move** changes when a clip *starts*, **right trim** changes when it *ends*, and **front trim** only exists for media clips — a `<video>` or `<audio>` can skip into its own content, but a GSAP-driven `<div>` can't start halfway through its animation. See [Studio timeline](/studio/timeline) for the full clip-type breakdown. One more surface the map can't show: retiming a scene that spans the whole composition also needs the root's `data-duration` bumped — the root governs total length, so a longer child never renders past it.
|
||||
</Note>
|
||||
|
||||
## Trim, move, and restack
|
||||
@@ -39,10 +41,18 @@ Bound moves by the composition's length — a 4-second clip moved to 0:08 in a 1
|
||||
- ❌ `tighten up the opening`
|
||||
- ✅ `intro clip duration = 3s; leave its animation and position alone` — one attribute, and the freeze clause stops a rebuild from drifting on axes you'd already settled
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/editing-before.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<DocsVideo
|
||||
title="HyperFrames video: Editing Before"
|
||||
src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/editing-before.mp4#t=0.1"
|
||||
loop
|
||||
/>
|
||||
*Before — the untouched composition.*
|
||||
|
||||
<video controls muted loop playsinline preload="metadata" src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/editing-after.mp4#t=0.1" style={{ borderRadius: "0.5rem", marginTop: "0.75rem" }}></video>
|
||||
<DocsVideo
|
||||
title="HyperFrames video: Editing After"
|
||||
src="https://static.heygen.ai/hyperframes-oss/docs/images/prompting/editing-after.mp4#t=0.1"
|
||||
loop
|
||||
/>
|
||||
*After — four verbatim edits from this page (move, right-trim, retime, restyle-with-freeze); each touched exactly the attribute the verb map promises, gates green after every edit.*
|
||||
|
||||
|
||||
@@ -64,7 +74,7 @@ Retiming starts with the scene's `data-duration`. If the motion should keep its
|
||||
- ✅ `scene 2 duration = 4s, same motion, add the extra time as a hold at the end`
|
||||
|
||||
<Warning>
|
||||
Render duration comes from `data-duration`, not GSAP timeline length. Do not pad a timeline with an empty `tl.set({}, {}, <seconds>)` sentinel. If a scene still ends early, check the scene and composition timing attributes in the [Video editor cheatsheet](/guides/video-editor-cheatsheet#timing-cheatsheet).
|
||||
Render duration comes from `data-duration`, not GSAP timeline length. Do not pad a timeline with an empty `tl.set({}, {}, <seconds>)` sentinel. If a scene still ends early, check the scene and composition timing attributes in [Data attributes](/concepts/data-attributes).
|
||||
</Warning>
|
||||
|
||||
## Make it snappier (retiming *feel*, not just duration)
|
||||
@@ -85,7 +95,7 @@ Individual animation properties are editable — the value, the ease, the timing
|
||||
|
||||
> Give the add-to-cart item an arc instead of a straight diagonal, like it's being tossed into the cart.
|
||||
|
||||
State the property target absolutely (`Move X = 40`, `arc curviness ≈ 1.5`). [Keyframes & arc motion](/guides/keyframes) covers what's editable, arc-motion paths, and gesture recording.
|
||||
State the property target absolutely (`Move X = 40`, `arc curviness ≈ 1.5`). [Animation and keyframes](/studio/animation) covers what's editable, motion paths, and gesture recording.
|
||||
|
||||
<Tip>
|
||||
For an element-specific edit, the Design Panel's clipboard icon copies structured context — the element's id, position, size, and current animation — ready to paste into your prompt. It gives the agent exact spatial context instead of a vague "the title."
|
||||
@@ -125,8 +135,8 @@ Visual tweaks — color, size, weight, position of a single element — are wher
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Iterating" href="/prompting/iterating">One variable per edit, absolute targets, freeze what works</Card>
|
||||
<Card title="Vocabulary" href="/prompting/vocabulary">Pacing and easing words that retime the *feel* of a scene</Card>
|
||||
<Card title="Timeline editing" href="/guides/timeline-editing">Which edits the Studio timeline persists, and how</Card>
|
||||
<Card title="Video editor cheatsheet" href="/guides/video-editor-cheatsheet">The `data-*` attributes as timeline controls</Card>
|
||||
<Card title="Studio timeline" href="/studio/timeline">Move, trim, split, and navigate clips</Card>
|
||||
<Card title="Data attributes" href="/concepts/data-attributes">The `data-*` timing contract</Card>
|
||||
</CardGroup>
|
||||
|
||||
*Next: [Iterating](/prompting/iterating) — the discipline behind every edit on this page: one variable per render, absolute targets, freeze what works.*
|
||||
|
||||
Reference in New Issue
Block a user