video-tool

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Video Tool CLI

Video Tool CLI

AI-powered video processing toolkit with ffmpeg operations, Whisper transcription, and content generation.
基于AI的视频处理命令行工具包,集成ffmpeg操作、Whisper转录和内容生成功能。

Installation Status

安装状态

video-tool: !
which video-tool > /dev/null && echo "INSTALLED" || echo "NOT INSTALLED - run installation below"
uv: !
which uv > /dev/null && echo "INSTALLED" || echo "NOT INSTALLED"
If video-tool is not installed, run the installation commands below before proceeding.
video-tool: !
which video-tool > /dev/null && echo "INSTALLED" || echo "NOT INSTALLED - run installation below"
uv: !
which uv > /dev/null && echo "INSTALLED" || echo "NOT INSTALLED"
如果未安装video-tool,请先运行以下安装命令再继续。

Installation

安装步骤

bash
undefined
bash
undefined

Install uv first (if not installed)

先安装uv(如果未安装)

Install video-tool

安装video-tool

Dependencies

依赖项

  • ffmpeg: Required for all video operations (
    brew install ffmpeg
    on macOS)
  • yt-dlp: Required for video downloads (
    brew install yt-dlp
    on macOS)
  • ffmpeg: 所有视频操作的必备工具(macOS系统可通过
    brew install ffmpeg
    安装)
  • yt-dlp: 视频下载功能必备工具(macOS系统可通过
    brew install yt-dlp
    安装)

API Keys Setup

API密钥配置

Configure API keys (choose one method):
Option 1: Non-interactive (recommended for Claude Code)
bash
video-tool config keys --set groq_api_key=YOUR_KEY
video-tool config keys --set openai_api_key=YOUR_KEY
配置API密钥(可选以下任意一种方式):
方式1:非交互式配置(推荐Claude Code使用)
bash
video-tool config keys --set groq_api_key=YOUR_KEY
video-tool config keys --set openai_api_key=YOUR_KEY

Multiple at once:

批量设置多个密钥:

video-tool config keys --set groq_api_key=xxx --set openai_api_key=yyy

**Option 2: Edit credentials file directly**
If users prefer not to share keys with Claude Code, they can edit directly:
```bash
video-tool config keys --set groq_api_key=xxx --set openai_api_key=yyy

**方式2:直接编辑凭据文件**
如果用户不想与Claude共享密钥,可直接编辑文件:
```bash

File: ~/.config/video-tool/credentials.yaml

文件路径:~/.config/video-tool/credentials.yaml

openai_api_key: sk-xxx groq_api_key: gsk_xxx bunny_library_id: xxx bunny_access_key: xxx replicate_api_token: xxx

**Option 3: Interactive setup**
```bash
video-tool config keys
Required keys:
  • groq_api_key - Transcription (Whisper)
  • openai_api_key - Content generation (descriptions, timestamps)
Optional keys:
  • bunny_library_id, bunny_access_key - Bunny.net CDN uploads
  • replicate_api_token - Audio enhancement
bash
video-tool config keys --show   # View configured keys (masked)
video-tool config keys --reset  # Clear all credentials
openai_api_key: sk-xxx groq_api_key: gsk_xxx bunny_library_id: xxx bunny_access_key: xxx replicate_api_token: xxx

**方式3:交互式配置**
```bash
video-tool config keys
必填密钥:
  • groq_api_key - 用于转录功能(基于Whisper)
  • openai_api_key - 用于内容生成(描述、时间戳等)
可选密钥:
  • bunny_library_id, bunny_access_key - 用于Bunny.net CDN上传
  • replicate_api_token - 用于音频增强功能
bash
video-tool config keys --show   # 查看已配置的密钥(已掩码处理)
video-tool config keys --reset  # 清除所有凭据

IMPORTANT: Handling Authentication Errors

重要提示:身份验证错误处理

When a command fails with "AUTHENTICATION REQUIRED" or "API key not configured":
  1. DO NOT try to work around the issue by writing custom scripts
  2. DO NOT try to call APIs directly
  3. INSTEAD, offer the user two options using AskUserQuestion:
