Communitygithub.com

BintzGavin/helios-skills

Helios コンポジションをレンダリングしてビデオファイルに出力するワークフロー。動画制作の自動化や高品質アニメーションのエクスポートに使用します。

helios-skills とは?

このスキルは、Helios プロジェクトのコンポジションをフレームごとにキャプチャし、MP4 などのビデオファイルにエンコードするレンダリングプロセスを自動化します。Node.js 環境で @helios-project/renderer パッケージを使用し、CLI のワンコマンドからカスタムスクリプトまで柔軟なワークフローを提供します。主なユースケースは、動画制作の自動化や高品質アニメーションのエクスポートであり、ファイルパスまたは開発サーバーの URL からコンポジションを指定できます。カスタムスクリプトでは、解像度、FPS、フレーム数、オーディオトラック、inputProps による動的コンテンツ、進行状況コールバックなどを細かく設定可能で、トラブルシューティングのためのトレース出力もサポートしています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/BintzGavin/helios-skills/tree/HEAD/skills/workflows/render-video

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

レンダリングビデオワークフロー

レンダリングは、コンポジションをフレームごとにキャプチャし、ビデオファイル(例:MP4)にエンコードするプロセスです。これは Node.js 環境で @helios-project/renderer パッケージを使用して行います。

クイックパス:1つのコマンド

npx -y @helios-project/cli@latest render composition.html -o output.mp4
  • 再生時間、FPS、サイズはコンポジションの window.helios から取得されます。自分で設定するには、--duration、--fps、--width、--height を渡します。
  • window.renderAt(t) で描画するページには --duration が必要です。
  • --audio track.mp3 でサウンドトラックを追加します。
  • プレーンな HTML ファイルはディスクから直接レンダリングされます。バンドラーでコンポジションをビルドする必要がある場合は、npm run dev を実行し、その URL を代わりに渡します。

以下のスクリプトは、入力プロパティ、複数のオーディオトラック、進行状況コールバックなどのカスタムパイプラインが必要な場合にのみ使用してください。

1. 前提条件

レンダラーにはコンポジションの URL が必要です:

  • ディスク上のファイル:file:///path/to/composition.html
  • 開発サーバー:npm run dev、例 http://localhost:3000/composition.html
  • その他アクセス可能な任意の URL

2. レンダースクリプトの作成

render.js(または ts-node を使用する場合は render.ts)という名前のファイルを作成します。

import { Renderer } from '@helios-project/renderer';
import path from 'path';

async function main() {
    // 1. 設定
    const compositionUrl = 'http://localhost:3000/composition.html';
    const outputPath = path.resolve('output.mp4');

    // 2. レンダラーの初期化
    const renderer = new Renderer({
        width: 1920,
        height: 1080,
        fps: 30,
        durationInSeconds: 10,
        // frameCount: 300, // オプション:durationInSeconds を正確なフレーム数で上書き
        mode: 'canvas', // アニメーションが CSS/HTML 要素を使用する場合は 'dom' を使用

        // オーディオ設定
        audioTracks: [
            { path: 'background.mp3', volume: 0.5 },
            { path: 'voiceover.wav', offset: 2 }
        ],
        audioCodec: 'aac',

        // 入力プロパティ(動的コンテンツ)
        inputProps: {
            title: 'カスタムレンダー',
            color: '#00ff00'
        }
    });

    console.log(`レンダリング開始:${compositionUrl}...`);

    // 3. レンダリングの実行
    try {
        await renderer.render(compositionUrl, outputPath, {
            onProgress: (p) => {
                const percent = Math.round(p * 100);
                process.stdout.write(`\r進行状況:${percent}%`);
            }
        });
        console.log(`\n完了! ${outputPath} に保存されました`);
    } catch (err) {
        console.error('\nレンダリング失敗:', err);
        process.exit(1);
    }
}

main();

3. レンダリングの実行

スクリプトを実行します。

# ts-node を使用する場合
npx ts-node render.ts

# node を使用する場合(コンパイル済み js)
node render.js

トラブルシューティング

「ページタイムアウト」または「接続拒否」

  • コンポジションをホストしているローカルサーバーが実行中であることを確認してください。
  • URL が正しく、通常のブラウザでアクセス可能か確認してください。

「黒い出力」または「空のビデオ」

  • window.helios が公開されていること(またはページが window.renderAt(t) を定義していること)を確認してください。
  • mode: 'canvas' を使用している場合、<canvas> 要素に描画していることを確認してください。
  • mode: 'dom' を使用している場合、要素が表示されていることを確認してください。

「レンダリングが停止する」

  • コンポジションにブラウザコンソールにエラーがないか確認してください。
  • トレースを有効にしてデバッグする:
    await renderer.render(url, out, { tracePath: 'trace.zip' });
    

オーディオの問題

  • オーディオファイルのパスがスクリプトの実行場所からの相対パスとして正しいことを確認してください。
  • mode: 'dom' を使用し、暗黙的なオーディオ(例:<audio> タグ)に依存している場合、要素が DOM に存在することを確認してください。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

BintzGavin/helios-skills

Make a video, MP4, GIF, animation, music video, short film, explainer, chart animation, product demo, logo reveal or social clip from code. Write one HTML page that draws any frame from its time t, render it frame-exact to MP4 with Helios, check stills and contact sheets, and add a soundtrack. Use whenever the user asks for a video or an animation file.

BintzGavin/helios-skills

>- 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/helios-skills

>- 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/helios-skills

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.

BintzGavin/helios-skills

Patterns for using Helios with GSAP (GreenSock). Use when integrating GSAP timelines with the Helios timeline for precise scrubbing and rendering.

BintzGavin/helios-skills

End-to-end guided workflow for creating an explainer or walkthrough video. Extracts brand identity from the repo, generates a measured soundtrack, and produces a narrative-driven motion.dev composition rendered via Helios CLI. Use when making how-it-works, feature walkthrough, or educational videos.

BintzGavin/helios-skills

Motion design framework for programmatic video. Defines anti-slideshow architecture, visual layering, physics-based easing, choreography rules, and quality validation. Reference this skill from any guided video skill.

BintzGavin/helios-skills

End-to-end guided workflow for creating a promotional hype video. Extracts brand identity from the repo, generates beat-synced music, and produces a high-energy motion.dev composition rendered via Helios CLI. Use when making brand-aligned promo or hype videos.

BintzGavin/helios-skills

End-to-end guided workflow for creating a social proof or testimonial video. Extracts brand identity from the repo, generates a warm soundtrack, and produces a trust-building motion.dev composition rendered via Helios CLI. Use when making customer testimonial, review highlight, or social proof videos.

関連スキル