Update README for clarity and enhance WorldDocument component with timing properties

Revised the README to replace "media compositor" with "multimedia editor" and improved the description of the `dapi` CLI. Enhanced the `WorldDocument` class in the JSX utility by updating the `setComponent` logic to conditionally handle trim properties based on the presence of timing attributes, improving the functionality of scene transcriptions. Updated the `CaptionsProps` type to include new timing properties for better integration.
This commit is contained in:
konstantin-paulus 2026-07-21 14:37:45 +02:00
parent dd5108a15e
commit fba355e052
3 changed files with 12 additions and 4 deletions

View File

@ -1,8 +1,8 @@
# Diffusion Studio
**FFmpeg for agents:** a media compositor you drive from the command line, with a generative-AI and vision toolchain built in.
**FFmpeg for agents:** a multimedia editor you drive from the command line, with generative AI and multimodal understanding built in.
What makes Diffusion Studio different is `dapi`, its CLI: every part of the editor (projects, the scene graph, the asset library, AI generation, rendering) is scriptable over a local socket, with JSON on stdout and deterministic exit codes.
What sets Diffusion Studio apart is `dapi`: a CLI that makes every part of the editor (projects, scene graphs, assets, AI generation, and rendering) scriptable over a local socket.
```sh
dapi open # use -b to run the editor headless

View File

@ -528,7 +528,14 @@ export class WorldDocument implements ProjectDocument<HostNode> {
assert(this.engine, "captioning requires an engine (author-mode mount)");
const { asset, trim } = await transcribeScene(this.engine, sceneEid);
setComponent(world, nodeEid, c.AssetId, asset.id);
setComponent(world, nodeEid, c.Trim, trim);
const props = this.data(nodeEid).props;
const hasIn = timingProp(props, "sourceIn") !== undefined;
const hasOut = timingProp(props, "sourceOut") !== undefined || timingProp(props, "end") !== undefined;
setComponent(world, nodeEid, c.Trim, {
start: hasIn ? c.Trim.start[nodeEid] : trim.start,
end: hasOut ? c.Trim.end[nodeEid] : trim.end,
});
}
}

View File

@ -378,5 +378,6 @@ export type SequenceProps = Pick<PatchProps, "name"> & {
export type CaptionsProps = Pick<
PatchProps,
"preset" | "colors" | "verticalAlign" | "offsetX" | "offsetY" | "src" | "start" | "animations"
| "preset" | "colors" | "verticalAlign" | "offsetX" | "offsetY" | "src"
| "start" | "end" | "sourceIn" | "sourceOut" | "animations"
>;