All skills
aktsmm avatar

/context-to-video

@848fd9b
by yamapanaktsmm/agent-skills26 stars
4

Turn any context (blog URL, pasted article, PR diff, meeting notes, release notes, raw prompt) into a narrated explainer mp4 with slides, subtitles, and optionally a talking-head avatar. Uses a free local stack (Pillow + edge-tts + ffmpeg) with optional SadTalker for the avatar. Use when the user says "動画化", "explainer video", "解説動画作って", "ブログを動画に", "記事を動画化", "PRを動画で説明", "議事録を動画化", "context to video", or wants an mp4 from arbitrary text/source. Output is mp4 + srt under the user's chosen project workspace.

Use this Skill: https://skilld.dev/gh/aktsmm/agent-skills/context-to-video

This session only. Nothing lands on disk.

referencessetup.md

≈618 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Setup

必須

pip install edge-tts imageio-ffmpeg pillow
  • edge-tts: Edge の Neural 音声を Python から呼ぶ非公式クライアント
  • imageio-ffmpeg: ffmpeg バイナリを Python パッケージとして同梱 (システムインストール不要)
  • pillow: 画像生成

フォント (Windows)

BIZ UDGothic は Windows 10/11 にプリインストール:

  • C:\Windows\Fonts\BIZ-UDGothicB.ttc (Bold)
  • C:\Windows\Fonts\BIZ-UDGothicR.ttc (Regular)

無い場合は Yu Gothic (YuGothB.ttc / YuGothR.ttc) に差し替え可。scripts/build_video.py の FONT_B / FONT_R を変更。

動作確認

python -c "import edge_tts, imageio_ffmpeg, PIL; print('ok')"

アバター(SadTalker)を使う場合の追加 PATH 注意

ffprobe が pydub に必要だが winget でインストールしてもセッションごとに PATH が引き継がれないことがある。スクリプト先頭で明示する:

$ffdir = (Get-ChildItem "$env:LOCALAPPDATA\Microsoft\WinGet\Packages\Gyan.FFmpeg*" -Recurse -Filter ffmpeg.exe | Select-Object -First 1).Directory.FullName
$env:PATH = "$ffdir;$env:PATH"

Python から呼ぶ場合は os.environ["PATH"] = FFMPEG_DIR + os.pathsep + os.environ["PATH"] を実行ファイルの先頭で行う。

トラブル

症状 対処
edge-tts で 401/403 一時的なエンドポイント制限。数分待つか別マシン
音声が無音 text が空文字。narration を確認
ffmpeg Conversion failed スライド PNG サイズ不一致。1920x1080 で再生成
文字化け script.json を UTF-8 (BOM 無し) で保存
日本語フォント崩れ .ttc パスを絶対指定、別フォントへフォールバック
concat で映像/音声ズレ セグメント mp4 の fps と sample rate を揃える (本スクリプトは 30fps / 44.1kHz aac で統一済み)
uv venv 直後の python で No module named pip uv pip install --python <venv>\Scripts\python.exe <pkg> を使う(-m pip ではなく uv pip)
pydub が FileNotFoundError: ffprobe ffmpeg だけでは不足。ffprobe を含む完全版を winget でインストール (Gyan.FFmpeg) し、PATH を明示
Failed to initialize NumPy: _ARRAY_API not found torch 2.1.2 cu121 を入れると NumPy 2.x が自動で入る。pip install "numpy==1.23.5" で強制ダウングレード

Source: SKILL.md on GitHub

1 warning1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill is functionally safe but possesses a surface for indirect prompt injection because it processes external content (URLs, PR diffs, and notes) using media generation tools without explicit content sanitization.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 2 issues

Signed by skilld at 848fd9b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 18 hours ago.

Activeupdated 3 months ago
argument-hint
入力(URL/テキスト/PR/メモ)、言語(JP/EN)、長さ目安、アバター要否、出力先パス
user-invocable
true
metadata
{
  "author": "yamapan"
}

README badge

README badge for aktsmm/agent-skills/context-to-video