Video Caption Overlay for Openclaw

A professional Python-based utility to render animated, pill-style captions onto short-form videos using MoviePy and PIL.

zero2ai-hub
v1.0.0
Mar 1, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install skill-video-caption-overlay

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install skill-video-caption-overlay using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Video Caption Overlay?

The Video Caption Overlay skill is designed for developers and content creators using Openclaw Skills to programmatically generate social-media-ready videos. It eliminates the need for manual editing tools like Premiere or CapCut by using Python to overlay animated pill captions onto MP4 files. The skill specifically solves common programmatic design hurdles, such as the PIL textbbox y-offset bug, ensuring that text is perfectly centered within its background pill for a high-quality, professional finish.

By integrating this skill into your Openclaw Skills workflow, you can automate the production of TikTok ads, Instagram Reels, and YouTube Shorts with precise control over timing, typography, and styling. It supports multi-phase captioning, allowing you to stack lines, adjust opacities, and synchronize background audio seamlessly.

Video Caption Overlay Use Cases

  • Scaling video production for TikTok ads and Instagram Reels by automating caption rendering via Openclaw Skills.
  • Creating programmatic YouTube Shorts from raw footage using JSON-defined caption tracks.
  • Generating localized versions of marketing videos by swapping text and audio assets dynamically.
  • Fixing text alignment issues in automated video pipelines that rely on the Pillow library.

How Video Caption Overlay Works

  1. The user provides a base MP4 video, a specific captions JSON file, and an optional audio track.
  2. The skill parses the JSON data to identify 'phases' which define when specific text should appear and disappear.
  3. For each phase, the skill uses PIL (Pillow) to generate pill-shaped backgrounds and renders text with a custom coordinate fix to ensure perfect centering.
  4. MoviePy is utilized to composite these overlays onto the video frames at the designated start and end times.
  5. The final output is rendered into a high-quality MP4 file, incorporating any specified audio adjustments or fades.

Video Caption Overlay Setup

To get started with this component of Openclaw Skills, ensure you have the uv package manager installed. You can execute the overlay process using the following command:

uv run --with moviepy --with pillow scripts/overlay.py \
  --video base.mp4 \
  --output final.mp4 \
  --captions scripts/example_captions.json \
  --audio music.mp3

You can also provide custom font paths using the --font-black or --font-bold flags to align with your brand guidelines.

Video Caption Overlay Data Schema & Taxonomy

The skill utilizes a structured JSON format to manage caption data. Each phase represents a specific time window on the video timeline.

Field Description
start / end Start and end timestamps in seconds.
y_frac Vertical positioning (0.06 = top, higher values move down).
lines An array of text objects including text, size, bold, and bg (RGB color).
px / py Horizontal and vertical padding for the pill background.
r The border radius for the pill corners.

Video Caption Overlay Advanced Features

  • Advanced PIL textbbox compensation to fix vertical text alignment issues automatically.
  • Support for multi-line pill stacks within a single time phase for complex hook structures.
  • Dynamic audio integration with configurable start times and volume levels.
  • Flexible font fallback system compatible with standard Openclaw Skills environments.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*