Skip to content
Automation
Skill

/video_edit

音视频剪辑工具箱。包含视频剪辑截取、音频剪辑截取、视频画面裁剪、视频拼接合并、音频拼接合并、视频合成/替换音频。当用户提到音视频剪辑、裁剪视频、合并视频、音频剪辑、视频配音时使用。

From plugin
python-office
1.4k80 skills

Claude Code

$ npx -y skills add coderwanfeng/python-office --skill video_edit --agent claude-code

SKILL.md

video_edit.SKILL.md
name: video_edit
description: 音视频剪辑工具箱。包含视频剪辑截取、音频剪辑截取、视频画面裁剪、视频拼接合并、音频拼接合并、视频合成/替换音频。当用户提到音视频剪辑、裁剪视频、合并视频、音频剪辑、视频配音时使用。

video_edit Skill

> 音视频剪辑功能集(截取、裁剪、拼接、配音/音轨替换)

功能描述

本 Skill 将所有音视频剪辑相关功能合并为一个统一的 API 模块,包含以下 6 个核心剪辑功能:

1. `cut_video`: 截取视频指定时间段片段 2. `cut_audio`: 截取音频指定时间段片段 3. `crop_video`: 裁剪视频画面的坐标区域与尺寸 4. `concat_videos`: 多个视频文件顺序拼接合并 5. `concat_audios`: 多个音频文件顺序拼接合并 6. `add_audio_to_video`: 视频合成/替换背景音乐或音频

所属分类

`office/skills/video/video_edit/`

调用方式

from skills.video.video_edit import (
    cut_video,
    cut_audio,
    crop_video,
    concat_videos,
    concat_audios,
    add_audio_to_video,
)

或从 `skills.video` 模块导入:

from skills.video import video_edit

video_edit.cut_video(video_path='./test.mp4', start_time='00:00:10', end_time='00:00:30')

功能与参数说明

1. 视频截取 `cut_video`

| 参数 | 类型 | 必填 | 默认值 | 说明 | |------|------|------|--------|------| | `video_path` | str | 是 | - | 视频文件路径 | | `start_time` | float/str | 否 | `0` | 开始时间(秒数或格式如 `'00:01:10'`) | | `end_time` | float/str | 否 | `None` | 结束时间(秒数或格式如 `'00:02:30'`,默认结尾) | | `output_path` | str | 否 | `'./'` | 输出目录 | | `output_name` | str | 否 | `None` | 输出文件名(默认原名后加 `_cut`) |

2. 音频截取 `cut_audio`

| 参数 | 类型 | 必填 | 默认值 | 说明 | |------|------|------|--------|------| | `audio_path` | str | 是 | - | 音频文件路径 | | `start_time` | float/str | 否 | `0` | 开始时间(秒数或格式如 `'00:00:05'`) | | `end_time` | float/str | 否 | `None` | 结束时间 | | `output_path` | str | 否 | `'./'` | 输出目录 | | `output_name` | str | 否 | `None` | 输出文件名 |

3. 画面裁剪 `crop_video`

| 参数 | 类型 | 必填 | 默认值 | 说明 | |------|------|------|--------|------| | `video_path` | str | 是 | - | 视频文件路径 | | `x1` | int | 否 | `0` | 左上角 x 坐标 | | `y1` | int | 否 | `0` | 左上角 y 坐标 | | `x2` | int | 否 | `None` | 右下角 x 坐标 | | `y2` | int | 否 | `None` | 右下角 y 坐标 | | `width` | int | 否 | `None` | 裁剪宽度(可代替 x2) | | `height` | int | 否 | `None` | 裁剪高度(可代替 y2) | | `output_path` | str | 否 | `'./'` | 输出目录 | | `output_name` | str | 否 | `None` | 输出文件名 |

4. 视频拼接 `concat_videos`

| 参数 | 类型 | 必填 | 默认值 | 说明 | |------|------|------|--------|------| | `video_list` | list[str] | 是 | - | 视频路径列表 | | `output_path` | str | 否 | `'./'` | 输出目录 | | `output_name` | str | 否 | `'concat_video.mp4'` | 输出文件名 |

5. 音频拼接 `concat_audios`

| 参数 | 类型 | 必填 | 默认值 | 说明 | |------|------|------|--------|------| | `audio_list` | list[str] | 是 | - | 音频路径列表 | | `output_path` | str | 否 | `'./'` | 输出目录 | | `output_name` | str | 否 | `'concat_audio.mp3'` | 输出文件名 |

6. 合成音频/配音 `add_audio_to_video`

| 参数 | 类型 | 必填 | 默认值 | 说明 | |------|------|------|--------|------| | `video_path` | str | 是 | - | 视频文件路径 | | `audio_path` | str | 是 | - | 音频文件路径 | | `output_path` | str | 否 | `'./'` | 输出目录 | | `output_name` | str | 否 | `None` | 输出文件名 |

使用示例

from skills.video import video_edit

# 视频截取
video_edit.cut_video(video_path='./input.mp4', start_time=0, end_time=10)

# 视频合成音频
video_edit.add_audio_to_video(video_path='./input.mp4', audio_path='./music.mp3')

原始函数

  • `office.api.video.cut_video`
  • `office.api.video.cut_audio`
  • `office.api.video.crop_video`
  • `office.api.video.concat_videos`
  • `office.api.video.concat_audios`
  • `office.api.video.add_audio_to_video`
Read more
@coderwanfeng
Ships withpython-office

pip install python-office 自动化办公专用库

Stars on GitHub

Momentum

stars in total
1.4k
Star history of coderwanfeng/python-office on GitHub, a chart by star-history.com

Other skills on python-office.

excel2csv

excel2csv

把 Excel 工作表导出为 CSV,默认 utf-8-sig 编码解决中文乱码,支持多工作表批量导出。当用户提到 Excel 转 CSV、表格转文本、CSV 乱码时使用。

excel2json

excel2json

把 Excel 工作表转换成 JSON,支持 records、columns、values 三种结构,日期自动转 ISO 字符串。当用户提到 Excel 转 JSON、表格转接口数据、Excel 生成 mock 数据时使用。

excel2pdf

excel2pdf

将 Excel 文件的指定工作表转换为 PDF 格式。当用户提到 Excel 转 PDF、表格转 PDF、导出 Excel 为 PDF 时使用。

excel_column_stats

excel_column_stats

统计 Excel 每一列的填充率、类型、唯一值数量和数值分布,用于数据质量初筛。当用户提到 Excel 列统计、数据质量、缺失率、列画像时使用。

excel_dedupe

excel_dedupe

按指定列或整行给 Excel 去重,返回重复行与保留行的对应关系,可导出干净数据。当用户提到 Excel 去重、删除重复项、重复数据、查重时使用。

excel_diff

excel_diff

比对两份 Excel 表格的差异,按位置或按主键找出修改、新增、删除的行,可导出差异表。当用户提到对比 Excel、Excel 差异、两份表格有什么不同、核对表格时使用。

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n3w209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

nanoclaw11d31k
@nanocoai@nanocoaiInstall Skill

Questions about video_edit.

Which coding agents can use video_edit?
video_edit installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.