Preface¶
DeepSeek Harness (referred to as dsh) is designed with the philosophy of “everything is a plugin”: browser automation, visual understanding, and document parsing can all be plugged into its runtime. When organizing materials or archiving content, there is a very specific need—drop a link in a conversation, and let the agent first determine if it is a video or audio file, then save the file locally. There are many browser automation plugins in the community directory, but very few tools specifically designed for media recognition and downloading.
dsh-video-downloader was created to fill this gap. It extracts the media recognition logic from the Chrome MV3 extension video-downloader-extension out of the browser sandbox, turns it into a pure Node.js function, and registers it as three tools callable by agents. This article is collated after cross-checking the community directory page, the GitHub repository README, and src/index.js. Two points need to be clarified first: the community plugin directory is an independent site and has no official affiliation with DeepSeek / HyperGAN; Harness itself is still in developer preview, and incompatible changes may occur in the future.
What is this¶
dsh-video-downloader is a “tools and capabilities” type DSH plugin, maintained by zimai233, licensed under MIT, primarily written in JavaScript. The version number in the repository’s package.json is 0.1.0. As of verification on 2026-08-18, both the directory page and GitHub show 1 star; the repository has two topics: deepseek-harness and dsh-plugin.
One-sentence positioning: In DeepSeek Harness conversations, judge whether a URL looks like a downloadable video/audio, and stream the media direct link to disk. Site recognition covers Bilibili, YouTube, Douyin, and Xiaohongshu based on hostname; short-link domains youtu.be, iesdouyin.com, and xhslink.com will also be mapped to their corresponding sites, and the rest will be marked as other.
It does not solve the complete downloader scenario of “automatically parse and rip media from a playback page”. video_analyze and video_quality_parse only look at the URL string and will not crawl the page; video_download accepts direct links such as mp4 / m3u8 / mpd / m4s. The README clearly states: the plugin does not bypass DRM, login walls, or platform paid content, and you must comply with each platform’s terms of service and copyright laws when using it.
Core Functions¶
The plugin registers three tools via @deepseek-ai/dsh-tools’s defineTool. The pure function core (isMedia, getQuality, getExt, detectSite) is also exported for testing and secondary development.
video_analyze: Analyze only, no download¶
Pass in a url, and return JSON:
{ "isMedia": true, "site": "bilibili", "quality": "1080P", "ext": "m4s", "mimeHint": "video/iso.segment" }
The judgment rules come from heuristics in the source code:
- Is it media: Check the file extension (mp4, m3u8, webm, m4s, mp3, etc.), URL fragments (such as bilivideo.com, googlevideo.com, .m3u8), and optional Content-Type.
- Which site it belongs to: Parse the hostname and map it to bilibili / youtube / douyin / xiaohongshu / other.
- Clarity: Guess as much as possible from 1920x1080, height / quality query parameters, bitrate thresholds, or keywords like 1080, 720 in the URL; if unable to guess, label it as HLS / DASH / M4S / FLV based on the container.
- Extension and MIME hint: For example, .m3u8 → application/x-mpegURL, the source code falls back to mp4 when the extension is missing.
The tool description is very clear: the analysis process will not request this URL. If you drop a Bilibili playback page here, it will usually only recognize site as bilibili, and isMedia may not be true—because it looks at what the link looks like, not what is hidden in the page.
video_download: Stream the direct link to disk¶
This is the tool that actually sends network requests. The parameters and return values are as follows:
| Parameter | Description |
|---|---|
url |
Required, media direct link |
outPath |
Optional, absolute path or relative to the current working directory; if not filled in, it will be written to ./downloads/ |
headers |
Optional object, merged on top of the default browser request headers |
Return JSON: { savedTo, bytes, quality, ext, elapsedMs }.
The download behavior is aligned between the README and the source code:
- The request header carries a Chrome-style User-Agent, and automatically adds Referer based on the origin of the URL.
- Use fs.createWriteStream for streaming writing, and create the directory if it does not exist.
- Manually follow redirects, up to 5 times.
- 60-second timeout; abort when execution is canceled.
The default file name is obtained by cleaning the last segment of the URL path; illegal characters in the path will be replaced with underscores.
video_quality_parse: Pure regex, no network¶
Only returns { quality, ext }, does not judge the site, and does not download. It is suitable for scenarios where you already have a direct link and only want to extract clarity and container from the URL. Clarity is also best-effort: first check the width and height and query parameters, then check the bitrate threshold and keywords, and finally fall back to the container type.
Parts in the source code but not registered as tools¶
src/index.js additionally exports parseBilibiliJson, parseYoutubeStreaming, and extractMediaUrls: used to parse Bilibili playurl JSON, YouTube streamingData, and extract mp4 / m3u8 links from page text respectively. They are pure functions and are not added to the agent’s tool list. If you only call the plugin through conversation, the agent cannot use these three parsers; they are only useful for secondary development or when you feed JSON text yourself.
There are two more implementation-related points about installation: the package is pure ESM, main points to src/index.js, and there is no build step; cordis.patch.yml inserts the plugin line with id video-downloader and name dsh-video-downloader.
Installation and Activation¶
The installation command given on the community directory page can be run in the DeepSeek Harness terminal:
dsh plugin add github:zimai233/dsh-video-downloader
For reproducible installations, pin the commit hash as per the directory page instructions:
dsh plugin add github:zimai233/dsh-video-downloader#<commit>
Replace <commit> with the actual commit SHA in the repository. The official documentation also commonly uses the profile-prefixed syntax, such as dsh plugin --profile demo add github:zimai233/dsh-video-downloader.
The repository README also mentions installing via the npm package name: dsh plugin --profile myprofile add dsh-video-downloader. As of 2026-08-18, no package with the same name can be found on the npm registry, do not treat this as a usable installation method. You should currently use the GitHub command from the directory page as the standard.
This plugin is pure JavaScript, and the published package is the runtime code, so you generally do not need extra authorization for the prepare build script. Even so, the security prompt on the directory page applies: the plugin runs with the permissions of the current dsh process, and may execute code during installation. Please check the source code and license yourself before installing. After installation, you can use dsh plugins list to confirm whether it appears in the list; some plugins require restarting Harness to take effect.
Typical Usage¶
The README recommends using natural language to let the agent call the tools, for example:
Analyze the media in this page: https://www.bilibili.com/video/BV1xx411c7mD
Download the 1080P videos of these links to the ./downloads directory
Corresponding to the tool parameters, the example given in the repository is:
{ "url": "https://bilivideo.com/xxx.m4s" }
This one is for video_analyze. Add the output path when downloading:
{ "url": "https://bilivideo.com/xxx.m4s", "outPath": "./downloads/clip.mp4" }
Only parse clarity and extension:
{ "url": "https://example.com/video.mp4?height=720" }
The recommended order is: first use video_analyze to check isMedia and site, and confirm it is a direct link before using video_download. When a playback page URL fails the “looks like media” check, you need to first obtain the direct link through other means (such as opening the developer tools yourself, or cooperating with a browser automation plugin to capture media requests), and then hand it over to this plugin for saving. Do not expect to get a complete video file by executing video_download on the playback page once.
The headers parameter of video_download can override or supplement the default request headers. When the platform has additional requirements for Referer or Cookie, you can put the required headers into this object; the plugin itself will not help you log in, nor will it read the browser’s Cookie library.
Applicable Scenarios and Notes¶
It is suitable for these situations:
- You already have a media direct link and want the agent to classify it, identify clarity clues, and save it locally in the conversation.
- Locally archive publicly downloadable mp4 / m3u8 and other files, which will default to the downloads/ directory under the current working directory.
- Reuse the exported pure functions during secondary development instead of copying a set of URL heuristics from scratch.
Before using, it is recommended to treat the following items as hard restrictions, not “may be fixed later”:
1. Permissions and Supply Chain. The plugin runs with the permissions of the current dsh process, can read and write the real machine directory, and can send network requests. Check the source code and MIT license at https://github.com/zimai233/dsh-video-downloader before installing; fix the commit when a reproducible environment is required.
2. Copyright and Platform Terms. The README original text requires: only download content that you have the right to obtain. It only performs recognition and streaming saving, and does not bypass DRM, login walls, or paid walls.
3. Direct Link, Not Playback Page. video_analyze does not crawl pages; video_download writes the given URL to a file via HTTP. Bilibili DASH commonly has separated audio and video .m4s files, and this plugin will not help you merge them.
4. 60-Second Timeout. A single download exceeding 60 seconds will be aborted. Large files, slow networks, or long playlists may fail.
5. Redirect Limit is 5. An error will be reported if exceeded.
6. Clarity is Guessed. The label comes from the URL form and the Bilibili quality ID comparison table, not the real resolution after decoding.
7. The Project is New. The repository was created on 2026-08-14, version 0.1.0, with very few stars. Use it as a community small tool instead of a production-grade download suite.
Summary¶
dsh-video-downloader fills a narrow but indeed missing capability for DeepSeek Harness: allowing the agent to first check whether a link looks like media, then stream the direct link to local storage. The three tools have clear分工—analysis without network access, download with timeout and redirect handling, and quality parsing with pure regex. It is not a replacement for yt-dlp, nor a one-click downloader for playback pages; the boundaries are clearly stated in the README and source code, and it will be more stable to use it with direct links and in compliance with copyright rules.
- Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-video-downloader/
- GitHub: https://github.com/zimai233/dsh-video-downloader
- DeepSeek Harness: https://github.com/deepseek-ai/deepseek-harness