Ten video tools (probe/cut/concat/encode/subtitle/extract/gif/frames/adjust/health) on the official subprocess service: probe summaries, batch frame extraction, speed/volume/mute/rotate adjust, shell-free argv, zero runtime dependencies.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-ffmpeg
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:STARDUSTLC666/dsh-ffmpeg
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
dsh-ffmpeg
DSH (DeepSeek Harness) video-processing plugin: seven tools covering probing, cutting, concatenation, transcoding, subtitles, extraction and GIF creation — all powered by ffmpeg/ffprobe.
Compatibility
Validation host: Harness 0.2.0-rc.1 built from official sources (commit 407e65c8) with Node 24.16.0 on 2026-09-28. All 96 plugin tests pass in an isolated environment; all 18 plugins mount together in one host registering 10 tools, with tool schemas and health-check contracts passing. No live ports or external services were exercised in this round.
2026-09-13 fix: retain the service receiver when calling subprocess.spawn, preventing failures caused by passing the method as an unbound callback. Verified against a real isolated host subprocess service. FFmpeg/ffprobe version checks and probing a real MP4 pass. This fixes the tool invocation failure reported in #3.
Installation
dsh plugin --profile web add dsh-ffmpeg
ffmpeg must be installed locally (ffmpeg -version should work); use ffmpegPath / ffprobePath, or the DSH_FFMPEG_PATH / DSH_FFPROBE_PATH environment variables, when it is not on PATH.
Uninstall
dsh plugin --profile web remove dsh-ffmpeg
Then restart the web service. To clean up fully, also remove the plugin entry from your profile cordis.patch.yml if you overrode it.
Configuration
Override the plugin row in your profile's cordis.patch.yml (defaults apply when absent):
- id: ffmpeg
name: 'dsh-ffmpeg'
config:
# ffmpegPath: C:\tools\ffmpeg\bin\ffmpeg.exe # explicit path (or DSH_FFMPEG_PATH)
# ffprobePath: C:\tools\ffmpeg\bin\ffprobe.exe # or DSH_FFPROBE_PATH
timeoutMs: 300000 # per-operation timeout (default 5 min, 10s - 2h)
# overwrite: true # allow overwriting outputs (default auto-suffix _1/_2)
Tools
| Tool | Purpose | Key parameters |
|---|---|---|
ffmpeg_probe |
Probe media info (format/duration/resolution/fps/bitrate/audio/subtitle streams; multi-video files return a full videos list) | input required |
ffmpeg_cut |
Cut a clip (stream copy by default, accurate re-encode optional) | input required; start/end/duration |
ffmpeg_concat |
Concatenate 2-20 clips (stream copy for identical codecs / re-encode for mixed; video-only when any input has no audio) | inputs array required |
ffmpeg_encode |
Transcode with presets (bilibili 1080p/4K, vertical 1080p, web-720p) plus crf/fps/scale overrides | input required; preset optional |
ffmpeg_subtitle |
Burn subtitles (SRT/ASS hard subs) | input + subtitle required |
ffmpeg_extract |
Extract audio (m4a; non-AAC is auto-transcoded to AAC) / frame sequences / single frame / subtitle stream | input + what required |
ffmpeg_gif |
Video to high-quality GIF (two-pass palette) | input required; fps/width/duration optional |
Examples
ffmpeg_probe { input: E:\videos\raw.mp4 }
ffmpeg_cut { input: E:\videos\raw.mp4, start: 10, end: 30 }
ffmpeg_encode { input: E:\videos\raw.mp4, preset: bilibili-1080p }
ffmpeg_subtitle { input: E:\videos\raw.mp4, subtitle: E:\videos\subs.srt }
ffmpeg_extract { input: E:\videos\raw.webm, what: audio }
ffmpeg_gif { input: E:\videos\raw.mp4, duration: 3, width: 480 }
Safety
- No shell: every argument is passed as its own argv element — user input cannot inject commands
- Runs on the official DSH subprocess service: the timeout AbortSignal now really drives tree-scoped termination (SIGTERM → kill; taskkill /T on Windows), zero runtime dependencies
- No accidental overwrites: existing outputs get auto-suffixed; output == input is rejected
- Timeout clamps: per-operation 10s - 2h; probes additionally capped at 60s
- Input validation: time formats, preset enums, crf/fps/scale ranges are validated up front; directory inputs are rejected and extension-less frame-sequence outputs are auto-fixed
Development
pnpm install
pnpm test # build + 102 tests, including a real-ffmpeg end-to-end suite (auto-skipped without ffmpeg)
License
MIT
Changelog
- 0.4.3 (2026-09-18): 修复抽帧数到旧帧/清单截断、取消被当成功、取消文案丢原因、
+2dB被拒; 音轨提取非 AAC 自动转 AAC、concat 混合音轨可用、ffprobe 截断明确报错. 测试 102 项.
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 31002
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.
superdesigndev/treg★ 3752
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.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1127
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
gitroomhq/postiz-agent#dsh-postiz★ 498
Connects DeepSeek Harness to Postiz over MCP: list connected social media channels, fetch per-platform posting rules, and schedule, draft, or publish posts to X, LinkedIn, Instagram, Facebook, Threads, TikTok, YouTube, Reddit, Bluesky, Mastodon, Discord, Slack, Telegram and more; adds a postiz workflow skill.
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 465
Local IMAP invoice download, OCR, archive, and Excel reimbursement summaries for DeepSeek Harness.
anysearch-team/anysearch-dsh★ 432
AnySearch-powered real-time web and vertical search provider for DeepSeek Harness.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.