Agent Skills › ZJU-REAL/Easel › video-reframe

video-reframe

GitHub

智能转换视频画幅,支持横竖互转及多种比例。提供模糊背景、焦点裁切和人脸居中三种策略,自动处理分辨率对齐与音轨保留,适配各平台尺寸需求。

skills/openclaw/video-reframe/SKILL.md ZJU-REAL/Easel

Trigger Scenarios

横竖版互转 改成9:16 转竖屏 去黑边 适配平台尺寸 人脸居中裁

Install

npx skills add ZJU-REAL/Easel --skill video-reframe -g -y
More Options

Non-standard path

npx skills add https://github.com/ZJU-REAL/Easel/tree/main/skills/openclaw/video-reframe -g -y

Use without installing

npx skills use ZJU-REAL/Easel@video-reframe

指定 Agent (Claude Code)

npx skills add ZJU-REAL/Easel --skill video-reframe -a claude-code -g -y

安装 repo 全部 skill

npx skills add ZJU-REAL/Easel --all -g -y

预览 repo 内 skill

npx skills add ZJU-REAL/Easel --list

SKILL.md

Frontmatter
{
    "name": "video-reframe",
    "layer": "produce",
    "description": "智能转换视频画幅,支持 9:16\/16:9\/1:1、模糊背景填充、焦点裁切和人脸居中裁切。当用户说“横竖版互转、改成 9:16、转竖屏、去黑边、适配平台尺寸、人脸居中裁”时使用。通用简单裁切用 video-editing;逐段动态人脸跟随切片用 clipify。"
}

视频画幅智能转换(竖横互转)

把视频转到目标宽高比,三种策略可选。全部走 skills/shared/scripts/reframe.py, 不要手拼 crop/overlay 滤镜——脚本已算好裁切尺寸、焦点边界、偶数对齐、音轨保留。

模式 效果 适用
blur(默认) 原画完整居中 + 放大模糊的自身作背景,无黑边 横转竖最常用,画面不丢内容
crop 按焦点位置裁到目标比例,无黑边但裁边缘 主体明确、想铺满屏幕
smart cv2 检测人脸 → 以人脸中位位置为焦点裁切 口播/人物视频横转竖

需要逐镜头动态追踪人脸做 pan 见 clipify;只想加黑边/居中裁见 video-editing aspect。

输入

字段 必填 说明
视频文件 是 要转换的视频(没给就问)
目标比例 是 9:16 / 16:9 / 1:1 / 4:5 / 3:4 / 4:3 / 21:9
模式 否 blur(默认)/ crop / smart
焦点 否 crop 模式下主体不在中间时用 --focus-x(0 左 1 右)

输出(outputs/主题名/)

  • 转换后视频(*-<比例>.mp4)
  • 报告:源→目标尺寸、比例、所用策略、人脸焦点(smart 时)

执行步骤

脚本路径(相对项目根):skills/shared/scripts/reframe.py(reframe -h 看参数)。

# 横版转竖版,模糊背景填充(最稳,画面不丢)
python skills/shared/scripts/reframe.py reframe -i <视频> \
  -o outputs/主题名/<名>-9x16.mp4 --ratio 9:16 --mode blur

# 焦点裁切,主体偏右时把焦点拉到 0.65
python skills/shared/scripts/reframe.py reframe -i <视频> \
  -o outputs/主题名/<名>-9x16.mp4 --ratio 9:16 --mode crop --focus-x 0.65

# 人脸感知裁切(口播/人物视频)
python skills/shared/scripts/reframe.py reframe -i <视频> \
  -o outputs/主题名/<名>-9x16.mp4 --ratio 9:16 --mode smart

--size WxH 可强制最终分辨率(默认按比例与源分辨率推算,如 1280x720 → 720x1280)。