Option A: Provide key to Claude (convenient)
  • User gives you the API key directly
  • You run:
    video-tool config keys --set KEY_NAME=VALUE
  • Faster, but the key is visible in the conversation
Option B: User configures privately (more secure)
  • User runs the command themselves or edits the file directly
  • Key never appears in the conversation with Claude
  • Tell user to run:
    video-tool config keys
    (interactive)
  • Or edit:
    ~/.config/video-tool/credentials.yaml
Example AskUserQuestion prompt: "This command requires a [Groq/OpenAI] API key. How would you like to configure it?"
  • Option 1: "I'll provide the key" - convenient but key visible to Claude
  • Option 2: "I'll configure it myself" - more private, key stays hidden from Claude
After user configures (either way), retry the original command.
Commands that require credentials:
  • video-tool generate transcript
    → Requires Groq API key
  • video-tool video timestamps -m transcript
    → Requires OpenAI API key (structured output)
  • video-tool upload bunny-*
    → Requires Bunny.net credentials
  • video-tool video enhance-audio
    → Requires Replicate API token
  • video-tool upload x
    /
    video-tool upload twitter
    → Requires X OAuth credentials (run
    video-tool config x-auth
    )
  • video-tool upload linkedin
    → Requires LinkedIn access token + author URN (run
    video-tool config keys
    or pass flags)

当命令执行失败并提示"AUTHENTICATION REQUIRED"或"API key not configured"时:
  1. 请勿尝试通过编写自定义脚本绕过该问题
  2. 请勿尝试直接调用API
  3. 通过AskUserQuestion为用户提供以下两个选项:
选项A:向Claude提供密钥(便捷)
  • 用户直接向您提供API密钥
  • 您运行命令:
    video-tool config keys --set KEY_NAME=VALUE
  • 操作更快,但密钥会在对话中可见
选项B:用户自行私密配置(更安全)
  • 用户自行运行命令或直接编辑文件
  • 密钥永远不会出现在与Claude的对话中
  • 告知用户运行:
    video-tool config keys
    (交互式配置)
  • 或编辑文件:
    ~/.config/video-tool/credentials.yaml
示例AskUserQuestion提示: "该命令需要[Groq/OpenAI] API密钥,您希望如何配置?"
  • 选项1:"我将提供密钥" - 便捷但密钥对Claude可见
  • 选项2:"我将自行配置" - 更私密,密钥不会被Claude获取
用户完成配置后(无论哪种方式),重新尝试执行原命令。
需要凭据的命令:
  • video-tool generate transcript
    → 需要Groq API密钥
  • video-tool video timestamps -m transcript
    → 需要OpenAI API密钥(用于结构化输出)
  • video-tool upload bunny-*
    → 需要Bunny.net凭据
  • video-tool video enhance-audio
    → 需要Replicate API令牌
  • video-tool upload x
    /
    video-tool upload twitter
    → 需要X OAuth凭据(运行
    video-tool config x-auth
    配置)
  • video-tool upload linkedin
    → 需要LinkedIn访问令牌 + 作者URN(运行
    video-tool config keys
    或通过参数传递)

Content Generation: CLI Commands vs Direct Generation

内容生成:CLI命令 vs 直接生成

Some CLI commands use OpenAI to generate content. When Claude runs this skill, it's often better for Claude to generate content directly instead of calling another LLM.
部分CLI命令使用OpenAI生成内容。当Claude使用此工具时,通常直接由Claude生成内容比调用其他大语言模型效果更好。

Use CLI command (requires OpenAI API key):

使用CLI命令(需要OpenAI API密钥):

  • video timestamps -m transcript
    - Uses structured output for precise JSON
  • video timestamps -m transcript
    - 使用结构化输出生成精确的JSON格式

Generate directly as Claude (no OpenAI needed):

由Claude直接生成(无需OpenAI):

