跳到正文
cccskills
免费在 GitHub 公开

video-reframe

Convert videos to portrait, landscape, or square formats using blurred backgrounds, a chosen crop position, or face detection. Keep the original audio and receive a converted video plus a report of the dimensions and method used.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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

查看安装方法

适用场景

  • Convert landscape video to portrait with a blurred background
  • Crop a talking-head video around the detected face
  • Create square videos for a posting platform
  • Adjust the crop position for an off-center subject

包含的文件(1)

  • SKILL.md3.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

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

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

需要逐镜头动态追踪人脸做 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 级联检测人脸中位位置定焦点。把裁切几何与边界钳制封装成确定性脚本。

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Generate images from written descriptions, transform existing images with editing instructions, or create several variations. Choose image dimensions and quantity, then save the results using an OpenAI-compatible service or apimart with your own API key.

中文简介正在准备中。当前显示英语简介。

  • Generating an illustration from a written description
  • Changing an image's background using instructions
  • Creating several variations of an existing image
ZJU-REAL/Easel39662026年10月21日 更新

ai-music

免费

Generate background music for short videos, vlogs, and social posts from descriptions of mood, style, and instruments. Download MP3 audio, optionally include sung lyrics, and use shared scripts to trim tracks, adjust loudness, or add music to videos.

中文简介正在准备中。当前显示英语简介。

  • Generating background music for a vlog intro
  • Creating instrumental music to match a social post
  • Generating a sung track from supplied lyrics
ZJU-REAL/Easel39662026年10月21日 更新

Create new videos from written scene descriptions or still images using external AI services. Set the aspect ratio and duration, animate a character image, and request generated audio when the selected model supports it.

中文简介正在准备中。当前显示英语简介。

  • Generate a short video from a scene description
  • Animate a still image
  • Create character motion from a starting image
ZJU-REAL/Easel39662026年10月21日 更新

Organize generated images, videos, and text in outputs/ by date, platform, and type. Add tags, search filenames and content, produce asset lists and reports, and preview archive moves before applying them to make past work easier to reuse.

中文简介正在准备中。当前显示英语简介。

  • Organizing generated assets by date, platform, and type
  • Finding past content through keywords and tags
  • Listing assets for a specific account or platform
ZJU-REAL/Easel39662026年10月21日 更新

Reduce background noise in audio recordings or video soundtracks with three processing levels. Keep the original file, create a cleaned version, and receive a report of the settings used and file details before and after processing.

中文简介正在准备中。当前显示英语简介。

  • Reducing fan or air conditioner noise in recordings
  • Cleaning speech in podcasts and interviews
  • Reducing noise in a video's audio track
ZJU-REAL/Easel39662026年10月21日 更新

Edit audio files by trimming sections, converting formats, matching loudness, or extracting sound from videos. You can also join recordings, add fades, and change playback speed while keeping the original pitch.

中文简介正在准备中。当前显示英语简介。

  • Trim a recording to the section you need
  • Convert audio formats and match loudness
  • Extract audio from a video
ZJU-REAL/Easel39662026年10月21日 更新

查看 ZJU-REAL 的全部技能

报告此技能的问题