dsh-media-tools: Portable Audio/Video Tools and Native Temporal Video Inference under DSH

Introduction

When building agents in DeepSeek Harness (DSH), common practices involve uploading attachments or letting models “see an image.” However, handling audio waveforms, spectrograms, Whisper transcriptions, and video understanding that requires timeline preservation often necessitates separate scripts, local services, or legacy Local AI applications. When the toolchain is fragmented, it becomes difficult to manage permission boundaries and GPU usage uniformly within a single session.

Here we introduce the community plugin dsh-media-tools (maintainer averyjohnkucan-arch). It registers independent, switchable audio-visual plugins on the DSH/Cordis side, while providing Agent Skills, CLI, and stdio MCP services; it integrates with Omni listening and native time-series video backends on demand. The README explicitly states that the legacy Local AI v2 application does not need to remain resident.

What is this?

dsh-media-tools (npm package name dsh-media-tools, current version 0.2.2, MIT License) is a set of client-side media tools for DSH: two mutually independent DSH/Cordis plugins, corresponding Agent Skills, command-line and MCP services, and built-in on-demand Omni listening and native time-series video backends.

The target environment is DSH 0.2.1-rc.2 and Cordis ~4.0.5 (see package.json for peer dependencies). The plugin is categorized as a client in the SkillHub directory; this directory is a community site with no official affiliation with DeepSeek / High-Flyer.

Core Features

Two Independently Enabled Plugins

Plugin Available Tools
Audio analyze_audio, edit_audio, convert_audio, transcribe_audio, listen_audio
Video probe_video, convert_video, analyze_video

Audio: Analysis can return inline waveforms/FFT/spectrograms/waterfall plots, digital levels, and numerical spectra; editing generates new WAVs; conversion supports track extraction and WAV/FLAC/MP3/M4A/OGG, as well as MP4/WebM/GIF; CPU Whisper provides timestamped speech transcription; Omni provides listening descriptions that may be error-prone.

Video: The native video path preserves time-series frames, aligned audio, and engine evidence; analyze_video targets models with native time-series video capabilities and compatible engine/projector setups (the README lists deployment labels such as Flash 3.8, Flash Next, Qwen 3.6 35B-A3B, Qwen 27B, etc., and clarifies that this is not a complete compatibility matrix).

DSH Integration Behavior

After installation via npm pack and dsh plugin add, the package inserts dsh-media-audio and dsh-media-video, which can be toggled independently. It utilizes DSH tool registration, attachments, prompt segments, and Cordis lifecycle cleanup, requiring no changes to host source code. Disabling either plugin cancels its own tasks and removes registrations without deleting generated files or models. You can also refer to audio.patch.yml and video.patch.yml in the repository for standalone insertion.

In environments with DSH installed, the modelScheduler service can coordinate GPU admission; worker processes hold locks within the package to avoid conflicts with unrelated GPU hogs. Do not install direct plugins and re-register tools with the same name in MCP within the same DSH profile.

CLI and MCP

  • CLI: dsh-media (src/cli.mjs), self-check via doctor.
  • MCP: dsh-media-mcp (src/mcp.mjs), based on the official MCP SDK, exposing the eight tools mentioned above, capable of returning plotting blocks, saving files, and reporting JSON.

Output is placed in a unique .dsh-media directory; original files remain unchanged. CLI/MCP paths are relative to the explicitly authorized workspace; within DSH, the most recent single-file upload or attachment ID can be used.

Installation and Activation

Plugins run with the permissions of the current DSH process; please review the GitHub source code and licenses (THIRD_PARTY_NOTICES.md, provenance.json) before installing.

Host prerequisites (from README): Python 3.12 (venv/pip), NVIDIA Driver; full backend installation will install CUDA user-space libraries. Native executable packages are currently targeted for Linux x64 / CUDA 13; Windows/macOS GPU support is not declared. CPU tools utilize platform FFmpeg dependencies where available. Node >= 22.19.0. FFmpeg/FFprobe are auto-installed via fixed npm dependencies.

1. Install Skills and Runtime

