Communitygithub.com

DomCamillo2/视频编辑

将竖屏照片或视频适配到横屏编辑中,或使用同一素材的模糊副本来重新构图混合宽高比。用于防止黑边和裁剪人物面部或身体;不适用于隐私匿名化或锐化模糊主体。

视频编辑 是什么?

该技能提供了一种专业的视频/图像编辑方法,专为处理宽高比不匹配的场景设计。其核心原理是复制原始素材并模糊后作为背景填充画布,同时保留前景的原始宽高比,从而避免黑边和关键内容被裁剪。技能详细规定了保护区域(如面部、手势、全身动作等)的标记与缩放逻辑,强调逐镜头审核而非全局统一裁剪,可确保群像或单人特写均安全构图。支持可选的轻微摄像机运动(103-107%范围内),要求前景与背景在时间、速度映射上完全同步,并严格避免音频干扰或模糊伪影。该技能适用于视频编辑软件(如Remotion)和基于帧的渲染器,提供从保护区域标注到最终编码检查的完整工作流,最终交付逐帧构图值、保护区域说明及关键静态截图。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/DomCamillo2/VideoEditting/tree/HEAD/.agents/skills/video-portrait-framing

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

保留主体,柔化未使用的画布

首先读取目标宽高比和受保护内容。在计算尺寸前纠正源素材的旋转角度。逐镜头审核每个素材;一次全局裁剪无法保护所有群体镜头。

  1. 将同一源素材的副本作为背景放置,使用 cover 填充画布。放大到足够程度,确保模糊采样和摄像机运动不会暴露透明/暗边。进行强模糊处理,并可选择轻微调暗/降低饱和度,使清晰前景保持主导地位。检查亮边和暗边。
  2. 放置保留原始宽高比的前景。从 contain 开始:对于画布 W,H 和定向源素材 w,h,缩放比例为 min(W/w, H/h)。背景覆盖缩放比例为 max(W/w, H/h)。切勿拉伸填充。
  3. 标记保护区域:相关的面部、头部、手势、当全身动作重要时的脚部以及上下文物体。仅当这些区域在整个镜头中保持在画布内时,才增大前景尺寸。仅在视觉验证后使用基于主体的定位;不要自动将人物推离中心。
  4. 如果完整的肖像群体无法在不丢失人物的情况下放大,则接受可见的模糊侧边区域。不要通过秘密裁剪头部来满足“小边框”要求。诸如故意双照片布局之类替代方案需要有编辑理由和一致的节奏。
  5. 可选的轻微运动:仅当有足够安全余量时,相对于所选基础构图约为 103-107%。特写肖像可以保持静止。检查最大缩放比例和所有平移极限;并非每张照片都需运动。
  6. 对于视频,将前景和背景保持在相同的源素材时间、修剪、速度映射和方向上。背景音频必须静音;仅使用一个预期的音轨。避免模糊副本明显滞后于主体。
  7. 使字幕、位置名称和效果远离保护区域和目标 UI 覆盖层。以实际观看尺寸检查。不要故意使用模糊填充来隐藏不可用的前景焦点。

在基于帧的渲染器中,从当前帧导出运动。在 Remotion 中,使用具有渲染同步的媒体组件;CSS 模糊可以是静态的,但挂钟 CSS 动画不是可靠的视频时钟。

交付每镜头的构图值、保护区域/说明、开始/中间/结束静态图以及审核过的运动范围。检查最终编码是否存在裁剪、黑边/透明边、背景闪烁、不匹配的帧和拉伸。仅靠自动黑边检测无法证明人物安全地处于构图内。

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

DomCamillo2/VideoEditting

Mix music, dialogue, authentic location sound and comedic sound effects for an edit. Use for ducking, song transitions, J/L cuts, intelligibility and clean endings; not as a substitute for beat detection or actual listening.

DomCamillo2/VideoEditting

Cut photos or video on audible musical beats, downbeats and phrase changes, or diagnose an edit that feels off beat. Use for music-led timing and transitions; do not equate waveform peaks or automatic markers with verified musical accents.

DomCamillo2/VideoEditting

Establish a film or reel brief, including tone, humor, travel type, route and relevant vehicle details. Use when these choices are missing or the user changes direction; skip for a small revision with an established brief.

DomCamillo2/VideoEditting

Reconstruct capture order, trip chapters and road/ferry map segments from photo/video metadata and visible evidence. Use when travel chronology or route labels matter; do not invent exact dates or transport links from filenames alone.

DomCamillo2/VideoEditting

Add playful video gags such as person cutouts, spins, loading effects, face-zoom transitions or tracked scooter flames. Use when humor is requested in the current brief; do not add unsolicited meme edits to a serious film.

DomCamillo2/VideoEditting

Prepare a reviewable preview, verify the final encoded video and hand off a versioned editing project. Use before export or when diagnosing black borders, crop errors, missing assets, drift, color or audio problems; do not claim creative QA from a successful build alone.

DomCamillo2/VideoEditting

Cull and rank photos or video excerpts, remove repetitive selections, and compare blurry versus sharp takes. Use for bursts, near-duplicates, contact sheets and best-moment selection; never delete source media or judge focus only from a blurred background.

DomCamillo2/VideoEditting

Onboard a new user to the VideoEditting toolkit by choosing all or selected editing skills, assessing useful MCP integrations and setting up approved tools before the film brief. Use for first-time adoption or setup changes, not every editing revision or repository maintenance task.

相关技能