vidclaude 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/setup.js +44 -45
- package/bin/vidclaude.js +27 -27
- package/npm-README.md +117 -0
- package/package.json +3 -2
package/bin/setup.js
CHANGED
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { execSync } = require("child_process");
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
console.log("
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const reqPath = path.join(__dirname, "..", "requirements.txt");
|
|
7
|
+
|
|
8
|
+
console.log("vidclaude: Installing Python dependencies...");
|
|
9
|
+
|
|
10
|
+
// Check Python exists
|
|
11
|
+
try {
|
|
12
|
+
execSync("python --version", { stdio: "pipe" });
|
|
13
|
+
} catch {
|
|
14
|
+
console.warn(
|
|
15
|
+
"\nPython not found. You need Python 3.10+ to use vidclaude.\n" +
|
|
16
|
+
" Install from: https://python.org\n" +
|
|
17
|
+
" Then run: pip install -r requirements.txt\n"
|
|
18
|
+
);
|
|
19
|
+
process.exit(0); // Don't fail npm install
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Check ffmpeg exists
|
|
23
|
+
try {
|
|
24
|
+
execSync("ffmpeg -version", { stdio: "pipe" });
|
|
25
|
+
} catch {
|
|
26
|
+
console.warn(
|
|
27
|
+
"\nffmpeg not found. You need ffmpeg to use vidclaude.\n" +
|
|
28
|
+
" Windows: winget install ffmpeg\n" +
|
|
29
|
+
" macOS: brew install ffmpeg\n" +
|
|
30
|
+
" Linux: sudo apt install ffmpeg\n"
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Install Python deps
|
|
35
|
+
try {
|
|
36
|
+
execSync(`pip install -r "${reqPath}"`, { stdio: "inherit" });
|
|
37
|
+
console.log("\nvidclaude: Setup complete!");
|
|
38
|
+
console.log(" Run: npx vidclaude video.mp4 --extract --mode standard --verbose\n");
|
|
39
|
+
} catch {
|
|
40
|
+
console.warn(
|
|
41
|
+
"\nFailed to install Python dependencies.\n" +
|
|
42
|
+
" Try manually: pip install -r requirements.txt\n"
|
|
43
|
+
);
|
|
44
|
+
}
|
package/bin/vidclaude.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { spawn } = require("child_process");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
|
|
6
|
-
const scriptPath = path.join(__dirname, "..", "video_understand.py");
|
|
7
|
-
const args = process.argv.slice(2);
|
|
8
|
-
|
|
9
|
-
// Pass all arguments through to the Python script
|
|
10
|
-
const proc = spawn("python", [scriptPath, ...args], {
|
|
11
|
-
stdio: "inherit",
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
proc.on("error", (err) => {
|
|
15
|
-
if (err.code === "ENOENT") {
|
|
16
|
-
console.error(
|
|
17
|
-
"Error: Python not found. Install Python 3.10+ from https://python.org"
|
|
18
|
-
);
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
console.error(`Error: ${err.message}`);
|
|
22
|
-
process.exit(1);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
proc.on("close", (code) => {
|
|
26
|
-
process.exit(code || 0);
|
|
27
|
-
});
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const scriptPath = path.join(__dirname, "..", "video_understand.py");
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
// Pass all arguments through to the Python script
|
|
10
|
+
const proc = spawn("python", [scriptPath, ...args], {
|
|
11
|
+
stdio: "inherit",
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
proc.on("error", (err) => {
|
|
15
|
+
if (err.code === "ENOENT") {
|
|
16
|
+
console.error(
|
|
17
|
+
"Error: Python not found. Install Python 3.10+ from https://python.org"
|
|
18
|
+
);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
console.error(`Error: ${err.message}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
proc.on("close", (code) => {
|
|
26
|
+
process.exit(code || 0);
|
|
27
|
+
});
|
package/npm-README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# vidclaude
|
|
2
|
+
|
|
3
|
+
Multimodal video understanding for Claude Code. Extract frames, transcribe audio in 90+ languages, build temporal timelines — all from a single command. No API key needed.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g vidclaude
|
|
7
|
+
vidclaude video.mp4 --mode standard --verbose
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
- **Python 3.10+** — [python.org](https://python.org)
|
|
13
|
+
- **ffmpeg** — Windows: `winget install ffmpeg` / macOS: `brew install ffmpeg` / Linux: `sudo apt install ffmpeg`
|
|
14
|
+
|
|
15
|
+
Python dependencies (Pillow, faster-whisper) are installed automatically during `npm install`.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g vidclaude
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Or use without installing:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx vidclaude video.mp4 --mode standard --verbose
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
### With Claude Code (recommended, no API key needed)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Set up the skill in your project (one time)
|
|
35
|
+
vidclaude --install-skill
|
|
36
|
+
|
|
37
|
+
# Then in Claude Code, just say:
|
|
38
|
+
# "analyze the video at path/to/video.mp4"
|
|
39
|
+
# "what does the speaker say about the budget?"
|
|
40
|
+
# "when does the chart appear on screen?"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Your Max/Pro plan covers everything. Follow-up questions are instant (cached).
|
|
44
|
+
|
|
45
|
+
### Standalone CLI
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Standard analysis
|
|
49
|
+
vidclaude video.mp4 --mode standard --verbose
|
|
50
|
+
|
|
51
|
+
# Quick (fewer frames, faster)
|
|
52
|
+
vidclaude video.mp4 --mode quick
|
|
53
|
+
|
|
54
|
+
# Deep (dense frames, full OCR)
|
|
55
|
+
vidclaude video.mp4 --mode deep --verbose
|
|
56
|
+
|
|
57
|
+
# Batch process a folder
|
|
58
|
+
vidclaude ./videos/ --verbose
|
|
59
|
+
|
|
60
|
+
# Skip audio / force fresh extraction
|
|
61
|
+
vidclaude video.mp4 --no-audio --no-cache
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Modes
|
|
65
|
+
|
|
66
|
+
| Mode | Frames | Whisper model | Best for |
|
|
67
|
+
|------|--------|---------------|----------|
|
|
68
|
+
| `quick` | ~20 | base | Short clips, fast overview |
|
|
69
|
+
| `standard` | ~60, shot-aware | large-v3 | General use |
|
|
70
|
+
| `deep` | ~150, burst sampling | large-v3 | Long videos, detailed review |
|
|
71
|
+
|
|
72
|
+
## What it extracts
|
|
73
|
+
|
|
74
|
+
Every run creates a `.vidcache/` directory:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
.vidcache/<hash>/
|
|
78
|
+
evidence.md ← Report for Claude to read
|
|
79
|
+
frames/ ← Extracted JPEG frames
|
|
80
|
+
transcript.json ← Timestamped speech (90+ languages)
|
|
81
|
+
timeline.json ← Unified event timeline
|
|
82
|
+
meta.json ← Video metadata
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## How it works
|
|
86
|
+
|
|
87
|
+
1. **Frames** — Adaptive sampling with shot boundary detection via ffmpeg
|
|
88
|
+
2. **Audio** — faster-whisper large-v3 transcription with auto language detection
|
|
89
|
+
3. **OCR** — On-screen text extraction via pytesseract (optional)
|
|
90
|
+
4. **Timeline** — Merges all modalities into a time-sorted event list
|
|
91
|
+
5. **Evidence** — Generates `evidence.md` that Claude reads and reasons over
|
|
92
|
+
|
|
93
|
+
## CLI Reference
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
vidclaude [input] [options]
|
|
97
|
+
|
|
98
|
+
--install-skill Set up Claude Code skill
|
|
99
|
+
--mode {quick,standard,deep} Processing mode (default: standard)
|
|
100
|
+
-f, --fps N Override frames per second
|
|
101
|
+
-m, --max-frames N Override max frame count
|
|
102
|
+
--no-audio Skip transcription
|
|
103
|
+
--no-ocr Skip OCR
|
|
104
|
+
--no-cache Force re-extraction
|
|
105
|
+
--verbose Show progress
|
|
106
|
+
-o FILE Write output to file
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Also available via pip
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pip install vidclaude
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vidclaude",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Multimodal video understanding for Claude Code — extract frames, transcribe audio, build timelines from any video",
|
|
5
5
|
"bin": {
|
|
6
6
|
"vidclaude": "./bin/vidclaude.js"
|
|
7
7
|
},
|
|
8
|
+
"readme": "npm-README.md",
|
|
8
9
|
"files": [
|
|
9
10
|
"bin/",
|
|
10
11
|
"vidclaude/",
|
|
11
12
|
"video_understand.py",
|
|
12
13
|
"requirements.txt",
|
|
13
14
|
"SKILL.md",
|
|
14
|
-
"README.md"
|
|
15
|
+
"npm-README.md"
|
|
15
16
|
],
|
|
16
17
|
"scripts": {
|
|
17
18
|
"postinstall": "node ./bin/setup.js"
|