视频:编辑、压缩和优化视频文件 - Openclaw Skills

作者:互联网

2026-03-25

AI快讯

什么是 视频处理与优化技能?

视频技能是为 Openclaw Skills 设计的强大工具集,使 AI 代理能够在本地处理复杂的视频编辑和优化任务。通过利用 FFmpeg 和 ffprobe 等强大的后端工具,它允许开发人员针对各种社交媒体平台自动执行格式转换、文件压缩和内容改制。

该技能专注于效率和质量,提供必要的逻辑和命令,以确保在遵守特定平台限制的同时提供高质量的输出。无论您是构建自动化媒体流水线,还是需要快速准备移动端内容,该技能都能无缝集成到您的 Openclaw Skills 工作流中,提供专业级的视频操作能力。

下载入口:https://github.com/openclaw/skills/tree/main/skills/ivangdavila/video

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install video

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 video。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

视频处理与优化技能 应用场景

  • 将横向视频内容改制为适用于 TikTok、YouTube Shorts 和 In@stagram Reels 的纵向格式。
  • 压缩大型视频文件,以便通过具有特定文件大小限制的 WhatsApp 等即时通讯应用进行分享。
  • 使用 Whisper AI 转录生成并烧录字幕,用于本地化内容。
  • 批量处理视频文件文件夹,以确保一致的编码格式、分辨率和音频标准。
  • 从特定视频片段中提取高质量音频轨道或创建优化后的 GIF。
视频处理与优化技能 工作原理
  1. 明确目标平台和特定的输出要求,如文件大小限制、分辨率或时长。
  2. 使用 ffprobe 分析源媒体,提取包括编码格式、码率和时长在内的技术元数据。
  3. 执行精确的 FFmpeg 命令来转换媒体,包括裁剪宽高比或调整 CRF 进行压缩。
  4. 根据初始要求验证处理后的文件,以确保兼容性和可播放性。
  5. 将最终优化后的文件交付给用户以供立即部署。

视频处理与优化技能 配置指南

要在您的 Openclaw Skills 环境中开始使用此技能,请确保您的系统中已安装核心二进制文件。

# 安装 FFmpeg 和 FFprobe (必需)
# macOS 用户:
brew install ffmpeg

# Ubuntu/Debian 用户:
sudo apt update && sudo apt install ffmpeg

# Windows 用户:
# 从 ffmpeg.org 下载二进制文件并添加到您的 PATH 中

如需增强功能,您可以安装可选依赖项:

# 安装 Whisper 用于 AI 驱动的字幕生成
pip install openai-whisper

视频处理与优化技能 数据架构与分类体系

该技能利用结构化的文档系统,在 Openclaw Skills 框架内高效管理复杂的 FFmpeg 参数和平台要求。

资源 描述
platforms.md YouTube、TikTok、In@stagram 和 WhatsApp 的具体技术规范。
commands.md 用于各种任务的精选 FFmpeg 命令模板库。
quality.md 压缩和码率管理的优化指南。
workflows.md 常见媒体处理用例的分步操作程序。
name: Video
slug: video
version: 1.0.1
description: Process, edit, and optimize videos for any platform with compression, format conversion, captioning, and repurposing workflows.
changelog: Declare required binaries (ffmpeg, ffprobe), add requirements section with optional deps, add explicit scope
metadata: {"clawdbot":{"emoji":"??","requires":{"bins":["ffmpeg","ffprobe"]},"os":["linux","darwin","win32"]}}

Requirements

Required:

  • ffmpeg / ffprobe — core video processing

Optional:

  • whisper — local transcription for captions
  • realesrgan — AI upscaling

Quick Reference

Situation Load
Platform specs (YouTube, TikTok, In@stagram) platforms.md
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?
  2. Check sourceffprobe for codec, resolution, duration, audio
  3. Process — FFmpeg for transformation
  4. Verify — Confirm output meets specs before delivering
  5. 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
In@stagram 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