For these tasks, read the transcript/timestamps and generate content using the linked templates:
  • Description: See templates/description.md
  • SEO Keywords: See templates/seo-keywords.md
  • LinkedIn/Twitter Posts: See templates/social-posts.md
  • Context Cards: See templates/context-cards.md
对于以下任务,读取转录文本/时间戳并使用链接模板生成内容:
  • 描述:参考templates/description.md
  • SEO关键词:参考templates/seo-keywords.md
  • LinkedIn/Twitter动态:参考templates/social-posts.md
  • 上下文卡片:参考templates/context-cards.md

Note on CLI commands

CLI命令说明

The CLI has commands like
generate description
,
generate context-cards
that use OpenAI. These exist for manual CLI usage. If user explicitly requests a CLI command, honor the request (it may require OpenAI key). Otherwise, generate content directly.

CLI提供
generate description
generate context-cards
等使用OpenAI的命令,这些命令主要用于手动CLI操作。如果用户明确要求使用CLI命令,请遵循用户请求(可能需要OpenAI密钥)。否则,请直接生成内容。

Output Location

输出位置

Before generating files (transcripts, descriptions, timestamps, etc.), if not especified before, ask the user where to save them using AskUserQuestion.
Example prompt: "Where should I save the output files?"
  • Option 1: "Current directory" - save in
    .
    or
    ./output/
  • Option 2: "Same folder as video" - save alongside the source video
  • Option 3: "I'll specify a path" - user provides custom location
Default behavior if user doesn't specify: Ask rather than assuming temp directory.

在生成文件(转录文本、描述、时间戳等)之前,如果未指定位置,请通过AskUserQuestion询问用户保存位置。
示例提示: "输出文件应保存到哪里?"
  • 选项1:"当前目录" - 保存至
    .
    ./output/
  • 选项2:"视频所在文件夹" - 保存至源视频同一目录
  • 选项3:"我指定路径" - 用户提供自定义路径
如果用户未指定的默认行为: 询问用户而非默认保存到临时目录。

YouTube Authentication

YouTube身份验证

For YouTube uploads, run OAuth2 setup:
bash
video-tool config youtube-auth

如需上传至YouTube,请运行OAuth2设置:
bash
video-tool config youtube-auth

Command Reference

命令参考

Video Processing

视频处理

Download Video

下载视频

