PlanOpticon

planopticon / docs / guide / batch.md
1
# Batch Processing
2
3
## Basic usage
4
5
```bash
6
planopticon batch -i ./recordings -o ./output --title "Sprint Reviews"
7
```
8
9
## How it works
10
11
Batch mode:
12
13
1. Scans the input directory for video files matching the pattern
14
2. Processes each video through the full single-video pipeline
15
3. Merges knowledge graphs across all videos with fuzzy matching and conflict resolution
16
4. Generates a batch summary with aggregated stats and action items
17
5. Writes a batch manifest linking to per-video results
18
19
## File patterns
20
21
```bash
22
# Default: common video formats
23
planopticon batch -i ./recordings -o ./output
24
25
# Custom patterns
26
planopticon batch -i ./recordings -o ./output --pattern "*.mp4,*.mov"
27
```
28
29
## Output structure
30
31
```
32
output/
33
├── batch_manifest.json # Batch-level manifest
34
├── batch_summary.md # Aggregated summary
35
├── knowledge_graph.db # Merged KG across all videos (SQLite, primary)
36
├── knowledge_graph.json # Merged KG across all videos (JSON export)
37
└── videos/
38
├── meeting-01/
39
│ ├── manifest.json
40
│ ├── transcript/
41
│ ├── diagrams/
42
│ ├── captures/
43
│ └── results/
44
│ ├── analysis.md
45
│ ├── analysis.html
46
│ ├── knowledge_graph.db
47
│ ├── knowledge_graph.json
48
│ ├── key_points.json
49
│ └── action_items.json
50
└── meeting-02/
51
├── manifest.json
52
└── ...
53
```
54
55
## Knowledge graph merging
56
57
When the same entity appears across multiple videos, PlanOpticon merges them using a multi-strategy approach:
58
59
### Entity deduplication
60
61
- **Case-insensitive exact matching** -- `"kubernetes"` and `"Kubernetes"` are recognized as the same entity
62
- **Fuzzy name matching** -- Uses `SequenceMatcher` with a threshold of 0.85 to unify near-duplicate entities (e.g., `"K8s"` and `"k8s cluster"` may be matched depending on context)
63
- **Descriptions are unioned** -- All unique descriptions from each video are combined
64
- **Occurrences are concatenated with source tracking** -- Each occurrence retains its source video reference
65
66
### Relationship deduplication
67
68
- Relationships are deduplicated by (source, target, type) tuple
69
- Descriptions from duplicate relationships are merged
70
71
### Type conflict resolution
72
73
When the same entity appears with different types across videos, PlanOpticon uses a specificity ranking to resolve the conflict. More specific types are preferred over general ones:
74
75
- `technology` > `concept`
76
- `person` > `concept`
77
- `organization` > `concept`
78
- And so on through the full type hierarchy
79
80
This ensures that an entity initially classified as a generic `concept` in one video gets upgraded to `technology` if it is identified more specifically in another.
81
82
The merged knowledge graph is saved at the batch root in both SQLite (`knowledge_graph.db`) and JSON (`knowledge_graph.json`) formats, and is included in the batch summary as a Mermaid diagram.
83
84
## Error handling
85
86
If a video fails to process, the batch continues. Failed videos are recorded in the batch manifest with error details:
87
88
```json
89
{
90
"video_name": "corrupted-file",
91
"status": "failed",
92
"error": "Audio extraction failed: no audio track found"
93
}
94
```
95
96
The batch manifest tracks completion status:
97
98
```json
99
{
100
"title": "Sprint Reviews",
101
"total_videos": 5,
102
"completed_videos": 4,
103
"failed_videos": 1,
104
"total_diagrams": 12,
105
"total_action_items": 23,
106
"total_key_points": 45,
107
"videos": [...],
108
"batch_summary_md": "batch_summary.md",
109
"merged_knowledge_graph_json": "knowledge_graph.json",
110
"merged_knowledge_graph_db": "knowledge_graph.db"
111
}
112
```
113
114
## Using batch results
115
116
### Query the merged knowledge graph
117
118
After batch processing completes, the merged knowledge graph at the batch root contains entities and relationships from all successfully processed videos. You can query it just like a single-video knowledge graph:
119
120
```bash
121
# Show stats for the merged graph
122
planopticon query --db output/knowledge_graph.db
123
124
# List all people mentioned across all videos
125
planopticon query --db output/knowledge_graph.db "entities --type person"
126
127
# See what connects to an entity across all videos
128
planopticon query --db output/knowledge_graph.db "neighbors Alice"
129
130
# Ask natural language questions about the combined content
131
planopticon query --db output/knowledge_graph.db "What technologies were discussed across all meetings?"
132
133
# Interactive REPL for exploration
134
planopticon query --db output/knowledge_graph.db -I
135
```
136
137
### Export merged results
138
139
All export commands work with the merged knowledge graph:
140
141
```bash
142
# Generate documents from merged KG
143
planopticon export markdown output/knowledge_graph.db -o ./docs
144
145
# Export as Obsidian vault
146
planopticon export obsidian output/knowledge_graph.db -o ./vault
147
148
# Generate a project-wide exchange file
149
planopticon export exchange output/knowledge_graph.db --name "Sprint Reviews Q4"
150
151
# Generate a GitHub wiki
152
planopticon wiki generate output/knowledge_graph.db -o ./wiki
153
```
154
155
### Classify for planning
156
157
Run taxonomy classification on the merged graph to categorize entities across all videos:
158
159
```bash
160
planopticon kg classify output/knowledge_graph.db
161
```
162
163
### Use with the planning agent
164
165
The planning agent can consume the merged knowledge graph for cross-video analysis and planning:
166
167
```bash
168
planopticon agent --db output/knowledge_graph.db
169
```
170
171
### Incremental batch processing
172
173
If you add new videos to the recordings directory, you can re-run the batch command. Videos that have already been processed (with output directories present) will be detected via checkpoint/resume within each video's pipeline, making incremental processing efficient.
174
175
```bash
176
# Add new recordings to the folder, then re-run
177
planopticon batch -i ./recordings -o ./output --title "Sprint Reviews"
178
```
179

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button