Requirements
Required:
- -
ffmpeg / ffprobe — core video processing
Optional:
- -
whisper — local transcription for captions - INLINECODE3 — AI upscaling
Quick Reference
| Situation | Load |
|---|
| Platform specs (YouTube, TikTok, Instagram) | INLINECODE4 |
| FFmpeg commands by task |
commands.md |
| Quality/compression settings |
quality.md |
| Workflow by use case |
workflows.md |
Core Capabilities
| Task | Method |
|---|
| Convert/compress | FFmpeg (see commands.md) |
| Generate captions |
Whisper → SRT/VTT |
| Change aspect ratio | Crop, pad, or smart reframe |
| Clean audio | Normalize, denoise, enhance |
| Batch operations | Process entire folders in one run |
Execution Pattern
- 1. Clarify target — What platform? What format? File size limit?
- Check source —
ffprobe for codec, resolution, duration, audio - Process — FFmpeg for transformation
- Verify — Confirm output meets specs before delivering
- Deliver — Provide file to user
Common Requests → Actions
| User says | Agent does |
|---|
| "Make this work for TikTok" | Reframe to 9:16, check duration ≤3min, compress |
| "Add subtitles" |
Whisper → SRT → burn-in or deliver separately |
| "Compress for WhatsApp" | Target <64MB, H.264, AAC |
| "Extract audio" |
-vn -acodec mp3 or
-acodec copy |
| "Make a GIF" | Extract frames, optimize palette, loop |
| "Split into clips" | Cut at timestamps with
-ss and
-t |
Quality Rules
- - Always re-encode audio to AAC for maximum compatibility
- Use
-movflags +faststart for web playback - CRF 23 is good default for H.264 (lower = better, bigger)
- Check before delivering — verify duration, file size, playability
Platform Quick Reference
| Platform | Aspect | Max Duration | Max Size |
|---|
| TikTok | 9:16 | 3 min | 287MB |
| Instagram Reels |
9:16 | 90s | 250MB |
| YouTube Shorts | 9:16 | 60s | No limit |
| YouTube | 16:9 | 12h | 256GB |
| WhatsApp | Any | 3 min | 64MB |
Scope
This skill:
- - Processes video files user explicitly provides
- Runs FFmpeg commands on user request
- Does NOT access files without user instruction
- Does NOT upload to external services automatically
要求
必需:
- - ffmpeg / ffprobe — 核心视频处理
可选:
- - whisper — 本地字幕转录
- realesrgan — AI 超分辨率
快速参考
| 场景 | 参考文件 |
|---|
| 平台规格(YouTube、TikTok、Instagram) | platforms.md |
| 按任务分类的 FFmpeg 命令 |
commands.md |
| 质量/压缩设置 | quality.md |
| 按用例分类的工作流程 | workflows.md |
核心功能
| 任务 | 方法 |
|---|
| 转换/压缩 | FFmpeg(参见 commands.md) |
| 生成字幕 |
Whisper → SRT/VTT |
| 更改宽高比 | 裁剪、填充或智能重构图 |
| 音频清理 | 标准化、降噪、增强 |
| 批量操作 | 一次性处理整个文件夹 |
执行流程
- 1. 明确目标 — 什么平台?什么格式?文件大小限制?
- 检查源文件 — 使用 ffprobe 检查编码器、分辨率、时长、音频
- 处理 — 使用 FFmpeg 进行转换
- 验证 — 在交付前确认输出符合规格
- 交付 — 向用户提供文件
常见请求 → 操作
| 用户说 | 智能体执行 |
|---|
| 让这个适配 TikTok | 重构图至 9:16,检查时长 ≤3 分钟,压缩 |
| 添加字幕 |
Whisper → SRT → 嵌入字幕或单独交付 |
| 为 WhatsApp 压缩 | 目标 <64MB,H.264,AAC |
| 提取音频 | -vn -acodec mp3 或 -acodec copy |
| 制作 GIF | 提取帧,优化调色板,循环播放 |
| 分割成片段 | 使用 -ss 和 -t 在时间戳处剪切 |
质量规则
- - 始终将音频重新编码为 AAC 以获得最大兼容性
- 使用 -movflags +faststart 以支持网页播放
- CRF 23 是 H.264 的良好默认值(数值越低质量越好,文件越大)
- 交付前检查 — 验证时长、文件大小、可播放性
平台快速参考
| 平台 | 宽高比 | 最大时长 | 最大大小 |
|---|
| TikTok | 9:16 | 3 分钟 | 287MB |
| Instagram Reels |
9:16 | 90 秒 | 250MB |
| YouTube Shorts | 9:16 | 60 秒 | 无限制 |
| YouTube | 16:9 | 12 小时 | 256GB |
| WhatsApp | 任意 | 3 分钟 | 64MB |
范围
本技能:
- - 处理用户明确提供的视频文件
- 根据用户请求运行 FFmpeg 命令
- 未经用户指示不会访问文件
- 不会自动上传到外部服务