Video editing toolset for DSH: probe, trim, concat, audio handling, subtitle burn-in, transform, transcode and frame grabbing, powered by ffmpeg downloaded on first use.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:llafztq/dsh-video-tool
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
给 DeepSeek Harness(DSH)加上真正的视频剪辑能力。装上之后,AI 可以直接裁剪、拼接、配音、烧字幕、变速、转码、抽帧,并把抽出的画面用 read_image "看"回来。
引擎是 ffmpeg / ffprobe,不随包分发:首次使用时自动下载到 <DSH_HOME>/video-tool/bin/ 并缓存(约 60 MB)。这样仓库保持几百 KB,也避免把 GPL 二进制塞进你的 clone。
安装
dsh plugin --profile <你的profile> add dsh-video-tool
装完完整重启 DSH。第一次调用任意 video_* 工具时会自动下载引擎;也可以先跑一次 video_setup 显式安装。
⚠️ 用
link:安装时,插件目录必须位于 profile 目录树内,或者被 link 的包要把@deepseek-ai/dsh-tools声明为peerDependency——DSH 只在满足这两个条件之一时, 才会把包内的裸导入转发到 DSH 安装目录。
工具一览
| 工具 | 作用 |
|---|---|
video_setup |
检查/下载 ffmpeg 引擎,报告安装位置与版本 |
video_probe |
读时长、分辨率、旋转标记、帧率、编码、码率、音轨 |
video_trim |
裁剪片段(start + end 或 duration) |
video_concat |
多段拼接,safe 模式自动统一分辨率/帧率/音轨 |
video_audio |
静音 / 换 BGM / 混音 / 调音量 / 淡入淡出(视频流直接复制) |
video_text |
烧录文字、水印、.srt/.ass 字幕 |
video_transform |
缩放 / 裁剪 / 旋转 / 变速 / 改帧率 |
video_export |
导出 mp4 / webm / gif / mp3 / m4a / wav |
video_frame |
抽帧截图(png/jpg),可直接被 read_image 查看 |
引擎解析顺序
- 环境变量
DSH_FFMPEG_PATH/FFMPEG_PATH - 插件目录下的
bin/ <DSH_HOME>/video-tool/bin/(自动下载的落点)- 系统
PATH - 常见安装目录(winget / chocolatey / scoop /
C:\ffmpeg)
环境变量
| 变量 | 作用 |
|---|---|
DSH_HOME |
DSH 主目录,默认 ~/.dsh |
DSH_VIDEO_TOOL_HOME |
覆盖引擎安装目录,默认 <DSH_HOME>/video-tool |
DSH_FFMPEG_PATH / FFMPEG_PATH |
直接指定 ffmpeg 可执行文件或其所在目录 |
DSH_VIDEO_TOOL_FFMPEG_BASE |
覆盖下载源,默认用 npmmirror 的 ffmpeg-static 二进制镜像 |
DSH_VIDEO_TOOL_VERBOSE=1 |
把下载进度打到 stderr,便于排障 |
手动安装引擎
不想让它联网的话,把 ffmpeg / ffprobe(Windows 上是 .exe)放进
<DSH_HOME>/video-tool/bin/,或设好 DSH_FFMPEG_PATH 即可,插件不会再下载。
已知限制
- 特殊符号缺字形:默认自动选中的中文字体(Windows 上为微软雅黑
msyh.ttc) 没有✓、★、emoji 等符号的字形,会渲染成空心方框□;中文和常规标点不受影响。 需要这类符号时用video_text的fontFile显式指定含该字形的字体。 ffmpeg 的drawtext不做字体回退,一次只能用一款字体。 - 转码走 CPU(libx264)。内置/下载的是 essentials 构建,面向软件编解码, 未启用 NVENC/QSV;长视频导出速度取决于 CPU。
video_transform的speed在 0.5x–2.0x 之外时,音频变速会被钳制在该范围 (ffmpegatempo限制),视频变速不受影响。- 竖屏手机素材常以「横屏存储 + rotation 标记」的形式存在。
video_probe会同时给出 存储尺寸和真实显示尺寸,剪辑时按显示尺寸理解即可。 - 引擎下载默认走 npmmirror 的 ffmpeg-static 镜像(国内快)。网络不通时用
DSH_VIDEO_TOOL_FFMPEG_BASE换源,或手动放置二进制。
为什么不用剪映的 ffmpeg
剪映专业版自带的 ffmpeg.exe 是内部精简构建(--disable-ffprobe、无 libx264、
无 drawtext/subtitles),不能当通用剪辑引擎用。本插件用 ffmpeg-static 的
essentials 构建,libx264 / libvpx / aac / drawtext / subtitles(libass) /
palettegen / amix / afade 都在。
License
MIT。运行期下载的 FFmpeg 二进制是独立项目,遵循其自身许可(默认来源为 GPL 构建),详见 LICENSE。
English summary
dsh-video-tool adds a video editing toolset to DeepSeek Harness: probe, trim,
concat, audio handling, subtitle/text burn-in, transform, transcode and frame
grabbing — all backed by ffmpeg.
FFmpeg is not bundled. On first use the plugin downloads a static
ffmpeg/ffprobe pair into <DSH_HOME>/video-tool/bin/ and caches it (~60 MB),
so the repository stays tiny. Point DSH_FFMPEG_PATH at your own binaries, or
drop them into that bin/ directory, to skip the download entirely.
Install with dsh plugin --profile <profile> add dsh-video-tool, then fully
restart DSH. Run video_setup once to fetch the engine, or just call any
video_* tool and it will bootstrap itself.
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38466
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37249
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 28879
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 9925
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6075
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4723
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.