跳到正文
cccskills
免费在 GitHub 公开

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.

中文简介正在准备中。当前显示原文说明。

BintzGavin/helios星标 123(GitHub 123 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md3.7 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Render Video Workflow

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.

The quick path: one command

npx -y @helios-project/cli@latest render composition.html -o output.mp4
  • The duration, fps and size come from the composition's window.helios. To set them yourself, pass --duration, --fps, --width and --height.
  • A page that draws itself with window.renderAt(t) needs --duration.
  • --audio track.mp3 adds a soundtrack.
  • A plain HTML file renders directly from disk. If a bundler has to build the composition, run npm run dev and pass its URL instead.

Use the script below only when you need a custom pipeline, such as input props, several audio tracks, or progress callbacks.

1. Prerequisites

The renderer needs a URL for the composition:

  • A file on disk: file:///path/to/composition.html
  • A dev server: npm run dev, e.g. http://localhost:3000/composition.html
  • Any other accessible URL

2. Create Render Script

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();

3. Run Render

Execute the script.

# If using ts-node
npx ts-node render.ts

# If using node (compiled js)
node render.js

Troubleshooting

"Page timeout" or "Connection refused"

  • Ensure the local server hosting the composition is running.
  • Check if the URL is correct and accessible in a regular browser.

"Black output" or "Empty video"

  • Ensure window.helios is exposed (or the page defines window.renderAt(t)).
  • If using mode: 'canvas', ensure you are drawing to a <canvas> element.
  • If using mode: 'dom', ensure elements are visible.

"Render hangs"

  • Check if the composition has errors in the browser console.
  • Enable tracing to debug:
    await renderer.render(url, out, { tracePath: 'trace.zip' });
    

Audio Issues

  • Ensure audio file paths are correct relative to where the script is run.
  • If using mode: 'dom' and relying on implicit audio (e.g. <audio> tags), ensure the elements are present in the DOM.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Story-first motion design philosophy for animated video: motion must earn its place; arc (establish, complicate, resolve); show vs tell; shots as units of thought; quiet vs loud motion; Disney principles with restraint; timing heuristics; composition; grammar by medium (product demos, logos, data viz, explainers); technical commitments (deterministic time, scrubbability, refs); cutting discipline; explicit anti-patterns. Use when planning, storyboarding, critiquing, or implementing programmatic or motion-driven video (Helios, Remotion, explainers, loops, UI capture, logo reveals), or when the user asks for motion direction, pacing, or visual-story structure.

中文简介正在准备中。当前显示原文说明。

BintzGavin/helios1232026年10月26日 更新

Find, preview, cut and credit archival B-roll from the Internet Archive (archive.org) for a Helios video — public-domain, CC BY and CC BY-SA film plus Prelinger Archives. Use when a Helios composition needs real footage as a plate, cutaway, masked fill or texture. Not for generating footage or editing the user's own camera video.

中文简介正在准备中。当前显示原文说明。

BintzGavin/helios1232026年10月26日 更新

End-to-end production plan template for feeling-first cinematic product promos: brief interrogation, 45s beat structure (cold open through brand), hero-element metaphor, storyboard fidelity ladder, visual system (palette, type, camera, texture), motion mix and easing vocabulary, audio and captions, tooling (animatic through HTML or AE), deliverables matrix, accessibility, review milestones, and compromises to accept or refuse. Use when planning, pitching, storyboarding, or producing polished brand films for any SaaS or consumer product—not category-specific; pair with skills/design/animated-video-philosophy for broader motion principles.

中文简介正在准备中。当前显示原文说明。

BintzGavin/helios1232026年10月26日 更新

Workflow for creating a new Helios composition. Use when building a new animation project or converting an existing animation to run in Helios.

中文简介正在准备中。当前显示原文说明。

BintzGavin/helios1232026年10月26日 更新

Patterns for using Helios with Vanilla Canvas API. Use when building high-performance 2D/3D animations without frameworks.

中文简介正在准备中。当前显示原文说明。

BintzGavin/helios1232026年10月26日 更新

Chart.js integration patterns for Helios. Use when creating animated data visualizations with Chart.js.

中文简介正在准备中。当前显示原文说明。

BintzGavin/helios1232026年10月26日 更新

查看 BintzGavin 的全部技能

报告此技能的问题