Introduction¶
In DeepSeek Harness (DSH) workflow development, video content often needs to pass through two rounds of models: first a local small model for coarse screening, then a cloud-based large model for the final decision. A common approach is to feed the entire video directly to the large model, or to rely on external annotation tools. The former consumes a large number of tokens, while the latter requires cross-platform collaboration. DSH’s plugin-based architecture is naturally suited for this kind of split: local handling for signal extraction, and cloud handling for judgment. Below is an introduction to a plugin that has already implemented this approach.
Plugin Overview¶
wth373737/dsh-video-localmodel is a workflow plugin developed by the maintainer wth373737. Its core value is: completing ASR transcription, scene segmentation, frame sampling, and text timeline generation locally, and handing the raw candidate frames to a cloud model for the final decision. The plugin does not contain video content itself, nor does it provide means to bypass website terms of service. All processing is performed locally.
Core Capabilities¶
The plugin performs video screening through four levels (L0–L4):
- L0 Deterministic Signals: Uses ffprobe for scene segmentation and frame sampling, with no model inference cost.
- L1 Local ASR: Calls Qwen3-ASR-0.6B for silence-aware chunking, generating SRT subtitles with timecodes. CPU speed is approximately 2.4× real-time.
- L2 Local Vision: Uses qwen3-vl:4b to describe sampled frames and score their importance (1–5), approximately 3 seconds per frame on GPU.
- L3 Local Text: Uses qwen2.5:7b to summarize subtitle windows, generating a timeline, chapters, and keywords, approximately 10 seconds per window.
- L4 Handoff: Outputs SRT, timeline Markdown, and native-resolution keyframes for the cloud model to read pixels and make the final judgment.
The plugin provides the following command-line tools:
video_local_plan: Detects ffmpeg/Python/ASR weights/Ollama models, reports specific models, and estimates cost.video_local_scan: Probes, extracts audio, runs local ASR, performs scene segmentation, and does coarse sampling. A 10-minute video takes approximately 5 minutes (CPU).video_local_caption: Uses a local VLM to describe frames and score importance, with resumable checkpoint support.video_local_timeline: Uses a local text model to generate a timeline, chapters, keywords, and keyframe ordering.video_local_export: Exports SRT, timeline Markdown, native keyframes, and best-frame images.video_local_frames: Exports raw frames for a specified time range (up to 12 frames).
All intermediate results are written to the <workspace>/.video/<file-key>/ directory, supporting re-runs without losing completed stages. ASR results are reused only when the plan has not changed; otherwise, re-run with force: true.
Installation & Activation¶
In DSH, open “Plugins → + Add plugin” and enter the following command:
github:wth373737/dsh-video-localmodel
After installation, restart DeepSeek Harness. The plugin does not download any content; it relies on ffmpeg, Python (with torch and qwen_asr), Ollama, and its models already installed on the system.
Typical Usage¶
-
Run
video_local_planfirst to check the environment and obtain the plan_id and a confirmed model list. -
Run
video_local_scanto perform local screening of the video. -
If you need to regenerate subtitles or scenes, pass
force: true, for example:
{
"plan_id": "xxx",
"force": true
}
-
Use
video_local_captionto describe and score the importance of sampled frames. -
Generate the timeline and chapters via
video_local_timeline. -
Finally, use
video_local_exportto export SRT, timeline Markdown, and native keyframes. -
Pass the exported keyframes and raw video frames to the cloud model for the final judgment.
Use Cases & Notes¶
Suitable for scenarios that require local video preprocessing to reduce cloud token consumption, such as video content screening, long-video summarization, and keyframe annotation.
Note: The plugin runs with the permissions of the current DSH process. Check the source code and license (MIT) before installation. All paths can be configured via the plugin settings, <workspace>/.video/settings.json, $DSH_HOME/video-localmodel.json, DSH_VIDEO_* environment variables, or conventional locations.
Value Summary¶
This plugin splits video screening into two stages—local signal extraction and cloud decision-making—using three local models (Qwen3-ASR, Qwen3-VL, and Qwen2.5) to complete transcription, frame description, and timeline generation. This reduces token consumption on cloud large models while preserving raw frames as evidence. For developers who need to process large volumes of video, it can significantly improve workflow efficiency.
- Plugin directory: https://www.skillhub.cn/plugins/wth373737/dsh-video-localmodel
- GitHub: https://github.com/wth373737/dsh-video-localmodel