refactor: switch index from SQLite to JSON with relative paths
manage_index.py: - Complete rewrite from SQLite to JSON file format - All file paths stored as relative (relative to video directory) - Moving the entire video directory does not break references - Paths outside video dir stored as absolute (editable in text editor) - Same 8 subcommands, same CLI interface SKILL.md: - Step 5: SQLite schema replaced with JSON structure example - Verification checklist: .vedit.db → .vedit.json README.md + README.zh.md: - Features: 'SQLite database' → 'JSON file with relative paths' - Project structure: 'SQLite index management' → 'JSON index management' - 'Index Database' section → 'Index File' with relative path explanation .gitignore: - *.vedit.db → *.vedit.json
This commit is contained in:
@@ -8,7 +8,7 @@ An agent skill that helps plan video edits through iterative dialogue — transc
|
||||
|
||||
- **Audio transcription** — bundled [funasr-script](https://github.com/modelscope/FunASR) with Fun-ASR-Nano (default, high quality, Chinese-optimized) and SenseVoice (fast preview) models
|
||||
- **On-demand frame extraction** — ffmpeg-based clip cutting (`-c copy`) + scene-change detection + uniform sampling, with hardware acceleration (CUDA/NVDEC preferred)
|
||||
- **Artifact indexing** — SQLite database tracks all transcriptions, clips, and frames to avoid duplicate processing across sessions
|
||||
- **Artifact indexing** — JSON file tracks all transcriptions, clips, and frames with relative paths to avoid duplicate processing across sessions
|
||||
- **Vision analysis guidance** — binary-search-style frame sampling strategy; works with any vision-capable model the agent's runtime provides
|
||||
- **Iterative edit plans** — Markdown-table output (timecodes, segment descriptions, actions, transitions, notes) refined through follow-up questions
|
||||
- **Agent-agnostic** — no platform-specific tool names; works with any agent framework (Hermes, Claude Code, Codex, etc.)
|
||||
@@ -81,20 +81,20 @@ video-edit-planner/
|
||||
│ ├── frames/
|
||||
│ │ └── extract_frames.py # Clip extraction + frame sampling (ffmpeg wrapper)
|
||||
│ └── index/
|
||||
│ └── manage_index.py # SQLite index management (8 subcommands)
|
||||
│ └── manage_index.py # JSON index management (8 subcommands)
|
||||
└── references/
|
||||
└── frame-extraction-guide.md # Vision model token costs, resolution/batch guidance
|
||||
```
|
||||
|
||||
## Index Database
|
||||
## Index File
|
||||
|
||||
All processing artifacts are tracked in an SQLite database (`<video_stem>.vedit.db`) stored next to the video file:
|
||||
All processing artifacts are tracked in a JSON file (`<video_stem>.vedit.json`) stored next to the video file:
|
||||
|
||||
- **transcription** — JSON path, track index, duration
|
||||
- **transcriptions** — JSON path, track index, duration
|
||||
- **clips** — start/end time, file path, extraction reason
|
||||
- **frames** — timestamp, file path, scene score, extraction method
|
||||
|
||||
This avoids re-transcribing or re-extracting frames for the same video across sessions.
|
||||
All paths are stored as **relative paths** (relative to the video directory), so moving the entire directory does not break references. The JSON file is human-readable and editable with any text editor.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user