Introduction

DeepSeek Harness (DSH) extends agent capabilities through plugins. dsh-video-downloader is designed for a specific scenario: when an agent receives a video or audio URL, it needs to first determine if it is media, which site it belongs to, and the quality, and then save the file locally.

Below introduces the tools provided by this plugin, how to install it, and the boundaries to pay attention to during use.

Positioning

dsh-video-downloader is a DSH media download plugin with the package name dsh-video-downloader, maintained by zimai233, and licensed under MIT.

It identifies media URLs from sites like Bilibili, YouTube, Douyin, and Xiaohongshu based on hostname, and exposes three tools to the agent:

  • video_analyze: Only analyzes, does not download.
  • video_download: Saves the media URL stream to disk.
  • video_quality_parse: Parses quality and extension using regex without making network requests.

In implementation, it is a pure ESM package with zero build steps; the published package is runtime code. Core judgment logic is exported as pure functions like isMedia, getQuality, getExt, and detectSite, which can be used for testing and secondary development.

Core Tools

video_analyze

video_analyze only analyzes the URL and does not download the file. It returns:

{ "isMedia": true, "site": "bilibili", "quality": "1080P", "ext": "m4s", "mimeHint": "video/mp4" }

Fields include:

  • isMedia
  • site
  • quality
  • ext
  • mimeHint

Parameter example:

{ "url": "https://bilivideo.com/xxx.m4s" }

video_download

video_download requests the media URL with browser-style headers and writes the response stream to disk. The default write path is:

./downloads/<sanitized-filename>

It supports optional outPath parameters and an optional headers object; headers will be merged into the default browser request headers.

Download behavior:

  • Stream write to local file.
  • Follow redirects up to 5 times.
  • 60 second timeout.
  • Response cancellation execution.

Return fields include:

{ "savedTo": "./downloads/clip.mp4", "bytes": 1048576, "quality": "1080P", "ext": "mp4", "elapsedMs": 1500 }

Parameter example:

{ "url": "https://bilivideo.com/xxx.m4s", "outPath": "./downloads/clip.mp4" }

If custom request headers are needed, the headers object can be passed in the parameters.

video_quality_parse

video_quality_parse performs local regex parsing and does not initiate network requests. It returns:

{ "quality": "720P", "ext": "mp4" }

Parameter example:

{ "url": "https://example.com/video.mp4?height=720" }

Installation and Enablement

Below are the installation steps. First, confirm the DSH profile to use, then execute the plugin installation command:

dsh plugin --profile myprofile add dsh-video-downloader

After the steps above, the plugin will be added to the corresponding profile. Before installation, it is recommended to check the source code in the GitHub repository, README.md, and the MIT license; after enabling, the plugin runs with the current dsh process permissions, so users must verify the source’s trustworthiness themselves.

Typical Usage

You can directly use natural language to let the agent execute tasks, for example:

Analyze the media in this page: https://www.bilibili.com/video/BV1xx411c7mD

Download the 1080P videos from these links to the ./downloads directory

The agent may call the following tool parameters during execution.

Analyze media:

{ "url": "https://bilivideo.com/xxx.m4s" }

Download to a specific path:

{ "url": "https://bilivideo.com/xxx.m4s", "outPath": "./downloads/clip.mp4" }

Parse quality and extension:

{ "url": "https://example.com/video.mp4?height=720" }

Suitable Scenarios and Notes

Suitable scenarios include:

  • Let the agent determine if a URL is a media file.
  • Identify sites such as Bilibili, YouTube, Douyin, and Xiaohongshu.
  • Parse media quality, extension, and MIME hints.
  • Stream save accessible media files to a local directory.

Unsuitable scenarios include:

  • Bypassing DRM.
  • Bypassing login walls.
  • Accessing platform-paid content.
  • Complex scraping requiring platform private interface authentication.

Safety boundaries must be clearly stated: only download content you have the right to access. This plugin is responsible for media identification and file streaming; it is not responsible for cracking copyright protection, login verification, or paywalls. When using, you should comply with each platform’s terms of service and copyright laws.

Getting

GitHub repository:

https://github.com/zimai233/dsh-video-downloader

License:

MIT