重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
video-captioner by dkyazzentwatwa/chatgpt-skills
npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill video-captioner为视频添加文字叠加层、字幕和标题,完全控制位置、样式、时序和动画。
视频字幕和文字叠加层适用于:
from video_captioner import VideoCaptioner
# 添加简单的文字叠加层
captioner = VideoCaptioner()
captioner.load('video.mp4')
captioner.add_text(
text="Hello World!",
position='bottom',
font_size=48,
color='white'
)
captioner.save('captioned.mp4')
# 添加定时字幕
captioner.add_caption(
text="First caption",
start=0.0,
end=3.0,
position='bottom'
)
captioner.add_caption(
text="Second caption",
start=3.0,
end=6.0,
position='bottom'
)
captioner.save('with_captions.mp4')
# 导入 SRT 字幕
captioner.import_srt('subtitles.srt')
captioner.save('subtitled.mp4')
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 简单文字叠加层
python video_captioner.py input.mp4 --text "Subscribe!" --position bottom --output captioned.mp4
# 添加 SRT 字幕
python video_captioner.py input.mp4 --srt subtitles.srt --output subtitled.mp4
# 自定义样式
python video_captioner.py input.mp4 --text "Sale!" --font-size 72 --color red --bg-color black --position center --output promo.mp4
# 定时文字(JSON 格式)
python video_captioner.py input.mp4 --captions captions.json --output video_with_captions.mp4
class VideoCaptioner:
def load(self, filepath: str) -> 'VideoCaptioner'
def add_text(self, text: str, position: str = 'bottom',
font: str = 'Arial', font_size: int = 48,
color: str = 'white', bg_color: str = None,
outline: bool = True) -> 'VideoCaptioner'
def add_caption(self, text: str, start: float, end: float,
**style_kwargs) -> 'VideoCaptioner'
def import_srt(self, srt_filepath: str, **style_kwargs) -> 'VideoCaptioner'
def import_captions_json(self, json_filepath: str) -> 'VideoCaptioner'
def style_preset(self, preset: str) -> 'VideoCaptioner'
def preview_frame(self, time: float, output: str) -> str
def save(self, output: str, codec: str = 'libx264') -> str
def clear_captions(self) -> 'VideoCaptioner'
可用位置:
'top':顶部居中'bottom':底部居中(默认)'center':正中居中'top-left':左上角'top-right':右上角'bottom-left':左下角'bottom-right':右下角(x, y):自定义像素坐标(元组)Instagram Story:
captioner.style_preset('instagram-story')
# 白色文字,大字体,顶部位置,强描边
YouTube Subtitle:
captioner.style_preset('youtube')
# 黄色文字,中等字体,底部位置,黑色背景
Minimal:
captioner.style_preset('minimal')
# 白色文字,无背景,柔和阴影
Bold:
captioner.style_preset('bold')
# 大号白色文字,黑色背景框
创建 SRT 字幕文件:
1
00:00:00,000 --> 00:00:03,000
First subtitle text
2
00:00:03,000 --> 00:00:06,000
Second subtitle text
{
"captions": [
{
"text": "First caption",
"start": 0.0,
"end": 3.0,
"position": "bottom",
"font_size": 48,
"color": "white"
},
{
"text": "Second caption",
"start": 3.0,
"end": 6.0,
"position": "center",
"font_size": 60,
"color": "yellow"
}
]
}
带背景框的文字:
captioner.add_text(
text="Important!",
color='white',
bg_color='black',
font_size=60
)
带描边的文字:
captioner.add_text(
text="Subscribe",
color='yellow',
outline=True,
outline_color='black',
outline_width=2
)
半透明背景:
captioner.add_text(
text="Overlay text",
bg_color='rgba(0,0,0,128)', # 黑色,50% 不透明度
font_size=48
)
社交媒体视频:
# Instagram Reel 带居中文字
captioner.style_preset('instagram-story')
captioner.add_text("Check this out!", position='top')
教程视频:
# 添加分步说明
captioner.add_caption("Step 1: Open the app", 0, 5)
captioner.add_caption("Step 2: Click settings", 5, 10)
captioner.add_caption("Step 3: Enable feature", 10, 15)
无障碍性:
# 从 SRT 添加完整字幕
captioner.import_srt('subtitles.srt')
captioner.style_preset('youtube') # 高对比度以提高可读性
品牌标识:
# 添加持久水印
captioner.add_text(
"@username",
position='bottom-right',
font_size=24,
color='white',
outline=True
)
每周安装次数
67
代码仓库
GitHub 星标数
41
首次出现时间
Jan 24, 2026
安全审计
安装于
gemini-cli53
opencode53
codex49
cursor48
claude-code44
github-copilot44
Add text overlays, subtitles, and captions to videos with full control over positioning, styling, timing, and animation.
Video captioning and text overlays for:
from video_captioner import VideoCaptioner
# Add simple text overlay
captioner = VideoCaptioner()
captioner.load('video.mp4')
captioner.add_text(
text="Hello World!",
position='bottom',
font_size=48,
color='white'
)
captioner.save('captioned.mp4')
# Add timed captions
captioner.add_caption(
text="First caption",
start=0.0,
end=3.0,
position='bottom'
)
captioner.add_caption(
text="Second caption",
start=3.0,
end=6.0,
position='bottom'
)
captioner.save('with_captions.mp4')
# Import SRT subtitles
captioner.import_srt('subtitles.srt')
captioner.save('subtitled.mp4')
# Simple text overlay
python video_captioner.py input.mp4 --text "Subscribe!" --position bottom --output captioned.mp4
# Add SRT subtitles
python video_captioner.py input.mp4 --srt subtitles.srt --output subtitled.mp4
# Custom styling
python video_captioner.py input.mp4 --text "Sale!" --font-size 72 --color red --bg-color black --position center --output promo.mp4
# Timed text (JSON format)
python video_captioner.py input.mp4 --captions captions.json --output video_with_captions.mp4
class VideoCaptioner:
def load(self, filepath: str) -> 'VideoCaptioner'
def add_text(self, text: str, position: str = 'bottom',
font: str = 'Arial', font_size: int = 48,
color: str = 'white', bg_color: str = None,
outline: bool = True) -> 'VideoCaptioner'
def add_caption(self, text: str, start: float, end: float,
**style_kwargs) -> 'VideoCaptioner'
def import_srt(self, srt_filepath: str, **style_kwargs) -> 'VideoCaptioner'
def import_captions_json(self, json_filepath: str) -> 'VideoCaptioner'
def style_preset(self, preset: str) -> 'VideoCaptioner'
def preview_frame(self, time: float, output: str) -> str
def save(self, output: str, codec: str = 'libx264') -> str
def clear_captions(self) -> 'VideoCaptioner'
Available positions:
'top': Top center'bottom': Bottom center (default)'center': Middle center'top-left': Top left corner'top-right': Top right corner'bottom-left': Bottom left corner'bottom-right': Bottom right corner(x, y): Custom pixel coordinates (tuple)Instagram Story:
captioner.style_preset('instagram-story')
# White text, large font, top position, strong outline
YouTube Subtitle:
captioner.style_preset('youtube')
# Yellow text, medium font, bottom position, black background
Minimal:
captioner.style_preset('minimal')
# White text, no background, subtle shadow
Bold:
captioner.style_preset('bold')
# Large white text, black background box
Create SRT subtitle files:
1
00:00:00,000 --> 00:00:03,000
First subtitle text
2
00:00:03,000 --> 00:00:06,000
Second subtitle text
{
"captions": [
{
"text": "First caption",
"start": 0.0,
"end": 3.0,
"position": "bottom",
"font_size": 48,
"color": "white"
},
{
"text": "Second caption",
"start": 3.0,
"end": 6.0,
"position": "center",
"font_size": 60,
"color": "yellow"
}
]
}
Text with Background Box:
captioner.add_text(
text="Important!",
color='white',
bg_color='black',
font_size=60
)
Text with Outline:
captioner.add_text(
text="Subscribe",
color='yellow',
outline=True,
outline_color='black',
outline_width=2
)
Semi-transparent Background:
captioner.add_text(
text="Overlay text",
bg_color='rgba(0,0,0,128)', # Black, 50% opacity
font_size=48
)
Social Media Videos:
# Instagram reel with centered text
captioner.style_preset('instagram-story')
captioner.add_text("Check this out!", position='top')
Tutorial Videos:
# Add step-by-step instructions
captioner.add_caption("Step 1: Open the app", 0, 5)
captioner.add_caption("Step 2: Click settings", 5, 10)
captioner.add_caption("Step 3: Enable feature", 10, 15)
Accessibility:
# Add full subtitles from SRT
captioner.import_srt('subtitles.srt')
captioner.style_preset('youtube') # High contrast for readability
Branding:
# Add persistent watermark
captioner.add_text(
"@username",
position='bottom-right',
font_size=24,
color='white',
outline=True
)
Weekly Installs
67
Repository
GitHub Stars
41
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli53
opencode53
codex49
cursor48
claude-code44
github-copilot44
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
50,200 周安装
Gemini API 音频视频转录工具 - 支持 YouTube URL 和本地文件,输出结构化 Markdown 字幕
103 周安装
Bun 专家指南:运行时、包管理、测试与打包工具全解析 | 高性能 JavaScript/TypeScript 开发
103 周安装
QR/条形码读取器 - 支持多格式批量扫描的Python库,自动图像预处理与数据导出
103 周安装
前端设计技能:创建独特、生产级UI界面,告别AI生成美学,实现创意前端开发
103 周安装
A股量化分析必备:AkShare股票数据接口使用指南,实时行情、历史K线、财务数据、资金流向全解析
105 周安装
OpenRLHF高性能RLHF训练框架:基于Ray的分布式强化学习人类反馈优化
110 周安装