After obtaining a copy of the repository and entering the directory, run the official installation script (this writes to ~/.agents/skills, ~/.local/share/dsh-media-tools, and configures ~/.config/dsh-media/config.json):

cd dsh-media-tools
npm ci
node src/install.mjs --setup-python \
  --include-backends --local-ai '/path/to/Local AI version 2'

Note: The installation process treats V2 as an import source only once, copying native executables to its own cache and reusing model storage; the V2 app and inference companions can remain stopped. On Linux, if --python is not specified, available standalone Python distributions will also be imported into the package storage. Moving the plugin checkout directory will not break the installed Skills.

For new machines where models are managed separately, --local-ai can be replaced with --backend-config /path/to/backend-models.json. For CPU-only tools, omit --include-backends and --local-ai, and configure speech with --whisper-model /path/to/faster-whisper-model. Uninstallation: node src/install.mjs --uninstall (only removes own and unmodified Skills, preserving models, configuration, and workspace output).

Model size requires separate planning: Omni plus projector is approximately 21 GB; native video may be larger. See docs/standalone-backends.md in the repository for details.

2. Install as a DSH Plugin

Package and add it in the selected DSH profile (change paths to local absolute paths):

npm pack
dsh plugin --profile web add /absolute/path/dsh-media-tools-0.2.2.tgz

The installer does not modify running DSH profiles nor automatically reload DSH.

3. (Optional) Configure MCP Client

The installation script will print the runtime path. Add the following to your MCP client (fill in paths in args based on installation results):

{
  "mcpServers": {
    "dsh-media": {
      "command": "node",
      "args": ["/installed/runtime/src/mcp.mjs", "--workspace", "/authorized/workspace"]
    }
  }
}

GPU tasks require allowing longer tool timeouts. For Codex configuration syntax, see the official MCP documentation.

Typical Usage

Perform an environment check first:

node src/cli.mjs doctor

Audio analysis (30-second snippet, 8192 FFT):

node src/cli.mjs analyze_audio --workspace /path/to/workspace \
  --args '{"source_path":"recording.mp3","duration_seconds":30,"fft_size":8192}'

Omni Listening:

node src/cli.mjs listen_audio --workspace /path/to/workspace \
  --args '{"source_path":"recording.mp3"}'

Time-series Video Q&A:

node src/cli.mjs analyze_video --workspace /path/to/workspace \
  --args '{"source_path":"clip.mp4","question":"Describe the events in timestamp order."}'

See docs/conversion.md in the repository for conversion examples. For development, use npm ci && npm test; optionally use DSH_MEDIA_PYTHON to specify the interpreter.

Use Cases and Limitations

Suitable for: Those already using DSH/Cordis who wish to perform measurable audio analysis, format conversion, Whisper transcription, Omni listening descriptions, and timeline-based video understanding on models supporting native time-series video within the same harness; or those looking to reuse the same toolset within an authorized workspace via MCP/CLI.

Limitations and Cautions (all from README):

  • Numerical audio clips are limited to 120 seconds and 25 million channel-samples; maximum input is 2 GiB.
  • CPU transcription and conversion/editing are capped at 2 hours; conversion processes only the first 30 seconds by default.
  • Level units are dBFS, not calibrated SPL; Whisper likelihood is not a correct rate percentage; Omni descriptions may hallucinate and should be verified against measurement results.
  • Bundled native path: approx 6 FPS, 15-second window, 3-second overlap, including SVE2 records and M-RoPE tracks; it does not replace time-series video with independent static frames.
  • The portable CPU runner performs path checks rather than OS sandboxing; the Linux GPU backend runs in its own process with bounded input. MCP clients cannot control private schedulers of other applications: unload unrelated resident models before independent GPU inference.

Conclusion

dsh-media-tools consolidates audio-visual analysis, conversion, transcription, listening description, and time-series video inference into switchable DSH plugins, with optional Skills, CLI, and MCP, reducing the overhead of maintaining separate local applications for media tasks. Refer to the directory description and issues via the SkillHub plugin page and the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye