Open source CapCut alternative.
TypeScript
feat(cut): background moves to the aspect menu; the Details video section and the project fade go [rebuild]
David Le32425bb19a4a
diff --git a/site/scripts/eval-cut-export.ts b/site/scripts/eval-cut-export.tsindex 4b0e93ec..76fe9d80 100644--- a/site/scripts/eval-cut-export.ts+++ b/site/scripts/eval-cut-export.ts@@ -278,8 +278,6 @@ function fixtureDoc(url: (file: string) => string, clipS = CLIP_S) {const doc = {aspect: "16:9",background: "#102030",- fadeIn: 0.3,- fadeOut: 0.3,assets: [asset("v0", "clip-0.mp4", "video", clipS),asset("v1", "clip-1.mp4", "video", clipS),diff --git a/site/scripts/eval-cut-headless-export.ts b/site/scripts/eval-cut-headless-export.tsindex 979cbcad..dd9c6e78 100644--- a/site/scripts/eval-cut-headless-export.ts+++ b/site/scripts/eval-cut-headless-export.ts@@ -75,8 +75,6 @@ try {audioClips: doc.audioClips,overlays: doc.overlays,subtitles: doc.subtitles,- fadeIn: doc.fadeIn,- fadeOut: doc.fadeOut,};const settings = presetSettings(EXPORT_PRESETS[2], doc.aspect);const jobId = await createExportJob(projectId, exportDoc, settings);diff --git a/site/scripts/lib/cut-eval/cases.ts b/site/scripts/lib/cut-eval/cases.tsindex a7d2352e..a0ab2ff5 100644--- a/site/scripts/lib/cut-eval/cases.ts+++ b/site/scripts/lib/cut-eval/cases.ts@@ -155,7 +155,6 @@ export function cases(audio: { dataBase64: string; mimeType: string }): EvalCasestubs: {add_clip: { id: "c-new", kind: "image", index: 1, start: 12.5, len: 8 },set_transition: { ok: true },- set_project_fade: { ok: true },add_title: { ok: true },},},diff --git a/site/scripts/lib/cut-eval/fixtures.ts b/site/scripts/lib/cut-eval/fixtures.tsindex 955eb4bb..d145ff7a 100644--- a/site/scripts/lib/cut-eval/fixtures.ts+++ b/site/scripts/lib/cut-eval/fixtures.ts@@ -382,8 +382,6 @@ export const REFERENCE_PROJECT = {duration: 14,aspect: "9:16",frame: "1080x1920",- fadeIn: 0.3,- fadeOut: 0.5,background: "#101010",},media: [diff --git a/site/src/cut/components/AiPanel.tools.ts b/site/src/cut/components/AiPanel.tools.tsindex e3d34bee..f81043f0 100644--- a/site/src/cut/components/AiPanel.tools.ts+++ b/site/src/cut/components/AiPanel.tools.ts@@ -132,13 +132,13 @@ export const AI_PANEL_TOOLS = [{name: "read_project",description:- "Read another Donkey Cut project as a reference: its whole edit in the same shape as <editor_state> — every clip with its trims, speed, framing, grade, look, mask, keyframes and animations; the transition bars; titles, shapes and stickers with their keyframes; the soundtrack; the caption look and cues; aspect, background and fades — plus each source's observed notes, transcript and asset id. Takes a project link (…/app/p/<id>), a share link (…/s/<token>), or a project id. The document IS the edit: never watch_video a reference to learn what its document already states; watch a reference source (project_link) only to see footage its notes leave dark. Every item carries its id, so replicate_project can bring the whole edit or just the items the user wants — a title, one clip's treatment, the music — and copy_project_media can bring files over on their own. Nothing in the open project changes.",+ "Read another Donkey Cut project as a reference: its whole edit in the same shape as <editor_state> — every clip with its trims, speed, framing, grade, look, mask, keyframes and animations; the transition bars; titles, shapes and stickers with their keyframes; the soundtrack; the caption look and cues; aspect and background — plus each source's observed notes, transcript and asset id. Takes a project link (…/app/p/<id>), a share link (…/s/<token>), or a project id. The document IS the edit: never watch_video a reference to learn what its document already states; watch a reference source (project_link) only to see footage its notes leave dark. Every item carries its id, so replicate_project can bring the whole edit or just the items the user wants — a title, one clip's treatment, the music — and copy_project_media can bring files over on their own. Nothing in the open project changes.",inputSchema: obj({ link: str("Project link, share link, or project id") }, ["link"]),},{name: "replicate_project",description:- "Rebuild a reference project's edit in this project, once: the whole thing, or only `items` (ids from read_project — clips on any track, soundtrack clips, titles/shapes/stickers, cues, transition bars; a chosen clip brings the bars playing on it). Clips and layers land after the current end of track 0; free-standing items (a title alone, a music clip) drop in at the playhead, timed from the earliest of them. `media` maps the reference's source asset ids to this project's asset ids playing the same role (video for video or a still, audio for audio); every reference source the chosen items use and you did not map — music, stickers, images, fonts, and any footage you left unmapped — is copied from the reference into this project. Trims clamp to each mapped source's real length and every clamp is listed in `adjustments`: fix or report each one. With the whole edit, the reference's frame (aspect, background, fades) and caption look come too; with `items` they come only when frame / caption_look are true. Caption cues copy with the whole edit only when captions is true (this project's speech differs, so generate them after); with `items`, name the cue ids. Background removal on a reference clip stays behind. One undo step reverts every item and the caption look; the frame is a project setting, so set_aspect / set_background / set_project_fade put it back. Afterwards tune with the ordinary tools.",+ "Rebuild a reference project's edit in this project, once: the whole thing, or only `items` (ids from read_project — clips on any track, soundtrack clips, titles/shapes/stickers, cues, transition bars; a chosen clip brings the bars playing on it). Clips and layers land after the current end of track 0; free-standing items (a title alone, a music clip) drop in at the playhead, timed from the earliest of them. `media` maps the reference's source asset ids to this project's asset ids playing the same role (video for video or a still, audio for audio); every reference source the chosen items use and you did not map — music, stickers, images, fonts, and any footage you left unmapped — is copied from the reference into this project. Trims clamp to each mapped source's real length and every clamp is listed in `adjustments`: fix or report each one. With the whole edit, the reference's frame (aspect, background) and caption look come too; with `items` they come only when frame / caption_look are true. Caption cues copy with the whole edit only when captions is true (this project's speech differs, so generate them after); with `items`, name the cue ids. Background removal on a reference clip stays behind. One undo step reverts every item and the caption look; the frame is a project setting, so set_aspect / set_background put it back. Afterwards tune with the ordinary tools.",inputSchema: obj({link: str("The same link read_project took"),@@ -158,7 +158,7 @@ export const AI_PANEL_TOOLS = [["source_asset_id", "asset_id"]),},- frame: bool("Also set this project's aspect, background and fades to the reference's (default: true for the whole edit, false with items)"),+ frame: bool("Also set this project's aspect and background to the reference's (default: true for the whole edit, false with items)"),caption_look: bool("Also apply the reference's caption look — style, font, size, position, words per cue, word effects (default: true for the whole edit, false with items)"),captions: bool("With the whole edit, also copy the reference's caption cues (default false)"),},diff --git a/site/src/cut/components/ColorField.tsx b/site/src/cut/components/ColorField.tsxindex 7e90d9f3..5f81d037 100644--- a/site/src/cut/components/ColorField.tsx+++ b/site/src/cut/components/ColorField.tsx@@ -195,7 +195,7 @@ export function ColorField({}/** Saturation/value pad, hue rail, hex entry, and the eyedropper. */-function ColorPicker({+export function ColorPicker({value,onBegin,onLive,diff --git a/site/src/cut/components/Editor.tsx b/site/src/cut/components/Editor.tsxindex 0b66d6e6..f021e334 100644--- a/site/src/cut/components/Editor.tsx+++ b/site/src/cut/components/Editor.tsx@@ -456,8 +456,6 @@ export function Editor({overlays: unknown;subtitles: unknown;aspect: string;- fadeIn: number;- fadeOut: number;background: string;} | null = null;const unsub = useEditor.subscribe((s) => {@@ -470,8 +468,6 @@ export function Editor({s.overlays !== last.overlays ||s.subtitles !== last.subtitles ||s.aspect !== last.aspect ||- s.fadeIn !== last.fadeIn ||- s.fadeOut !== last.fadeOut ||s.background !== last.background);last = {assets: s.assets,@@ -480,8 +476,6 @@ export function Editor({overlays: s.overlays,subtitles: s.subtitles,aspect: s.aspect,- fadeIn: s.fadeIn,- fadeOut: s.fadeOut,background: s.background,};if (!changed) return; // first tick just primes the baseline@@ -641,8 +635,6 @@ export function Editor({s.aspect !== last.aspect ||s.guides !== last.guides ||s.guideLines !== last.guideLines ||- s.fadeIn !== (last.fadeIn ?? 0) ||- s.fadeOut !== (last.fadeOut ?? 0) ||s.background !== last.background ||s.publish.caption !== last.publish?.caption ||s.publish.tags !== last.publish?.tags ||diff --git a/site/src/cut/components/ExportDialog.tsx b/site/src/cut/components/ExportDialog.tsxindex 293e3894..1acc32be 100644--- a/site/src/cut/components/ExportDialog.tsx+++ b/site/src/cut/components/ExportDialog.tsx@@ -164,8 +164,6 @@ export function ExportDialog() {audioClips: s.audioClips,overlays: s.overlays,subtitles: s.subtitles,- fadeIn: s.fadeIn,- fadeOut: s.fadeOut,background: s.background,},settings@@ -189,8 +187,6 @@ export function ExportDialog() {audioClips: s.audioClips,overlays: s.overlays,subtitles: s.subtitles,- fadeIn: s.fadeIn,- fadeOut: s.fadeOut,background: s.background,},settings,diff --git a/site/src/cut/components/SidePanel.tools.ts b/site/src/cut/components/SidePanel.tools.tsindex b8a04401..ecbd4587 100644--- a/site/src/cut/components/SidePanel.tools.ts+++ b/site/src/cut/components/SidePanel.tools.ts@@ -1,7 +1,7 @@/*** The assistant's side-panel tools — opening and collapsing the tabs, the- * Media panel's filing and trash, and the Details tab's publish metadata and- * project fade — kept beside the side panel that hosts those views+ * Media panel's filing and trash, and the Details tab's publish metadata —+ * kept beside the side panel that hosts those views* (`MediaPanel` and `PublishPanel` live inside it). The catalog spreads this* list into the model's toolset and `aiTools.ts` keys its handlers on* `SidePanelToolName`.@@ -81,12 +81,6 @@ export const SIDE_PANEL_TOOLS = [handle: str("Creator handle without @"),}),},- {- name: "set_project_fade",- description:- "Set the whole video's fade in from black and/or fade out to black, in seconds (0 clears, max 2). Applied to the final picture and mix at the start/end of the cut, independent of which clip sits there.",- inputSchema: obj({ fadeIn: num("Fade-in seconds (omit to keep)"), fadeOut: num("Fade-out seconds (omit to keep)") }),- },{name: "set_background",description:diff --git a/site/src/cut/components/SidePanel.tsx b/site/src/cut/components/SidePanel.tsxindex 6c879dde..889f681c 100644--- a/site/src/cut/components/SidePanel.tsx+++ b/site/src/cut/components/SidePanel.tsx@@ -98,10 +98,7 @@ import {syncLinkedLibrary,} from "@/cut/lib/linkedLibrary";import { downloadMedia, isMediaFile, MEDIA_ACCEPT, revealMedia } from "@/cut/lib/media";-import { mediaUrl, TRANSITION_MAX } from "@/cut/lib/types";-import { parseSecondsInput } from "@/cut/components/ScrubValue";-import { ColorField } from "@/cut/components/ColorField";-import { ValueSlider } from "@/cut/components/ValueSlider";+import { mediaUrl } from "@/cut/lib/types";import {genPulseOverlay,isGenTab,@@ -2121,45 +2118,12 @@ function CopyChip({ text, label }: { text: string; label: string }) {);}-/** Whole-video fade slider: the project fade veils picture, titles, captions- * and the mix at the cut's start or end. It belongs to the cut rather than to- * any clip, so this — the one project-scoped panel — is where it lives. */-function ProjectFadeRow({ label, value, onChange }: {- label: string;- value: number;- onChange: (v: number) => void;-}) {- return (- <div className="flex items-center justify-between gap-3 text-[12px] text-muted-foreground">- {label}- <span className="flex items-center gap-2">- <ValueSlider- label={label}- sliderClassName={`project-${label.toLowerCase().replace(" ", "-")} data-horizontal:w-28`}- valueClassName="w-9"- value={value}- min={0}- max={TRANSITION_MAX}- step={0.1}- format={(v) => (v < 0.05 ? "Off" : `${v.toFixed(1)}s`)}- parse={(raw) => (raw.trim().toLowerCase() === "off" ? 0 : parseSecondsInput(raw))}- onDraft={onChange}- onCommit={onChange}- />- </span>- </div>- );-}-function PublishPanel() {const readOnly = useEditor((s) => s.readOnly);const publish = useEditor((s) => s.publish);const setPublish = useEditor((s) => s.setPublish);const notes = useEditor((s) => s.notes);const setNotes = useEditor((s) => s.setNotes);- const fadeIn = useEditor((s) => s.fadeIn);- const fadeOut = useEditor((s) => s.fadeOut);- const background = useEditor((s) => s.background);const tagsLine = normalizeTags(publish.tags);const combined = [publish.caption.trim(), tagsLine].filter(Boolean).join("\n\n");const count = combined.length;@@ -2169,32 +2133,6 @@ function PublishPanel() {<><PanelHead title="Details" /><ScrollArea className="min-h-0" contentClassName="flex flex-col gap-4 px-3.5 pb-4">- {!readOnly && (- <div className="flex flex-col gap-1.5">- <SectionTitle>Video</SectionTitle>- <ProjectFadeRow- label="Fade in"- value={fadeIn}- onChange={(v) => useEditor.getState().setProjectFade({ fadeIn: v })}- />- <ProjectFadeRow- label="Fade out"- value={fadeOut}- onChange={(v) => useEditor.getState().setProjectFade({ fadeOut: v })}- />- <div className="flex items-center justify-between gap-3 text-[12px] text-muted-foreground">- Background- <ColorField- value={background}- label="Background color"- onBegin={() => {}}- onLive={(c) => useEditor.getState().setBackground(c)}- onCommit={(c) => useEditor.getState().setBackground(c)}- />- </div>- </div>- )}-<div className="flex flex-col gap-1.5"><div className="flex items-center justify-between"><SectionTitle>Caption</SectionTitle>diff --git a/site/src/cut/components/TopBar.tsx b/site/src/cut/components/TopBar.tsxindex e3c5edc7..1a6516b8 100644--- a/site/src/cut/components/TopBar.tsx+++ b/site/src/cut/components/TopBar.tsx@@ -17,6 +17,10 @@ import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,+ DropdownMenuSeparator,+ DropdownMenuSub,+ DropdownMenuSubContent,+ DropdownMenuSubTrigger,DropdownMenuTrigger,} from "@/components/ui/dropdown-menu";import {@@ -38,6 +42,7 @@ import { useEnvironment } from "@/cut/lib/environment";import { useLocalPref } from "@/cut/lib/uiState";import { ASPECT_PRESETS, aspectLabel, aspectOrientation, normalizeAspect, parseRatio, type Aspect } from "@/cut/lib/types";import { cn } from "@/lib/utils";+import { COLOR_PRESETS, ColorPicker } from "@/cut/components/ColorField";import { CreditsPill } from "./CreditsPill";import { RecordDialog, type RecordMode } from "./RecordDialog";import { ShareDialog } from "./ShareDialog";@@ -77,6 +82,7 @@ export function TopBar({const hasPicture = useEditor((s) => projectDuration(s) > 0);const aspect = useEditor((s) => s.aspect);const projectName = useEditor((s) => s.projectName);+ const background = useEditor((s) => s.background);const saveState = useEditor((s) => s.saveState);const aiOpen = useEditor((s) => s.aiOpen);const [editing, setEditing] = useState(false);@@ -550,6 +556,33 @@ export function TopBar({// half-typed side is never settled out from under the user.onBlur={(e) => {if (!e.currentTarget.contains(e.relatedTarget as Node)) endEditing();+ <DropdownMenuSeparator />+ <DropdownMenuSub>+ <DropdownMenuSubTrigger>+ <span className="size-4 shrink-0 rounded-[4px] ring-1 ring-border" style={{ background }} />+ <span className="flex-1">Background</span>+ </DropdownMenuSubTrigger>+ <DropdownMenuSubContent className="w-56">+ {COLOR_PRESETS.map((c) => (+ <DropdownMenuItem key={c.hex} onClick={() => { useEditor.getState().pushHistory(); useEditor.getState().setBackground(c.hex); }}>+ <span className="size-4 shrink-0 rounded-[4px] ring-1 ring-border" style={{ background: c.hex }} />+ <span className="flex-1">{c.name}</span>+ {background.toUpperCase() === c.hex && <Check className="size-3.5 text-muted-foreground" />}+ </DropdownMenuItem>+ ))}+ <DropdownMenuSeparator />+ {/* Any other color: the picker lives in the menu, and its+ keystrokes stay out of the menu's typeahead. */}+ <div className="p-1.5" onKeyDown={(e) => e.stopPropagation()}>+ <ColorPicker+ value={background}+ onBegin={() => useEditor.getState().pushHistory()}+ onLive={(hex) => useEditor.getState().setBackground(hex)}+ onCommit={(hex) => useEditor.getState().setBackground(hex)}+ />+ </div>+ </DropdownMenuSubContent>+ </DropdownMenuSub>}}onKeyDown={(e) => {if (e.key === "Enter") commitCustom();diff --git a/site/src/cut/hooks/usePlayback.ts b/site/src/cut/hooks/usePlayback.tsindex a20e43bf..49d2a941 100644--- a/site/src/cut/hooks/usePlayback.ts+++ b/site/src/cut/hooks/usePlayback.ts@@ -12,7 +12,7 @@ import {import { headSrc, matteLumaToAlpha, retimeOf, smoothsAt, srcSpan } from "@donkeycut/effects-kit";import { blendInto, SYNTH_EDGE, synthWeight } from "@/cut/lib/frameSynth";import { playheadAt, previewAt, setPlayhead, subscribePlayhead } from "@/cut/lib/playhead";-import { assetIsSilent, clipCovers, projectFadeSeconds, rectOf } from "@/cut/lib/types";+import { assetIsSilent, clipCovers, rectOf } from "@/cut/lib/types";import type { ClipSpan, MediaAsset, VideoClip } from "@/cut/lib/types";import { SubjectMaskCompositor } from "@/cut/lib/behindPass";import { FrameCompositor, MISSING_FRAME, PENDING_FRAME, type Frame } from "@/cut/lib/composite";@@ -612,18 +612,6 @@ class Engine {);}- /** Whole-video fade gain at `t`: ramps 0→1 over the project fade-in and 1→0- * over the fade-out at the end of the cut. */- private projectFadeGain(t: number, total: number) {- const s = useEditor.getState();- const fadeIn = projectFadeSeconds(s.fadeIn, total);- const fadeOut = projectFadeSeconds(s.fadeOut, total);- let g = 1;- if (fadeIn > 0 && t < fadeIn) g = Math.min(g, Math.max(0, t / fadeIn));- if (fadeOut > 0 && t > total - fadeOut) g = Math.min(g, Math.max(0, (total - t) / fadeOut));- return Math.min(1, g);- }-/*** Everything audible at `t`, with the gain the frame plan gives it.*@@ -959,7 +947,6 @@ class Engine {this.stalledAt = 0;if (s.buffering) useEditor.setState({ buffering: false });}- const fadeGain = this.projectFadeGain(t, total);if (pendingMaster) {this.dirty = true;} else {@@ -970,7 +957,6 @@ class Engine {// publishes the matte the DOM's front subject-masked elements read.this.comp.subjectMatteProvider = (at) => this.behind.clipMatteOf(this.canvas, at);this.behind.draw(this.canvas, s.overlays, s.assets, t);- this.comp.drawProjectFade(fadeGain);// A paused draw is the picture standing still, which is when a// readback of it costs nothing anyone is watching; a play's first// frame is read back once the play stops and the frame is redrawn.@@ -984,7 +970,6 @@ class Engine {this.phase("warm");if (playing) {- this.mixer.setMasterGain(fadeGain);// The audio effect elements over this moment, each at the level its// window puts it at; the mixer carries them over the whole mix.this.mixer.setEffects(diff --git a/site/src/cut/lib/aiContext.test.ts b/site/src/cut/lib/aiContext.test.tsindex a5ca8a6f..03ea6220 100644--- a/site/src/cut/lib/aiContext.test.ts+++ b/site/src/cut/lib/aiContext.test.ts@@ -29,7 +29,7 @@ describe("describeDoc", () => {});expect(read.videoTrack[1]).toMatchObject({ id: "c1", colorGrade: { brightness: 5 }, animOut: { style: "zoom", seconds: 0.5 } });expect(read.subtitles).toMatchObject({ style: "bubble", size: 60, wordsPerCue: 3, wordHighlight: true, accentColor: "#FF3366" });- expect(read.project).toMatchObject({ id: "rich", name: "Rich edit", aspect: "16:9", background: "#102030", fadeIn: 0.3, fadeOut: 0.4 });+ expect(read.project).toMatchObject({ id: "rich", name: "Rich edit", aspect: "16:9", background: "#102030" });});test("carries no live-only fields", () => {diff --git a/site/src/cut/lib/aiContext.ts b/site/src/cut/lib/aiContext.tsindex 0388cf65..5bc54576 100644--- a/site/src/cut/lib/aiContext.ts+++ b/site/src/cut/lib/aiContext.ts@@ -288,8 +288,6 @@ export function describeDoc(doc: ProjectDoc, opts?: { fullCues?: boolean; chatIdsubtitleLane: 0,subtitleStatus: state.subtitles.cues.length > 0 ? "ready" : "idle",aspect: state.aspect ?? "9:16",- fadeIn: state.fadeIn,- fadeOut: state.fadeOut,background: state.background,guides: sanitizeGuides(doc.guides),guideLines: sanitizeGuideLines(doc.guideLines),@@ -316,8 +314,6 @@ interface DescribedState {subtitleLane: number;subtitleStatus: string;aspect: Aspect;- fadeIn: number;- fadeOut: number;background: string;guides: GuideId[];guideLines: GuideLines;@@ -382,8 +378,6 @@ function describeState(duration: r(duration),aspect: s.aspect,frame: `${frameOf(s.aspect).w}x${frameOf(s.aspect).h}`,- ...(s.fadeIn > 0 ? { fadeIn: r(s.fadeIn) } : {}),- ...(s.fadeOut > 0 ? { fadeOut: r(s.fadeOut) } : {}),background: s.background,// Every guide preset's safe area for this frame, whether or not it// shows, so placement can respect a platform's UI without a guide on:diff --git a/site/src/cut/lib/aiTools.ts b/site/src/cut/lib/aiTools.tsindex 8e394140..cd29847b 100644--- a/site/src/cut/lib/aiTools.ts+++ b/site/src/cut/lib/aiTools.ts@@ -823,8 +823,8 @@ const toolRuns: Record<BrowserToolName, ToolRun> = {capture_frame: async (s, input) => {// Composited through the render path, so the frame carries what the// finished file would carry — clips, transitions, effects, elements,- // captions, the project fade — rather than the preview's video layer- // with its DOM elements floating above it.+ // captions — the preview's video layer alone leaves its DOM elements+ // floating above it.const total = totalDuration(s.clips);const at = clamp(isNum(input.t) ? input.t : playheadAt(), 0, Math.max(0, total - 0.001));const frame = frameOf(s.aspect);@@ -837,8 +837,6 @@ const toolRuns: Record<BrowserToolName, ToolRun> = {audioClips: s.audioClips,overlays: s.overlays,subtitles: s.subtitles,- fadeIn: s.fadeIn,- fadeOut: s.fadeOut,background: s.background,},at,@@ -3158,7 +3156,6 @@ const toolRuns: Record<BrowserToolName, ToolRun> = {if (frame && t.project) {st.setAspect(t.project.aspect);st.setBackground(t.project.background);- st.setProjectFade({ fadeIn: t.project.fadeIn, fadeOut: t.project.fadeOut });}if (captionLook && captions && Object.keys(captions).length > 0) st.setSubtitlesView(captions);st.insertTemplate({ ...clamped, cues, id: "", addedAt: 0 }, assetIds, playheadAt());@@ -4212,17 +4209,6 @@ const toolRuns: Record<BrowserToolName, ToolRun> = {};},- set_project_fade: (s, input) => {- if (!isNum(input.fadeIn) && !isNum(input.fadeOut))- throw new ToolError("Pass fadeIn and/or fadeOut seconds (0 clears).");- s.setProjectFade({- ...(isNum(input.fadeIn) ? { fadeIn: input.fadeIn } : {}),- ...(isNum(input.fadeOut) ? { fadeOut: input.fadeOut } : {}),- });- const after = useEditor.getState();- return { fadeIn: after.fadeIn, fadeOut: after.fadeOut };- },-set_background: (s, input) => {const raw = typeof input.color === "string" ? input.color : "";const hex = projectBackground(raw);diff --git a/site/src/cut/lib/audioMix.ts b/site/src/cut/lib/audioMix.tsindex 960a899f..e602df5f 100644--- a/site/src/cut/lib/audioMix.ts+++ b/site/src/cut/lib/audioMix.ts@@ -105,9 +105,6 @@ export interface MixSpec {items: MixItem[];/** Audio effect elements over the finished mix, in timeline order. */effects?: MixEffect[];- /** Whole-project audio fades, seconds. */- fadeIn?: number;- fadeOut?: number;}export interface MixOptions {@@ -330,20 +327,6 @@ export async function renderMix(spec: MixSpec, opts: MixOptions): Promise<AudioBconst bus = ctx.createGain();ducked.connect(bus);- // The project fade is the last thing on the way out, matching the export's- // fade on the final mix.- const master = ctx.createGain();- const fadeIn = Math.max(0, spec.fadeIn ?? 0);- const fadeOut = Math.max(0, spec.fadeOut ?? 0);- master.gain.value = 1;- if (fadeIn > 0) {- master.gain.setValueAtTime(0, 0);- master.gain.linearRampToValueAtTime(1, fadeIn);- }- if (fadeOut > 0 && spec.duration > fadeOut) {- master.gain.setValueAtTime(1, spec.duration - fadeOut);- master.gain.linearRampToValueAtTime(0, spec.duration);- }// The effects run in series off the bus, each crossed in over its own// window: inside it the treated signal is heard, outside it the untouched// one, with the edges ramping so the switch cannot click.@@ -375,8 +358,7 @@ export async function renderMix(spec: MixSpec, opts: MixOptions): Promise<AudioBdry.connect(out);treated = out;}- treated.connect(master);- master.connect(ctx.destination);+ treated.connect(ctx.destination);/*** Fit a span to the time its clip occupies, keeping its pitch.diff --git a/site/src/cut/lib/backend/browser/router.ts b/site/src/cut/lib/backend/browser/router.tsindex 3b19d7d3..f6b2ca2d 100644--- a/site/src/cut/lib/backend/browser/router.ts+++ b/site/src/cut/lib/backend/browser/router.ts@@ -97,8 +97,6 @@ async function putProject(req: Request, id: string): Promise<Response> {aspect: normalizeAspect(body.aspect) ?? existing.aspect,guides: Array.isArray(body.guides) ? sanitizeGuides(body.guides) : existing.guides,guideLines: body.guideLines !== undefined ? sanitizeGuideLines(body.guideLines) : existing.guideLines,- fadeIn: typeof body.fadeIn === "number" ? body.fadeIn : existing.fadeIn,- fadeOut: typeof body.fadeOut === "number" ? body.fadeOut : existing.fadeOut,background: typeof body.background === "string" ? body.background : existing.background,subtitles:body.subtitles && typeof body.subtitles === "object" ? body.subtitles : existing.subtitles,diff --git a/site/src/cut/lib/composite.ts b/site/src/cut/lib/composite.tsindex 54122b34..321a291d 100644--- a/site/src/cut/lib/composite.ts+++ b/site/src/cut/lib/composite.ts@@ -259,13 +259,6 @@ export class FrameCompositor {this.fillVeil("0,0,0", amount, rect);}- /** The picture side of the project fade: a black veil over the whole frame —- * everything drawn this tick, on every track, at any time — matching the- * export's fade on the final composite. */- drawProjectFade(gain: number) {- this.fillBlackVeil(1 - gain);- }-/*** The clip's picture with its color grade and look grading applied, or the* raw image when there is nothing to apply. Mirrors the export's chain orderdiff --git a/site/src/cut/lib/exportClient.ts b/site/src/cut/lib/exportClient.tsindex c524418d..b2a382ad 100644--- a/site/src/cut/lib/exportClient.ts+++ b/site/src/cut/lib/exportClient.ts@@ -1298,8 +1298,6 @@ export async function buildExportPayload(target,...settings,duration,- fadeIn: doc.fadeIn ?? 0,- fadeOut: doc.fadeOut ?? 0,background: projectBackground(doc.background),clips,audio,@@ -1988,8 +1986,6 @@ export function docFirstSeconds(doc: ExportDoc, seconds: number): ExportDoc {.filter(starts).map((c) => (c.end <= seconds ? c : { ...c, end: seconds })),},- // A fade-out belongs to the end of the project, which the card cuts away.- fadeOut: 0,};}diff --git a/site/src/cut/lib/exportRender.ts b/site/src/cut/lib/exportRender.tsindex 0a9e5bce..66e664a0 100644--- a/site/src/cut/lib/exportRender.ts+++ b/site/src/cut/lib/exportRender.ts@@ -44,7 +44,7 @@ import { hasSubjectOverlays, SubjectMaskCompositor } from "./behindPass";import { createRasterCanvas, type RasterSurface } from "./raster";import { exportFrameSynth, SYNTH_EDGE, synthWeight, type FrameSynth } from "./frameSynth";import { renderElementPng } from "./textRender";-import { assetIsSilent, behindSubjectOverlay, clipCovers, frameOf, frontSubjectOverlay, isEffectOverlay, isTextOverlay, laneOf, overlayAnimStyle, projectBackground, projectFadeSeconds, rectOf, removalActive } from "./types";+import { assetIsSilent, behindSubjectOverlay, clipCovers, frameOf, frontSubjectOverlay, isEffectOverlay, isTextOverlay, laneOf, overlayAnimStyle, projectBackground, rectOf, removalActive } from "./types";import type { ClipAnim, ClipSpan, EffectOverlay, MediaAsset, Overlay, StickerOverlay } from "./types";import type { ExportDoc } from "./renderSnapshot";import type { ExportSettings } from "./exportClient";@@ -881,8 +881,6 @@ export function mixSpecFor(doc: ExportDoc, resolve: (asset: MediaAsset) => strinitems,// Audio effect elements treat the finished mix over their own windows.effects: audioFxSpans(doc.overlays, duration),- fadeIn: projectFadeSeconds(doc.fadeIn, duration),- fadeOut: projectFadeSeconds(doc.fadeOut, duration),};}@@ -892,16 +890,6 @@ export function mixHasSound(spec: MixSpec): boolean {return spec.clips.some((c) => c.file && !c.muted) || spec.items.some((i) => !i.muted);}-/** Whole-video fade gain at `t`, the picture's side of the project fade. */-function projectFadeGain(doc: ExportDoc, t: number, total: number): number {- const fadeIn = projectFadeSeconds(doc.fadeIn, total);- const fadeOut = projectFadeSeconds(doc.fadeOut, total);- let g = 1;- if (fadeIn > 0 && t < fadeIn) g = Math.min(g, Math.max(0, t / fadeIn));- if (fadeOut > 0 && t > total - fadeOut) g = Math.min(g, Math.max(0, (total - t) / fadeOut));- return Math.min(1, g);-}-/*** Render `doc` to an MP4 in scratch storage.*@@ -1469,7 +1457,6 @@ export class FramePainter {}await drawStamps(canvas, this.stacked.slice(drawn), stamps, t, this.behind);stamps.retire(t);- comp.drawProjectFade(projectFadeGain(doc, t, this.duration));}dispose(): void {diff --git a/site/src/cut/lib/fixtures/richDoc.ts b/site/src/cut/lib/fixtures/richDoc.tsindex 6059cebf..6c0ef8d2 100644--- a/site/src/cut/lib/fixtures/richDoc.ts+++ b/site/src/cut/lib/fixtures/richDoc.ts@@ -20,8 +20,6 @@ export function richDoc(): ProjectDoc {updatedAt: now,aspect: "16:9",background: "#102030",- fadeIn: 0.3,- fadeOut: 0.4,assets: [{id: "v0",diff --git a/site/src/cut/lib/previewMixer.ts b/site/src/cut/lib/previewMixer.tsindex f6497e88..bd0730db 100644--- a/site/src/cut/lib/previewMixer.ts+++ b/site/src/cut/lib/previewMixer.ts@@ -281,8 +281,8 @@ export class PreviewMixer {this.ctx = new AudioContext();this.master = this.ctx.createGain();this.master.connect(this.ctx.destination);- // Voices meet on the bus, the effect chains treat what is on it, and the- // project fade rides the sum — the order the export's ffmpeg graph has.+ // Voices meet on the bus and the effect chains treat what is on it —+ // the order the export's ffmpeg graph has.this.bus = this.ctx.createGain();this.bus.connect(this.master);}@@ -506,11 +506,6 @@ export class PreviewMixer {for (const live of this.voices.values()) this.stopWindows(live);}- /** The whole-project fade, over the finished mix. */- setMasterGain(g: number): void {- if (this.master) this.master.gain.value = Math.max(0, Math.min(1, g));- }-/*** Carry these audio effects over the bus, in the order given.*diff --git a/site/src/cut/lib/projectTemplate.test.ts b/site/src/cut/lib/projectTemplate.test.tsindex 83e6f131..ea4e9d1b 100644--- a/site/src/cut/lib/projectTemplate.test.ts+++ b/site/src/cut/lib/projectTemplate.test.ts@@ -42,7 +42,7 @@ describe("templateFromDoc", () => {expect(t.texts).toHaveLength(4);expect(t.cues).toHaveLength(2);expect(t.captions).toEqual({ showOnVideo: true, style: "bubble", size: 60, wordsPerCue: 3, wordHighlight: true, accentColor: "#FF3366", x: 0.5, y: 0.85 });- expect(t.project).toEqual({ aspect: "16:9", background: "#102030", fadeIn: 0.3, fadeOut: 0.4 });+ expect(t.project).toEqual({ aspect: "16:9", background: "#102030" });expect(t.duration).toBeCloseTo(RICH_CLIP_S / 1.25 + RICH_CLIP_S, 5);});diff --git a/site/src/cut/lib/projectTemplate.ts b/site/src/cut/lib/projectTemplate.tsindex e17bdbd8..d15eb0f5 100644--- a/site/src/cut/lib/projectTemplate.ts+++ b/site/src/cut/lib/projectTemplate.ts@@ -168,8 +168,6 @@ export function templateFromDoc(doc: ProjectDoc, opts: { items?: string[] } = {}project: {aspect: state.aspect ?? "9:16",background: state.background,- fadeIn: state.fadeIn,- fadeOut: state.fadeOut,},},assetByMedia,diff --git a/site/src/cut/lib/renderSnapshot.ts b/site/src/cut/lib/renderSnapshot.tsindex 52563e94..e7839772 100644--- a/site/src/cut/lib/renderSnapshot.ts+++ b/site/src/cut/lib/renderSnapshot.ts@@ -11,10 +11,6 @@ export type ExportDoc = {audioClips: AudioClip[];overlays: Overlay[];subtitles: SubtitlesBlock;- /** Whole-video fades (seconds): in from black / out to black on the final- * composite. */- fadeIn?: number;- fadeOut?: number;/** The frame's own color behind every clip and element (hex); absent = black. */background?: string;};@@ -33,7 +29,6 @@ export function captureRenderSnapshot(operation: ProjectOperation, doc: ExportDoexport function renderDoc(doc: ExportDoc): ExportDoc {return {aspect: doc.aspect, assets: doc.assets, clips: doc.clips, audioClips: doc.audioClips,- overlays: doc.overlays, subtitles: doc.subtitles, fadeIn: doc.fadeIn,- fadeOut: doc.fadeOut, background: doc.background,+ overlays: doc.overlays, subtitles: doc.subtitles, background: doc.background,};}diff --git a/site/src/cut/lib/stageFrame.ts b/site/src/cut/lib/stageFrame.tsindex a88a2d58..428b3370 100644--- a/site/src/cut/lib/stageFrame.ts+++ b/site/src/cut/lib/stageFrame.ts@@ -56,8 +56,6 @@ export async function renderStageFrame(at: number): Promise<Blob> {audioClips: s.audioClips,overlays: s.overlays,subtitles: s.subtitles,- fadeIn: s.fadeIn,- fadeOut: s.fadeOut,background: s.background,},at,diff --git a/site/src/cut/lib/store.ts b/site/src/cut/lib/store.tsindex d8782baa..5cb9c1a7 100644--- a/site/src/cut/lib/store.ts+++ b/site/src/cut/lib/store.ts@@ -403,10 +403,6 @@ export interface EditorState {guideLines: GuideLines;/** Guides stay chosen but draw nothing (⌘;). Not a doc field. */guidesHidden: boolean;- /** Whole-video fades, seconds (0 = off): in from black at the start, out to- * black at the end of the cut. Applied to the final picture and mix. */- fadeIn: number;- fadeOut: number;/** The frame's own color, behind every clip and element. A cut made of* nothing but titles and shapes plays over it, a fitted clip letterboxes* into it, and a gap on track 0 shows it. */@@ -508,11 +504,8 @@ export interface EditorState {addGuideLine: (axis: "v" | "h") => void;moveGuideLine: (axis: "v" | "h", index: number, at: number) => void;removeGuideLine: (axis: "v" | "h", index: number) => void;- /** Set the whole-video fade in/out (seconds; 0 clears). Like the aspect,- * project-level settings sit outside the undo history. */- setProjectFade: (patch: { fadeIn?: number; fadeOut?: number }) => void;/** Set the frame color. Project-level, so it sits outside undo like the- * aspect and the fades. */+ * aspect. */setBackground: (hex: string) => void;addAsset: (asset: MediaAsset) => void;updateAsset: (id: string, patch: Partial<MediaAsset>) => void;@@ -1308,8 +1301,6 @@ const DOC_KEYS = ["aspect","guides","guideLines",- "fadeIn",- "fadeOut","background","publish","notes",@@ -1692,8 +1683,6 @@ export const useEditor = create<EditorState>((baseSet, get, api) => {guides: [],guidesHidden: false,guideLines: EMPTY_GUIDE_LINES,- fadeIn: 0,- fadeOut: 0,background: DEFAULT_BACKGROUND,selection: null,multiSelection: [],@@ -1746,8 +1735,6 @@ export const useEditor = create<EditorState>((baseSet, get, api) => {guides: [],guidesHidden: false,guideLines: EMPTY_GUIDE_LINES,- fadeIn: 0,- fadeOut: 0,background: DEFAULT_BACKGROUND,selection: null,multiSelection: [],@@ -2068,8 +2055,6 @@ export const useEditor = create<EditorState>((baseSet, get, api) => {guides: sanitizeGuides(doc.guides),guidesHidden: false,guideLines: sanitizeGuideLines(doc.guideLines),- fadeIn: state.fadeIn,- fadeOut: state.fadeOut,background: state.background,// View state lives in IndexedDB; doc.ui covers projects saved// before the move.@@ -2338,15 +2323,6 @@ export const useEditor = create<EditorState>((baseSet, get, api) => {guideLines: { ...s.guideLines, [axis]: s.guideLines[axis].filter((_, i) => i !== index) },}));},- setProjectFade: (patch) => {- const clamp = (v: number | undefined) =>- v === undefined ? undefined : Math.max(0, Math.min(TRANSITION_MAX, v));- set((s) => ({- fadeIn: clamp(patch.fadeIn) ?? s.fadeIn,- fadeOut: clamp(patch.fadeOut) ?? s.fadeOut,- }));- },-setBackground: (hex) => set({ background: projectBackground(hex) }),addAsset: (asset) =>@@ -4861,8 +4837,6 @@ export function serializeDoc(s: {aspect: Aspect;guides: GuideId[];guideLines: GuideLines;- fadeIn: number;- fadeOut: number;background: string;publish: { caption: string; tags: string; soundTitle: string; handle: string };notes: { text: string; publishedAt: string; links: string[] };@@ -4885,8 +4859,6 @@ export function serializeDoc(s: {aspect: s.aspect,guides: s.guides,guideLines: s.guideLines,- fadeIn: s.fadeIn,- fadeOut: s.fadeOut,background: s.background,subtitles: s.subtitles,publish: { ...s.publish },@@ -5482,8 +5454,6 @@ export function normalizeDocState(overlays: Overlay[];subtitles: SubtitlesBlock;aspect: Aspect | null;- fadeIn: number;- fadeOut: number;background: string;} {const docClips = doc.clips ?? [];@@ -5550,8 +5520,6 @@ export function normalizeDocState(overlays: withLooks.overlays,subtitles: { ...subtitles, cues: merged.cues },aspect: normalizeAspect(doc.aspect) ?? null,- fadeIn: doc.fadeIn ?? 0,- fadeOut: doc.fadeOut ?? 0,background: projectBackground(doc.background),};}diff --git a/site/src/cut/lib/types.ts b/site/src/cut/lib/types.tsindex 443720f0..c15e5906 100644--- a/site/src/cut/lib/types.ts+++ b/site/src/cut/lib/types.ts@@ -692,14 +692,6 @@ export interface TimelineTransition {hidden?: boolean;}-/** Effective whole-video fade length: the stored seconds, capped at half the- * project so a fade-in and fade-out never overlap. The one clamp preview and- * export both apply, so a short project fades identically in the editor and the- * rendered file. */-export function projectFadeSeconds(fade: number | undefined, duration: number): number {- return Math.max(0, Math.min(fade ?? 0, duration / 2));-}-/** The frame color a project takes when it has not chosen one. Black is what* every cut rendered before the field existed, so an old document opens* looking exactly as it did. */@@ -1156,7 +1148,7 @@ export interface LibraryTemplate {* alone, and a replicate applies it. */captions?: CaptionLook;/** The frame the source was cut for, for a whole-project template. */- project?: { aspect: Aspect; background: string; fadeIn: number; fadeOut: number };+ project?: { aspect: Aspect; background: string };/** A saved sound treatment: a template carrying only this is a sound* preset (see soundPresets.ts), listed in the audio inspector and kept* off the template shelf. */@@ -1542,11 +1534,6 @@ export interface ProjectDoc {guides?: GuideId[];/** The custom guide lines, frame fractions per axis; absent = none. */guideLines?: GuideLines;- /** Whole-video fades, seconds: in from black at the start, out to black at- * the end. Applied to the final picture and mix (titles, captions, and- * soundtrack fade together), so they survive clip reordering. */- fadeIn?: number;- fadeOut?: number;/** The color of the frame itself, behind everything: what a text-and-graphics* cut plays over, what letterboxes a fitted clip, and what fills a gap in the* timeline. Hex; absent = `DEFAULT_BACKGROUND`. */diff --git a/site/src/cut/server/ai/catalog.ts b/site/src/cut/server/ai/catalog.tsindex 6e0a2ad2..edeb65ef 100644--- a/site/src/cut/server/ai/catalog.ts+++ b/site/src/cut/server/ai/catalog.ts@@ -187,7 +187,6 @@ Cutting speech well: pace is part of the message, and it is set in one place —Route the ask to the right feature:- set_transition: a styled join between one video clip and the next, blended across the cut. It never moves clips or shortens anything, and it plays only while the pair touches. One style, audiocross — the cross dissolve — blends the sound alone: the picture cuts while the two clips ramp equal-power past each other, half the length either side of the cut, each playing into the other's time out of the media its trim left behind, so the mix holds its loudness through the join (it plays at cuts only, so it does nothing on a clip's open head or tail; a clip trimmed to the end of its source has nothing to cross with and its side stops at the cut). In the UI it is picked from the Effects tab's Sound family, beside the treatments on the sound, and its bar sits across the cut rather than before it; every style that blends the picture is picked from the Transitions tab.- set_animation: one clip's own entrance ("in") or exit ("out") — the clip fades/zooms/pops/slides on its own edge. Never moves neighbors. For "fade this clip in", "make it slide in", use this. A wipe is a transition, not an animation.-- set_project_fade: the whole video fades in from black at the start and/or out to black at the end — picture and full mix (titles, captions, soundtrack). Survives clip reordering. For "fade in the video", "fade to black at the end", use this.- set_background: the color of the frame itself, behind everything, for the whole cut. For "make the background white", or any cut whose picture is titles and shapes rather than footage. Covered in the graphics skill.- update_audio fadeIn/fadeOut: audio-only ramps on one soundtrack clip ("fade the music out").- An ask beyond every preset here — a reference template, a grid or mosaic reveal, a multi-panel build — is a construction job: the graphics skill's composite-builds section shows how overlay video tracks, masks, and keyframes compose into it.@@ -404,11 +403,11 @@ The Library is shared across every project: folders, reusable assets, and templaAttachments: media files dropped on the chat import into project media by themselves; library attachments wait for library_add.`,"replicating-a-project": `# Replicating another project-A link to a Donkey Cut project (…/app/p/<id>) or a share (…/s/<token>) is a document you can read whole. read_project returns it in the editor_state shape — every clip with its id, trims, rate, framing, grade, look, mask, keyframes and animations; the transition bars; titles, shapes and stickers with their keyframes; the soundtrack; the caption look and cues; aspect, background and fades — and each source under \`media\` with its id, its observed notes and its transcript. \`unobserved\` lists video sources with neither. \`partial\` on a share names what its owner withheld.+A link to a Donkey Cut project (…/app/p/<id>) or a share (…/s/<token>) is a document you can read whole. read_project returns it in the editor_state shape — every clip with its id, trims, rate, framing, grade, look, mask, keyframes and animations; the transition bars; titles, shapes and stickers with their keyframes; the soundtrack; the caption look and cues; aspect and background — and each source under \`media\` with its id, its observed notes and its transcript. \`unobserved\` lists video sources with neither. \`partial\` on a share names what its owner withheld.The document is the edit. Never watch_video a reference to reconstruct what read_project already states. Watch a reference source (watch_video with project_link and its asset_id or clip_id) only to see footage whose notes leave its content unclear; that look decides a mapping and writes nothing to the reference.**Scope is the user's.** "Replicate this" is the whole edit; "use the title from this", "bring over the music", "grade my clip like theirs", "the caption style" are items. replicate_project takes \`items\` (any ids from read_project: clips on any track, soundtrack clips, elements, cues, transition bars) and brings only those, timed from the earliest; a chosen clip brings the bars playing on it. A single clip's treatment onto footage already here is a mapping: items:[that clip], media:[{source_asset_id, asset_id: the clip here}] — its grade, look, mask, keys and animations land on a new clip cut from the user's asset; delete the old one only if they asked for a replacement. A style alone with no clip — a grade, a caption look — is also readable straight off read_project and applied with the ordinary tools (set_color_grade, set_caption_look). Files alone go through copy_project_media.**Mapping roles.** Each reference source the chosen items use plays from one of this project's assets or copies across. Match by content — a talking-head source to the talking-head here, b-roll to b-roll — using the reference's notes and transcripts against this project's (\`media\` in editor_state, watch_video on anything unseen). One asset here may play several reference parts. Video and stills stand in for video; audio for audio. Leave unmapped whatever has no counterpart — music, stickers, images, fonts, a clip the user wants as-is — and it copies from the reference into this project, on a card in this chat.-**After replicate_project.** Clips land after the current end of track 0 (an empty project is the natural target; with a cut already there, say where the copy landed). Read \`adjustments\`: a trim clamped to a shorter source, a still holding a clip's length — fix or report each. Then make the edit the user's: rewrite each title's text for their subject (update_overlay), generate captions when the reference wore them (subtitles_generate; the caption look is already applied for the whole edit), refine_speech_cuts on the user's speech clips, and check a frame with capture_frame. With the whole edit the reference's aspect, background, fades and caption look come too; with \`items\` pass frame / caption_look when the user wants them. Background removal on a reference clip stays behind (its matte was baked from that footage): set_removal on the new clip when they want it.+**After replicate_project.** Clips land after the current end of track 0 (an empty project is the natural target; with a cut already there, say where the copy landed). Read \`adjustments\`: a trim clamped to a shorter source, a still holding a clip's length — fix or report each. Then make the edit the user's: rewrite each title's text for their subject (update_overlay), generate captions when the reference wore them (subtitles_generate; the caption look is already applied for the whole edit), refine_speech_cuts on the user's speech clips, and check a frame with capture_frame. With the whole edit the reference's aspect, background and caption look come too; with \`items\` pass frame / caption_look when the user wants them. Background removal on a reference clip stays behind (its matte was baked from that footage): set_removal on the new clip when they want it.Templates (save_template / template_add) ride the same rail and now keep grades, masks, keyframes, transitions and stickers; a whole-project template's frame and caption look are applied only by replicate_project.`,"publish-and-export": `# Publish & exportdiff --git a/site/src/cut/server/cloud/projects.ts b/site/src/cut/server/cloud/projects.tsindex 55b05269..e8315e3a 100644--- a/site/src/cut/server/cloud/projects.ts+++ b/site/src/cut/server/cloud/projects.ts@@ -227,8 +227,6 @@ export const projectsCloud = {aspect: normalizeAspect(body.aspect) ?? existing.aspect,guides: Array.isArray(body.guides) ? sanitizeGuides(body.guides) : existing.guides,guideLines: body.guideLines !== undefined ? sanitizeGuideLines(body.guideLines) : existing.guideLines,- fadeIn: typeof body.fadeIn === "number" ? body.fadeIn : existing.fadeIn,- fadeOut: typeof body.fadeOut === "number" ? body.fadeOut : existing.fadeOut,background: typeof body.background === "string" ? body.background : existing.background,subtitles:body.subtitles && typeof body.subtitles === "object" ? body.subtitles : existing.subtitles,diff --git a/site/src/cut/server/exportPipeline.e2e.test.ts b/site/src/cut/server/exportPipeline.e2e.test.tsindex 05e9ff7f..173e9194 100644--- a/site/src/cut/server/exportPipeline.e2e.test.ts+++ b/site/src/cut/server/exportPipeline.e2e.test.ts@@ -104,8 +104,6 @@ describe("export pipeline end to end", () => {crf: 30,preset: "ultrafast",duration: 6.1,- fadeIn: 0.3,- fadeOut: 0.3,background: "#102030",clips: [{diff --git a/site/src/cut/server/exportPipeline.test.ts b/site/src/cut/server/exportPipeline.test.tsindex 6c7f043b..1c2e29fb 100644--- a/site/src/cut/server/exportPipeline.test.ts+++ b/site/src/cut/server/exportPipeline.test.ts@@ -331,7 +331,6 @@ describe("export filtergraph timebases", () => {],audio: [{ file: "music.mp3", in: 0, out: 5, start: 0, volume: 0.8, fadeIn: 0.2 }],captions: [{ file: "cap1.png", start: 0, end: 2 }],- fadeIn: 0.5,});expect(g.join(";")).toContain("xfade=");expect(xfadeMismatches(g)).toEqual([]);diff --git a/site/src/cut/server/exportPipeline.ts b/site/src/cut/server/exportPipeline.tsindex 4d2c0a4d..8a3e5ac1 100644--- a/site/src/cut/server/exportPipeline.ts+++ b/site/src/cut/server/exportPipeline.ts@@ -6,7 +6,7 @@ import { atempoChain, audioChannels, hasStream, mediaDuration, num, videoColorInimport { assertGraphSafe, fexpr } from "./filterGraph";import { bakeRetimedAudio, setptsExpr, type BakedAudio } from "./retimeAudio";import { bakeTurnedMedia } from "./turnMedia";-import { CLIP_MAX_ZOOM, projectFadeSeconds, regionPx, TRANSITION_XFADE, TRANSITION_ZOOM, type ColorGrade, type TransitionStyle } from "../lib/types";+import { CLIP_MAX_ZOOM, regionPx, TRANSITION_XFADE, TRANSITION_ZOOM, type ColorGrade, type TransitionStyle } from "../lib/types";import { audioFxFilters, buildGradeLut, effectFilterLines, gradeKey, gradeNeedsLut, gradeToFfmpegFilter, isAudioEffect, lookFilterLines, lutToCube, mirrorRetimable, retimeOf, shortestTurn, slowRuns, srcSpan, sortedKeys, soundFilters, type ClipSound, type OverlayKey, type Retime, type SpeedNode } from "@donkeycut/effects-kit";// The render pipeline itself: spec in, finished mp4 out. Shared by the local@@ -77,10 +77,6 @@ export interface ExportSpec {* captions and elements sit where the timeline has them. */range?: ExportRange;duration: number;- /** Whole-video fades, seconds: in from black / out to black, applied to the- * final composite and mix after all overlays and soundtrack. */- fadeIn?: number;- fadeOut?: number;/** The frame's own color (hex): what letterboxes a fitted clip, what a gap* on track 0 plays, and what a cut of nothing but elements composites over.* Absent = black. */@@ -2355,24 +2351,6 @@ export async function runExport(aLabel = `afx${k}`;});- // Whole-video fades on the final composite and mix, so titles, captions,- // overlays, and soundtrack all fade together.- const fadeIn = projectFadeSeconds(spec.fadeIn, spec.duration);- const fadeOut = projectFadeSeconds(spec.fadeOut, spec.duration);- if (fadeIn > 0.01 || fadeOut > 0.01) {- const win = (f: string) =>- [- ...(fadeIn > 0.01 ? [`${f}=t=in:st=0:d=${num(fadeIn)}`] : []),- ...(fadeOut > 0.01- ? [`${f}=t=out:st=${num(Math.max(0, spec.duration - fadeOut))}:d=${num(fadeOut)}`]- : []),- ].join(",");- filters.push(`[${vLabel}]${win("fade")}[vfinal]`);- vLabel = "vfinal";- filters.push(`[${aLabel}]${win("afade")}[afinal]`);- aLabel = "afinal";- }-// A range is cut from the finished composite, so it carries what the// timeline shows there — fades, captions, and elements in place.const span = deliverySpan(spec.range, spec.duration);diff --git a/site/src/cut/server/http/projects.ts b/site/src/cut/server/http/projects.tsindex 4bee6009..d3161f4b 100644--- a/site/src/cut/server/http/projects.ts+++ b/site/src/cut/server/http/projects.ts@@ -138,8 +138,6 @@ export const projectsApi = {aspect: normalizeAspect(body.aspect) ?? existing.aspect,guides: Array.isArray(body.guides) ? sanitizeGuides(body.guides) : existing.guides,guideLines: body.guideLines !== undefined ? sanitizeGuideLines(body.guideLines) : existing.guideLines,- fadeIn: typeof body.fadeIn === "number" ? body.fadeIn : existing.fadeIn,- fadeOut: typeof body.fadeOut === "number" ? body.fadeOut : existing.fadeOut,background: typeof body.background === "string" ? body.background : existing.background,subtitles:body.subtitles && typeof body.subtitles === "object"