Profile 感知

  • 有 Profile:默认目标比例按 platforms.md 主平台(抖音/小红书竖版 9:16,B站横版 16:9, 朋友圈/ins 方形 1:1);口播/人物类账号默认 smart 模式。
  • 无 Profile:默认 blur 模式 + 询问目标平台/比例。

规则

  1. 拿不准选哪种:横转竖优先 blur(不丢画面);主体明确且想铺满用 crop;人物口播用 smart。
  2. smart 未检出人脸时自动退化为居中裁切,并在报告里说明。
  3. 音轨自动保留(copy),不重编码音频。
  4. 输出分辨率强制偶数对齐(H.264 要求),无需手动处理。
  5. 产物统一进 outputs/主题名/。

参考来源

模糊背景填充(blurred bars)是竖屏适配的主流做法;人脸感知裁切参考 AI-Youtube-Shorts-Generator 思路,用 OpenCV Haar 级联检测人脸中位位置定焦点。把裁切几何与边界钳制封装成确定性脚本。

Version History

  • 69c5928 Current 2026-09-08 17:40

Same Skill Collection

skills/openclaw/ai-image-gen/SKILL.md
skills/openclaw/ai-music/SKILL.md
skills/openclaw/ai-video-gen/SKILL.md
skills/openclaw/asset-manager/SKILL.md
skills/openclaw/audio-denoise/SKILL.md
skills/openclaw/audio-editing/SKILL.md
skills/openclaw/audio-mix/SKILL.md
skills/openclaw/audio-visualizer/SKILL.md
skills/openclaw/auto-short-video/SKILL.md
skills/openclaw/auto-subtitle/SKILL.md
skills/openclaw/batch-process/SKILL.md
skills/openclaw/beat-sync-video/SKILL.md
skills/openclaw/card-design/SKILL.md
skills/openclaw/card-quote/SKILL.md
skills/openclaw/card-xiaohongshu/SKILL.md
skills/openclaw/chart-visualization/SKILL.md
skills/openclaw/clipify/SKILL.md
skills/openclaw/comparison-card/SKILL.md
skills/openclaw/copywriting/SKILL.md
skills/openclaw/data-report/SKILL.md
skills/openclaw/doc-convert/SKILL.md
skills/openclaw/ecom-details-image/SKILL.md
skills/openclaw/green-screen/SKILL.md
skills/openclaw/gzh-design/SKILL.md
skills/openclaw/image-editing/SKILL.md
skills/openclaw/image-enhance/SKILL.md
skills/openclaw/infographic/SKILL.md
skills/openclaw/meme-generator/SKILL.md
skills/openclaw/mindmap/SKILL.md
skills/openclaw/multi-voice-dubbing/SKILL.md
skills/openclaw/novel-writer/SKILL.md
skills/openclaw/paper-explainer/SKILL.md
skills/openclaw/post-formatter/SKILL.md
skills/openclaw/poster-hero/SKILL.md
skills/openclaw/remove-bg/SKILL.md
skills/openclaw/roi-calculator/SKILL.md
skills/openclaw/short-drama/SKILL.md
skills/openclaw/skill-account-diagnosis/SKILL.md
skills/openclaw/skill-algorithm-updates/SKILL.md
skills/openclaw/skill-article-outline/SKILL.md
skills/openclaw/skill-audience-profiler/SKILL.md
skills/openclaw/skill-bilibili-upload/SKILL.md
skills/openclaw/skill-brand-onboarding/SKILL.md
skills/openclaw/skill-campaign-planner/SKILL.md
skills/openclaw/skill-carousel-planner/SKILL.md
skills/openclaw/skill-channels-upload/SKILL.md
skills/openclaw/skill-collab-proposal/SKILL.md
skills/openclaw/skill-comment-insights/SKILL.md
skills/openclaw/skill-community-ops/SKILL.md
skills/openclaw/skill-competitor-analysis/SKILL.md

Metadata

Files
0
Version
3fe2d99
Hash
1d253077
Indexed
2026-09-08 17:40

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-28 15:16
浙ICP备14020137号-1