qwen-mm-plugins-video-memory

Builds hierarchical graph memory from long videos for semantic search and retrieval.

2.9k|185|Updated Jul 29, 2026
One-click install
npx skills add https://github.com/QwenLM/Qwen-MM-Plugins --skill qwen-mm-plugins-video-memory-qwenlm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: qwen-mm-plugins-video-memory
Source: https://github.com/QwenLM/Qwen-MM-Plugins/tree/main/src/capabilities/video-memory/skill
Command: npx skills add https://github.com/QwenLM/Qwen-MM-Plugins --skill qwen-mm-plugins-video-memory-qwenlm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opencv-python-headless, numpy, dashscope, requests, oss2, and includes scripts (resource) components.

What problem does it solve? Standard video reading tools sample too few frames to meaningfully cover videos longer than 30 minutes, so questions about multi-hour footage go unanswered. This Skill builds a persistent hierarchical graph memory (Root, SuperEvent, MacroEvent, Subgraph) for long videos, letting you locate and inspect any segment through semantic search instead of re-scanning the whole file. ## Core Features & Use Cases - Hierarchical Memory Construction: Segments long videos via HLS frame-diff scene detection, extracts entities, events, OCR text, and relations per segment with a vision-language model, and aggregates them into a 4-level tree stored in <video_path>.memory/. - Semantic Retrieval Tools: Query memory with search_nodes, search_ocr_text, search_asr_text, search_by_time, and enumerate_events, then drill down with get_subgraph for full detail on a located segment. - Parallel Build Pipeline: Splits long videos into chunks processed concurrently with checkpointing, resume support, ASR transcription, and hybrid dense-plus-BM25 embedding indexes. - Use Case: Given a 3-hour lecture recording, build its memory once, then ask "What did the speaker say about gradient descent?" to locate the exact segment and inspect frames with read_video over a narrow time range. ## Quick Start Ask the agent to build memory for your long video with build_memory.sh and then answer questions about its content using the video-memory tools.

Frequently Asked Questions about qwen-mm-plugins-video-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search content inside a long video?

Build graph memory first with build_memory.sh, which creates a <video_path>.memory/ directory. Then use search_nodes for people, actions, and events, search_ocr_text for on-screen text, or search_by_time for time ranges, followed by get_subgraph for full detail.

How do I build memory for a video file?

Run bash script/build_memory/build_memory.sh /path/to/video.mp4 with DASHSCOPE_API_KEY set. The script segments the video, extracts subgraphs in parallel chunks, transcribes audio with ASR, and writes graph_memory.json plus embeddings.npz.

When should I use video memory instead of read_video?

Use video memory for any video longer than 30 minutes, since read_video samples too few frames to cover multi-hour content. After memory locates a segment, use read_video with a narrow start_time and end_time for frame-level inspection.

Does the memory build support resuming after interruption?

Yes. The pipeline writes checkpoints such as 01_macros.json, per-macro subgraph files, and chunk-level done markers. Re-running build_memory.sh skips completed chunks and can rebuild missing embeddings.npz from an existing graph_memory.json.

What API key and dependencies does the build require?

The build requires a DashScope API key set via DASHSCOPE_API_KEY or ~/.qwen-mm-plugins/config, plus ffmpeg, opencv-python-headless, numpy, and dashscope. The shell script attempts to install missing Python packages automatically.

Why does search_nodes return poor results for on-screen text?

OCR text is stored in a separate index from entity and event nodes, so search_nodes never matches it. Use search_ocr_text for scores, jersey numbers, and broadcast graphics, and search_asr_text for spoken dialogue or narration.