← 返回
内容创作 中文

Skill Tiktok Ads Video

Generate TikTok-style short-form ad videos with animated pill captions. Takes a base MP4 (Veo/Runway/Kling), overlays animated captions with fade in/out, mix...
生成TikTok风格短视频广告,带有动画胶囊字幕。接收基础MP4视频(Veo/Runway/Kling),叠加动画字幕并配以淡入淡出效果,混合...
zero2ai-hub
内容创作 clawhub v2.1.0 2 版本 100000 Key: 无需
★ 0
Stars
📥 651
下载
💾 64
安装
2
版本
#latest

概述

skill-tiktok-ads-video v2.0.0

Animated pill-style caption overlays for short-form video. No Premiere, no CapCut — pure Python. v2 ships with built-in product presets — no more manual captions JSON.

Usage (v2 — product presets)

uv run --with moviepy --with pillow scripts/overlay.py \
  --video base.mp4 \
  --output final.mp4 \
  --product rain_cloud \
  --style subtitle_talk

Products

  • rain_cloud — Rain Cloud Humidifier
  • hydro_bottle — Hydrogen Water Bottle
  • mini_cam — Mini Clip Camera

Styles

  • phrase_slam — Bold full-screen phrase drops
  • subtitle_talk — Conversational subtitle-style captions
  • big_center — Large centered text with price bar at top. Best for bold product reveals.
  • random — Randomly picks a style

Optional audio

  --audio music.mp3 \
  --audio-start 8 \
  --audio-vol 0.5

No --audio keeps the original video audio.

Custom fonts

--font-black /path/to/Montserrat-Black.ttf \
--font-bold  /path/to/Montserrat-Bold.ttf

Falls back to Montserrat from ~/.local/share/fonts/ if not specified.

Legacy usage (v1 — manual captions JSON)

Still supported for backward compatibility:

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

PIL textbbox fix

PIL's textbbox((0,0), text, font) returns (x0, y0, x1, y1) where y0 is a non-zero offset (typically 7–15px depending on font size). Drawing text at (x, y) without compensating for this offset causes text to appear below the pill's visual center.

Fix implemented in pill():

bb    = draw.textbbox((0, 0), text, font=font)
x_off, y_off = bb[0], bb[1]
vis_w = bb[2] - bb[0]   # actual visual width
vis_h = bb[3] - bb[1]   # actual visual height

# Compensate offsets when drawing text
tx = cx - vis_w // 2 - x_off
ty = y - y_off
draw.text((tx, ty), text, font=font, fill=fg)

Emoji note

NotoColorEmoji.ttf fails with PIL at arbitrary sizes (bitmap font with limited supported sizes). Use text alternatives ("Free delivery" instead of "Free delivery 🚚") for reliable rendering.

版本历史

共 2 个版本

  • v2.1.0 当前
    2026-03-30 02:38 安全 安全
  • v2.0.0
    2026-03-07 02:01

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Trading Journal

zero2ai-hub
记录每笔交易的完整背景(逻辑、入场、出场、盈亏、情绪、教训),生成周度与月度业绩报告,并分析盈亏模式...
★ 2 📥 2,934
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,152
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 858 📥 199,502