一键导入
render-video
Workflow for rendering a Helios composition to a video file. Use when you need to automate video production or export a high-quality animation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Workflow for rendering a Helios composition to a video file. Use when you need to automate video production or export a high-quality animation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | render-video |
| description | Workflow for rendering a Helios composition to a video file. Use when you need to automate video production or export a high-quality animation. |
Rendering is the process of capturing a composition frame-by-frame and encoding it into a video file (e.g., MP4). This is done using the @helios-project/renderer package in a Node.js environment.
Ensure your composition is running. The renderer needs a URL to access the composition.
npm run dev (e.g., http://localhost:3000/composition.html)Create a file named render.js (or render.ts if using ts-node).
import { Renderer } from '@helios-project/renderer';
import path from 'path';
async function main() {
// 1. Configuration
const compositionUrl = 'http://localhost:3000/composition.html';
const outputPath = path.resolve('output.mp4');
// 2. Initialize Renderer
const renderer = new Renderer({
width: 1920,
height: 1080,
fps: 30,
durationInSeconds: 10,
// frameCount: 300, // Optional: Override durationInSeconds with exact frame count
mode: 'canvas', // Use 'dom' if your animation uses CSS/HTML elements
// Audio Configuration
audioTracks: [
{ path: 'background.mp3', volume: 0.5 },
{ path: 'voiceover.wav', offset: 2 }
],
audioCodec: 'aac',
// Input Props (Dynamic Content)
inputProps: {
title: "Custom Render",
color: "#00ff00"
}
});
console.log(`Starting render of ${compositionUrl}...`);
// 3. Execute Render
try {
await renderer.render(compositionUrl, outputPath, {
onProgress: (p) => {
const percent = Math.round(p * 100);
process.stdout.write(`\rProgress: ${percent}%`);
}
});
console.log(`\nDone! Saved to ${outputPath}`);
} catch (err) {
console.error('\nRender failed:', err);
process.exit(1);
}
}
main();
Execute the script.
# If using ts-node
npx ts-node render.ts
# If using node (compiled js)
node render.js
helios.bindToDocumentTimeline() is called in your composition.window.helios is exposed.mode: 'canvas', ensure you are drawing to a <canvas> element.mode: 'dom', ensure elements are visible.await renderer.render(url, out, { tracePath: 'trace.zip' });
mode: 'dom' and relying on implicit audio (e.g. <audio> tags), ensure the elements are present in the DOM.Collection of agent skills for Helios video engine. Use when working with programmatic video creation, browser-native animations, or Helios compositions. Install individual skills by path for specific capabilities.
Core API for Helios video engine. Use when creating compositions, managing timeline state, controlling playback, or subscribing to frame updates. Covers Helios class instantiation, signals, animation helpers, and DOM synchronization.
Patterns for using Helios with Vanilla Canvas API. Use when building high-performance 2D/3D animations without frameworks.
Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js.
Learn how to use D3.js with Helios for data visualization. Use when creating charts, graphs, or data-driven animations.
Patterns for using Helios with Framer Motion. Use when you want to use Framer Motion's physics and transitions but need frame-perfect synchronization with Helios.