# Hermes HTML Video MCP

CPU-friendly short-video generator for Hermes.

This connector is the first Hyperframes-style runtime:

1. Hermes writes the video structure: title, scenes, text, images, style.
2. The connector generates a deterministic HTML/CSS/JS timeline.
3. Playwright renders the page frame by frame.
4. ffmpeg combines frames into MP4.

It is designed for:

- Chinese information videos
- e-commerce selling-point videos
- tutorial/explainer videos
- poster motion graphics
- image-to-video with simple zoom/pan motion

It is not designed for:

- realistic human footage
- complex character action
- lip-sync or film-like AI video

## Tools

### `html_video_health_check`

Checks:

- Python Playwright import
- Chromium/browser launch
- ffmpeg availability
- output/runtime folders

### `html_video_generate`

Parameters:

- `title`: required main title
- `script`: optional long script; auto-split into scenes
- `scenes`: optional precise scene array
- `image_paths`: optional local images
- `style`: `tech_dark`, `festival`, `ecommerce`, `clean`
- `duration_seconds`: default from config
- `width` / `height`: default `1080x1920`
- `fps`: default `24`
- `voiceover`: reserved; currently returns `not_implemented`
- `execute`: `false` returns plan only; `true` renders MP4

Example:

```text
调用 html_video_generate，execute=true。
标题：为什么用 Hermes HTML Video？
脚本：随时改，改字改色重渲染即可。批量多语言，一套模板出多个国家版本。零剪辑，浏览器逐帧渲染成 MP4。
风格：tech_dark
时长：8 秒
尺寸：1080x1920
```

## Hermes MCP Config

Add this server in Hermes MCP settings:

```yaml
html-video:
  command: <Hermes安装目录>\resources\native-runtime\python\python.exe
  args:
    - -B
    - F:\Agent\Hermes-MCP-Connectors\connectors\html-video-mcp\run_server.py
  env:
    PYTHONPATH: F:\Agent\Hermes-MCP-Connectors\connectors\html-video-mcp\src
    PYTHONIOENCODING: utf-8
    HTML_VIDEO_MCP_CONFIG_PATH: F:\Agent\Hermes-MCP-Connectors\connectors\html-video-mcp\config\html_video.config.json
  cwd: F:\Agent\Hermes-MCP-Connectors\connectors\html-video-mcp
  timeout_seconds: 600
```

## Runtime Notes

The connector currently uses the ffmpeg bundled under:

```text
F:\Agent\Hermes-MCP-Connectors\runtimes\comfyui-video\ffmpeg\bin\ffmpeg.exe
```

If deploying to another user, update `config/html_video.config.json` if ffmpeg is installed elsewhere.

No WSL, Node, GPU, or ComfyUI model is required for this connector.