Download from YouTube or other supported sites.
bash
video-tool video download -u "URL" -o ./output/my-video.mp4
video-tool video download -u "URL" -o ./output/%(title)s.%(ext)s
OptionDescription
-u, --url
Video URL
-o, --output-path
Output file path (directory uses title template; default is
./output/%(title)s.%(ext)s
)
从YouTube或其他支持的网站下载视频。
bash
video-tool video download -u "URL" -o ./output/my-video.mp4
video-tool video download -u "URL" -o ./output/%(title)s.%(ext)s
选项描述
-u, --url
视频URL
-o, --output-path
输出文件路径(指定目录时使用标题模板;默认路径为
./output/%(title)s.%(ext)s

Get Video Info

获取视频信息

Get metadata: duration, resolution, codec, bitrate.
bash
video-tool video info -i video.mp4
获取元数据:时长、分辨率、编解码器、比特率。
bash
video-tool video info -i video.mp4

Remove Silence

移除静音片段

Remove silent segments from video.
bash
video-tool video silence-removal -i input.mp4 -o output.mp4 -t 1.0
OptionDescription
-i, --input
Input video
-o, --output-path
Output path
-t, --threshold
Min silence duration to remove (default: 1.0s)
移除视频中的静音片段。
bash
video-tool video silence-removal -i input.mp4 -o output.mp4 -t 1.0
选项描述
-i, --input
输入视频
-o, --output-path
输出路径
-t, --threshold
需移除的最小静音时长(默认:1.0秒)

Trim Video

修剪视频

Cut from start and/or end of video.
bash
video-tool video trim -i input.mp4 -o output.mp4 -s 00:00:10 -e 00:05:00
OptionDescription
-s, --start
Start timestamp (HH:MM:SS, MM:SS, or seconds)
-e, --end
End timestamp
-g, --gpu
Use GPU acceleration
修剪视频的开头和/或结尾部分。
bash
video-tool video trim -i input.mp4 -o output.mp4 -s 00:00:10 -e 00:05:00
选项描述
-s, --start
起始时间戳(格式:HH:MM:SS、MM:SS或秒数)
-e, --end
结束时间戳
-g, --gpu
使用GPU加速

Extract Segment

提取片段

Keep only a specific portion of video.
bash
video-tool video extract-segment -i input.mp4 -o output.mp4 -s 00:01:00 -e 00:02:30
仅保留视频中的特定片段。
bash
video-tool video extract-segment -i input.mp4 -o output.mp4 -s 00:01:00 -e 00:02:30

Cut Segment

切割片段

Remove a middle portion from video.
bash
video-tool video cut -i input.mp4 -o output.mp4 -f 00:01:00 -t 00:02:00
OptionDescription
-f, --from
Start of segment to remove
-t, --to
End of segment to remove
移除视频中间的特定片段。
bash
video-tool video cut -i input.mp4 -o output.mp4 -f 00:01:00 -t 00:02:00
选项描述
-f, --from
需移除片段的起始时间
-t, --to
需移除片段的结束时间

Change Speed

调整播放速度

Speed up or slow down video.
bash
video-tool video speed -i input.mp4 -o output.mp4 -f 1.5
OptionDescription
-f, --factor
Speed factor (0.25-4.0). 2.0=double, 0.5=half
-p, --preserve-pitch
Keep original audio pitch (default: yes)
加快或减慢视频播放速度。
bash
video-tool video speed -i input.mp4 -o output.mp4 -f 1.5
选项描述
-f, --factor
速度系数(0.25-4.0)。2.0=两倍速,0.5=半速
-p, --preserve-pitch
保持原音频音调(默认:开启)

Concatenate Videos

拼接视频

Join multiple videos into one.
bash
video-tool video concat -i ./clips/ -o ./output/final.mp4 -f
OptionDescription
-i, --input-dir
Directory containing videos
-o, --output-path
Output file path
-f, --fast-concat
Skip re-encoding (faster, requires same codec)
将多个视频合并为一个。
bash
video-tool video concat -i ./clips/ -o ./output/final.mp4 -f
选项描述
-i, --input-dir
包含视频片段的目录
-o, --output-path
输出文件路径
-f, --fast-concat
跳过重新编码(速度更快,要求所有视频使用相同编解码器)

Audio Operations

音频操作

Extract Audio

提取音频

Extract audio track to MP3.
bash
video-tool video extract-audio -i video.mp4 -o audio.mp3
将音轨提取为MP3格式。
bash
video-tool video extract-audio -i video.mp4 -o audio.mp3

Enhance Audio

增强音频

Improve audio quality using Resemble AI (requires Replicate API token).
bash
video-tool video enhance-audio -i input.mp4 -o enhanced.mp4
video-tool video enhance-audio -i input.mp4 -o denoised.mp4 -d  # denoise only
使用Resemble AI提升音频质量(需要Replicate API令牌)。
bash
video-tool video enhance-audio -i input.mp4 -o enhanced.mp4
video-tool video enhance-audio -i input.mp4 -o denoised.mp4 -d  # 仅降噪

Replace Audio

替换音轨

Swap audio track in a video.
bash
video-tool video replace-audio -v video.mp4 -a new_audio.mp3 -o output.mp4
替换视频中的音轨。
bash
video-tool video replace-audio -v video.mp4 -a new_audio.mp3 -o output.mp4

Transcription & Timestamps

转录与时间戳

Generate Transcript

生成转录文本

Create VTT captions using Groq Whisper (requires Groq API key).
bash
video-tool generate transcript -i video.mp4 -o transcript.vtt
使用Groq Whisper生成VTT字幕(需要Groq API密钥)。
bash
video-tool generate transcript -i video.mp4 -o transcript.vtt

Generate Timestamps

生成时间戳

Create chapter markers (requires OpenAI API key for transcript mode).
bash
undefined
创建章节标记(基于转录文本模式时需要OpenAI API密钥)。
bash
undefined

From video clips directory

从视频片段目录生成

video-tool video timestamps -m clips -i ./clips/ -o timestamps.json
video-tool video timestamps -m clips -i ./clips/ -o timestamps.json

From transcript

从转录文本生成

video-tool video timestamps -m transcript -i transcript.vtt -o timestamps.json -g medium
| Option | Description |
|--------|-------------|
| `-m, --mode` | `clips` or `transcript` |
| `-g, --granularity` | `low`, `medium`, `high` (transcript mode) |
| `-n, --notes` | Additional instructions for LLM |
video-tool video timestamps -m transcript -i transcript.vtt -o timestamps.json -g medium
| 选项 | 描述 |
|--------|-------------|
| `-m, --mode` | 模式:`clips`(片段)或`transcript`(转录文本) |
| `-g, --granularity` | 精细度:`low`(低)、`medium`(中)、`high`(高)(仅转录文本模式) |
| `-n, --notes` | 给大语言模型的额外说明 |

Uploads

上传功能

YouTube Upload

YouTube上传

Upload video as draft (requires OAuth2 auth via
video-tool config youtube-auth
).
bash
video-tool upload youtube-video -i video.mp4 -t "Title" -d "Description" -p private
video-tool upload youtube-video -i video.mp4 --metadata-path metadata.json
OptionDescription
-t, --title
Video title
-d, --description
Description text
--description-file
Read description from file
--tags
Comma-separated tags
--tags-file
Tags from file (one per line)
-c, --category
YouTube category ID (default: 27 Education)
-p, --privacy
private
(draft) or
unlisted
only
--thumbnail
Thumbnail image path
将视频作为草稿上传(需要通过
video-tool config youtube-auth
完成OAuth2身份验证)。
bash
video-tool upload youtube-video -i video.mp4 -t "Title" -d "Description" -p private
video-tool upload youtube-video -i video.mp4 --metadata-path metadata.json
选项描述
-t, --title
视频标题
-d, --description
描述文本
--description-file
从文件读取描述内容
--tags
逗号分隔的标签
--tags-file
从文件读取标签(每行一个)
-c, --category
YouTube分类ID(默认:27 教育)
-p, --privacy
隐私设置:仅支持
private
(草稿)或
unlisted
(不公开)
--thumbnail
缩略图图片路径

YouTube Metadata Update

YouTube元数据更新

Update existing video metadata.
bash
video-tool upload youtube-metadata -v VIDEO_ID --description-file description.md
更新现有视频的元数据。
bash
video-tool upload youtube-metadata -v VIDEO_ID --description-file description.md

YouTube Transcript Upload

YouTube转录文本上传

Add captions to YouTube video.
bash
video-tool upload youtube-transcript -v VIDEO_ID -t transcript.vtt -l en
为YouTube视频添加字幕。
bash
video-tool upload youtube-transcript -v VIDEO_ID -t transcript.vtt -l en

Bunny.net Uploads

Bunny.net上传

Upload to Bunny.net CDN (requires Bunny credentials via
config keys
).
bash
video-tool upload bunny-video -v video.mp4
video-tool upload bunny-transcript -v VIDEO_ID -t transcript.vtt
video-tool upload bunny-chapters -v VIDEO_ID -c timestamps.json
上传至Bunny.net CDN(需要通过
config keys
配置Bunny凭据)。
bash
video-tool upload bunny-video -v video.mp4
video-tool upload bunny-transcript -v VIDEO_ID -t transcript.vtt
video-tool upload bunny-chapters -v VIDEO_ID -c timestamps.json

X (Twitter) Post

X(原Twitter)动态发布

Post a thread to X (Twitter) (requires X OAuth via
video-tool config x-auth
).
bash
video-tool upload x --text "First post" --thread-item "Follow-up" --video-path video.mp4
video-tool upload twitter --text-file post.txt --thread-file thread.txt
OptionDescription
--text
/
--text-file
First post text
--thread-item
/
--thread-file
Additional thread items (repeatable or
---
delimiter)
--video-path
/
--video-url
Video file or URL to include
--output-dir
Output directory for metadata
发布推文线程至X(原Twitter)(需要通过
video-tool config x-auth
配置X OAuth凭据)。
bash
video-tool upload x --text "First post" --thread-item "Follow-up" --video-path video.mp4
video-tool upload twitter --text-file post.txt --thread-file thread.txt
选项描述
--text
/
--text-file
第一条推文文本
--thread-item
/
--thread-file
后续推文内容(可重复添加或使用
---
分隔)
--video-path
/
--video-url
要包含的视频文件或URL
--output-dir
元数据输出目录

LinkedIn Post

LinkedIn动态发布

Publish a LinkedIn post (requires LinkedIn credentials via
video-tool config keys
).
bash
video-tool upload linkedin --text-file post.md --video-path video.mp4
OptionDescription
--text
/
--text-file
Post text
--video-path
/
--video-url
Video file or URL to include
--output-dir
Output directory for metadata
--access-token
Override access token
--author-urn
Override author URN
发布动态至LinkedIn(需要通过
video-tool config keys
配置LinkedIn凭据)。
bash
video-tool upload linkedin --text-file post.md --video-path video.mp4
选项描述
--text
/
--text-file
动态文本
--video-path
/
--video-url
要包含的视频文件或URL
--output-dir
元数据输出目录
--access-token
覆盖已配置的访问令牌
--author-urn
覆盖已配置的作者URN

Full Pipeline

完整工作流

Run complete workflow: concat → timestamps → transcript → content → optional upload.
bash
video-tool pipeline -i ./clips/ -o ./output/ -t "Video Title" -y
OptionDescription
-f, --fast-concat
Fast concatenation
--timestamps-from-clips
Generate timestamps from clip names
-g, --granularity
Timestamp detail level
--upload-bunny
Upload to Bunny.net after processing
-y, --yes
Non-interactive mode
运行完整工作流:拼接 → 生成时间戳 → 转录 → 内容生成 → 可选上传。
bash
video-tool pipeline -i ./clips/ -o ./output/ -t "Video Title" -y
选项描述
-f, --fast-concat
快速拼接模式
--timestamps-from-clips
从片段文件名生成时间戳
-g, --granularity
时间戳精细度
--upload-bunny
处理完成后上传至Bunny.net
-y, --yes
非交互模式

Configuration

配置命令

bash
video-tool config keys                        # Configure API keys (interactive)
video-tool config keys --set KEY=VALUE        # Set key non-interactively
video-tool config keys --show                 # View configured keys
video-tool config llm                         # Configure LLM settings and persistent links
video-tool config x-auth                      # Set up X OAuth credentials
video-tool config youtube-auth                # Set up YouTube OAuth2
video-tool config youtube-status              # Check YouTube credentials

bash
video-tool config keys                        # 交互式配置API密钥
video-tool config keys --set KEY=VALUE        # 非交互式设置密钥
video-tool config keys --show                 # 查看已配置的密钥
video-tool config llm                         # 配置大语言模型设置和持久链接
video-tool config x-auth                      # 设置X OAuth凭据
video-tool config youtube-auth                # 设置YouTube OAuth2
video-tool config youtube-status              # 检查YouTube凭据状态

Command Templates for Skills

工具命令模板

Common tasks that other skills can reference by name.
其他工具可通过名称引用的常见任务模板。

Transcribe Video

视频转录

Generate VTT transcript from video/audio file.
bash
video-tool generate transcript -i <INPUT_FILE> -o <OUTPUT_FILE>
Inputs:
  • <INPUT_FILE>
    : Path to video or audio file
  • <OUTPUT_FILE>
    : Path to output VTT file
Requirements: Groq API key

从视频/音频文件生成VTT转录文本。
bash
video-tool generate transcript -i <INPUT_FILE> -o <OUTPUT_FILE>
输入参数:
  • <INPUT_FILE>
    : 视频或音频文件路径
  • <OUTPUT_FILE>
    : 输出VTT文件路径
要求: Groq API密钥

Concatenate Videos

视频拼接

Join multiple video clips into single file.
bash
video-tool video concat -i <INPUT_DIR> -o <OUTPUT_FILE> --fast-concat
Inputs:
  • <INPUT_DIR>
    : Directory with numbered clips (01-.mp4, 02-.mp4, etc.)
  • <OUTPUT_FILE>
    : Path to output video file
  • --fast-concat
    : Skip reprocessing (optional, recommended for speed)
Note: Clips must be named with numeric prefixes for correct ordering.

将多个视频片段合并为单个文件。
bash
video-tool video concat -i <INPUT_DIR> -o <OUTPUT_FILE> --fast-concat
输入参数:
  • <INPUT_DIR>
    : 包含编号片段的目录(如01-.mp4、02-.mp4等)
  • <OUTPUT_FILE>
    : 输出视频文件路径
  • --fast-concat
    : 跳过重新处理(可选,推荐用于提升速度)
注意: 片段必须以数字前缀命名以保证正确顺序。

Generate Timestamps from Clips

从片段生成时间戳

Create chapter timestamps from clip filenames.
bash
video-tool video timestamps --mode clips -i <INPUT_DIR> -o <OUTPUT_FILE>
Inputs:
  • <INPUT_DIR>
    : Directory with numbered clips
  • <OUTPUT_FILE>
    : Path to output JSON file
Output Format:
json
{
  "timestamps": [
    {"time": "00:00:00", "title": "Introduction"},
    {"time": "00:05:30", "title": "Main Content"}
  ]
}

从片段文件名创建章节时间戳。
bash
video-tool video timestamps --mode clips -i <INPUT_DIR> -o <OUTPUT_FILE>
输入参数:
  • <INPUT_DIR>
    : 包含编号片段的目录
  • <OUTPUT_FILE>
    : 输出JSON文件路径
输出格式:
json
{
  "timestamps": [
    {"time": "00:00:00", "title": "Introduction"},
    {"time": "00:05:30", "title": "Main Content"}
  ]
}

Upload to YouTube

上传至YouTube

Upload video with metadata to YouTube.
bash
video-tool upload youtube-video \
  -i <VIDEO_FILE> \
  -t "<TITLE>" \
  --description-file <DESCRIPTION_FILE> \
  --tags-file <TAGS_FILE> \
  --privacy <PRIVACY>
Inputs:
  • <VIDEO_FILE>
    : Path to video file
  • <TITLE>
    : Video title (quoted)
  • <DESCRIPTION_FILE>
    : Path to markdown description file
  • <TAGS_FILE>
    : Path to text file with tags (one per line)
  • <PRIVACY>
    :
    private
    ,
    unlisted
    , or
    public
Requirements: YouTube OAuth2 authentication (
video-tool config youtube-auth
)
Output: JSON with video_id and url (save to youtube-upload.json for publish skill)

将视频及元数据上传至YouTube。
bash
video-tool upload youtube-video \
  -i <VIDEO_FILE> \
  -t "<TITLE>" \
  --description-file <DESCRIPTION_FILE> \
  --tags-file <TAGS_FILE> \
  --privacy <PRIVACY>
输入参数:
  • <VIDEO_FILE>
    : 视频文件路径
  • <TITLE>
    : 视频标题(需加引号)
  • <DESCRIPTION_FILE>
    : 描述文件路径(Markdown格式)
  • <TAGS_FILE>
    : 标签文件路径(每行一个标签)
  • <PRIVACY>
    : 隐私设置:
    private
    unlisted
    public
要求: 已完成YouTube OAuth2身份验证(
video-tool config youtube-auth
输出: 包含video_id和url的JSON文件(保存为youtube-upload.json用于发布工具)

Common Workflows

常见工作流

See workflows.md for detailed examples.
详见workflows.md获取详细示例。