Introduction¶
When building agents or workflows based on DeepSeek Harness (DSH), you will frequently encounter scenarios that require processing video content. Currently, there are two main approaches to handling video: either letting the model directly “watch” the video, though the model’s understanding of video is limited and it struggles to locate key information; or manually downloading the video and transcribing it into text, which is time-consuming and error-prone.
The dsh-video plugin automates the process of downloading, audio extraction, Whisper transcription, and document generation, turning a video link into a structured document, making downstream retrieval, Q&A, and archiving feasible.
What Is This¶
dsh-video is a DeepSeek Harness plugin that converts video links (or local files) into searchable documents. The plugin was developed by maintainer junliu3 and is categorized under “Workflow.” It completes the conversion through the following steps: downloading video or audio, extracting audio, transcribing with a local Whisper model, and generating multi-format output.
Core Features¶
The plugin encapsulates the video processing pipeline into multiple tools, callable from the DSH chat interface or the command line.
Download and Transcription¶
The plugin supports two download channels: for Douyin, it uses a headless browser via CDP to obtain a watermark-free 1080p direct stream; for other sites, it downloads mp4 (combined audio and video) or mp3 via yt-dlp. The downloaded audio is converted to 16 kHz mono WAV format and transcribed locally using faster-whisper.
Output Formats¶
Upon completion, the plugin generates the following files in a folder named after the video ID:
- report.md: A structured document with front matter metadata
- report.docx: A Word document version
- transcript.srt: A timestamped subtitle file, directly importable into CapCut or PotPlayer
- transcript.txt: A plain-text transcript
- segments.json: Timestamped segment data for downstream tools
- media.json: Metadata including source URL, title, duration, capture time, model, etc.
Tool List¶
| Tool | Purpose |
|---|---|
| video_doctor | Environment self-check with repair suggestions |
| video_download | Download media only, without generating a transcript |
| video_to_doc | Full pipeline, generating all output files |
| video_job_status | Query job progress and results |
| video_job_cancel | Cancel a job and clean up resources |
| video_library | Browse or read past transcription results |
Working Modes¶
In the chat interface, users can invoke these tools using natural language. For example:
- Paste a video link to automatically trigger video_to_doc
- Query transcribed videos: video_library
- View a specific video’s document: video_library + video ID
- Download audio only: video_download + kind: audio
- Query job status: video_job_status + jobId
- Cancel a job: video_job_cancel + jobId
For long-running tasks, video_to_doc returns a jobId, and progress can be polled via video_job_status.
Installation and Setup¶
Environment Requirements¶
- DSH 0.2.1-rc.2 or later (tested with 0.2.1-rc.5)
- Node.js 20+
- Python 3.11+ (3.12 recommended)
- FFmpeg and ffprobe (in PATH or the
tools/ffmpeg/bin/directory) - Approximately 2.5 GB disk space (Python environment) + 0.5–3 GB (Whisper model)
- Microsoft Edge browser (Douyin channel only; Linux/macOS falls back to yt-dlp)
1. Get the Code¶
git clone https://github.com/junliu3/dsh-video.git
cd dsh-video
2. Build the Python Environment¶
npm run bootstrap # Create virtual env, install dependencies, and download model
npm run bootstrap -- --skip-model # Skip model download
npm run bootstrap -- --model medium # Specify model size
bootstrap creates python/.venv-asr/, installs the dependencies listed in python/requirements.txt (faster-whisper, yt-dlp, python-docx, requests, websockets), and downloads Whisper weights from hf-mirror.com.
3. Install into DSH¶
dsh plugin --profile desktop add "C:\path\to\dsh-video"
Then ensure the desktop profile lists the plugin as a bundle:
// ~/.dsh/profiles/desktop/package.json
"dsh": { "profile": { "bundles": [ ..., "dsh-video" ] } }
Restart DSH. The plugin tree is composed at startup.
4. Verify the Environment¶
In the chat, ask the model to “check the video-to-document environment,” or run directly:
npm run doctor
This command performs nine checks: Python, virtual environment, faster-whisper, ffmpeg, ffprobe, model, yt-dlp, Edge, and library write permissions.
Install Directly from GitHub (without cloning)¶
dsh plugin --profile desktop add github:junliu3/dsh-video
# or
dsh plugin --profile desktop add https://codeload.github.com/junliu3/dsh-video/tar.gz/refs/heads/main
After installation, you still need to run npm run bootstrap in ~/.dsh/profiles/desktop/node_modules/dsh-video to build the Python environment.
Typical Usage¶
Processing Video in the Chat Interface¶
Simply send a video link to trigger the full pipeline:
Turn this into a document: https://www.douyin.com/video/7700987993812749610
The plugin will download the video, transcribe it, and generate a report. You can also:
- Ask for the list of transcribed videos:
What videos have I transcribed? - View a specific video’s document:
Show me the document for BV1GJ411x7h7 - Download audio only:
Just download the audio: https://youtu.be/xxxx - Query job status:
Is that one done yet? - Cancel a job:
Stop it
Command-Line Usage¶
The plugin provides a standalone CLI that can run without DSH:
cd python
.venv-asr/Scripts/python.exe -m ytdip.cli "https://www.douyin.com/video/xxx"
.venv-asr/Scripts/python.exe -m ytdip.cli "https://www.bilibili.com/video/BVxxx" --audio
.venv-asr/Scripts/python.exe -m ytdip.cli --file "D:\talk.mp4" --id team-sync
.venv-asr/Scripts/python.exe -m ytdip.cli "link" --json
.venv-asr/Scripts/python.exe -m ytdip.doctor
.venv-asr/Scripts/python.exe -m ytdip.fetch_model medium
.venv-asr/Scripts/python.exe -m ytdip.migrate --from "D:\old\library"
Common parameters include --download-only, --audio, --model, --device cpu|cuda, --lang zh|en|auto, --keep-wav, --drop-media, and --no-docx.
Use Cases and Notes¶
The plugin is well suited for scenarios where video content needs to be converted into searchable text, such as:
- Meeting notes organization
- Course content archiving
- Social media content analysis
- Video subtitle generation
Note: The plugin runs with the permissions of the current DSH process. Review the source code and license before installation. All audio processing is performed locally and is never uploaded to a remote server.
Conclusion¶
dsh-video encapsulates the download, transcription, and document generation pipeline, making video content retrievable and usable just like text. If you are building workflows based on DeepSeek Harness, this plugin can serve as a standard entry point for video processing.