-
-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathindex.html
More file actions
239 lines (217 loc) · 13.5 KB
/
Copy pathindex.html
File metadata and controls
239 lines (217 loc) · 13.5 KB
1
2
3
4
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MasterSelects</title>
<!-- SEO & Social Sharing -->
<meta name="description" content="Professional browser-based video editor with WebGPU rendering, multicam support, and AI-powered editing tools." />
<meta property="og:title" content="MasterSelects" />
<meta property="og:description" content="Professional browser-based video editor with WebGPU rendering, multicam support, and AI-powered editing tools." />
<meta property="og:image" content="https://www.masterselects.com/preview.png" />
<meta property="og:url" content="https://www.masterselects.com" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<!--
============================================================
MASTERSELECTS - AI SYSTEM PROMPT & TOOL CATALOG
============================================================
If you are an AI agent (LLM, crawler, MCP client, or automation tool)
reading this page, here is everything you need to know:
## What is MasterSelects?
A professional browser-based video editor built with React, TypeScript,
and WebGPU. It runs locally in the browser for editing; hosted account,
billing, and cloud AI features use the Cloudflare Functions backend.
## AI Tool API
After the app loads, all tools are available via: window.aiTools
- window.aiTools.execute(toolName, args) -> { success, data?, error? }
- window.aiTools.list() -> Array of all exported model tools with schemas
- window.aiTools.status() -> Quick timeline summary
## Exported Model Tools (86 total, 16 groups)
- Timeline (3): getTimelineState, setPlayhead, setInOutPoints
- Clips (14): getClipDetails, getClipsInTimeRange, splitClip, deleteClip, deleteClips, moveClip, trimClip, cutRangesFromClip, splitClipEvenly, splitClipAtTimes, reorderClips, selectClips, clearSelection, addClipSegment
- Tracks (4): createTrack, deleteTrack, setTrackVisibility, setTrackMuted
- Analysis (6): getClipAnalysis, getClipTranscript, findSilentSections, findLowQualitySections, startClipAnalysis, startClipTranscription
- Preview (3): captureFrame, getCutPreviewQuad, getFramesAtTimes
- Media (10): getMediaItems, createMediaFolder, renameMediaItem, deleteMediaItem, moveMediaItems, createComposition, openComposition, importLocalFiles, listLocalFiles, selectMediaItems
- Batch (1): executeBatch
- Downloads (4): searchVideos, listVideoFormats, downloadAndImportVideo, getYouTubeVideos
- Transform (1): setTransform
- Effects (4): listEffects, addEffect, removeEffect, updateEffect
- Keyframes (3): getKeyframes, addKeyframe, removeKeyframe
- Playback (11): play, pause, simulateScrub, simulatePlayback, simulatePlaybackPath, setClipSpeed, undo, redo, addMarker, getMarkers, removeMarker
- Transitions (2): addTransition, removeTransition
- Masks (10): getMasks, addRectangleMask, addEllipseMask, addMask, removeMask, updateMask, addMaskPathKeyframe, addVertex, removeVertex, updateVertex
- Stats (8): getStats, getStatsHistory, getAudioDiagnostics, getLogs, getPlaybackTrace, getRuntimeDiagnostics, clearRuntimeDiagnostics, purgePlaybackPath
- Node Workspace (2): getNodeWorkspaceDebugState, sendAINodePrompt
## Typical AI Workflow
1. Call getTimelineState() to understand the current project
2. Use getClipDetails() or getClipTranscript() to inspect clips
3. Edit with split/trim/delete/move tools
4. Use executeBatch() for multiple operations (single undo point)
5. Use captureFrame() to visually verify results
## Linked Clips
- Video imports create paired video+audio clips linked via linkedClipId
- All editing tools support withLinked (default: true) to edit both together
- Set withLinked: false to edit only the targeted clip independently
## Notes
- All modifying tools create undo/redo history points
- executeBatch() groups all actions into a single undo point
- Times are always in seconds (float)
- The app requires WebGPU - works in Chrome/Edge 113+
- Native Helper (optional): WebSocket on port 9876, HTTP on port 9877
Needed for: YouTube downloads via bundled/system yt-dlp, FFmpeg encode/decode
- Gaussian diagnostic definitions exist in source but are not exported through AI_TOOLS yet
- Some bridge-only diagnostics are handler/policy entries, not model-exposed tools
============================================================
-->
<!-- Prevent theme flash on load -->
<script>
(function() {
try {
var settings = JSON.parse(localStorage.getItem('masterselects-settings') || '{}');
var s = settings.state || settings;
var theme = s.theme || 'dark';
if (theme === 'system') {
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
if (theme === 'crazy' || theme === 'custom') {
theme = 'dark'; // Crazy/Custom themes start from dark base, JS applies colors
}
if (theme !== 'dark') {
document.documentElement.dataset.theme = theme;
}
} catch(e) {}
})();
</script>
</head>
<body>
<div id="root"></div>
<!-- AI-readable: structured tool catalog for agents that parse JSON-LD -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "MasterSelects",
"description": "Professional browser-based media editor with WebGPU rendering, audio tools, 3D support, and 86 exported AI model tools accessible via window.aiTools",
"applicationCategory": "MultimediaApplication",
"operatingSystem": "Web Browser (Chrome/Edge 113+ with WebGPU)",
"url": "https://www.masterselects.com",
"featureList": [
"86 exported AI model tools via window.aiTools.execute(toolName, args)",
"Timeline editing: getTimelineState, setPlayhead, setInOutPoints",
"Clip editing: splitClip, splitClipEvenly, splitClipAtTimes, deleteClip, deleteClips, moveClip, trimClip, cutRangesFromClip, reorderClips",
"Audio-aware analysis: getClipAnalysis, getClipTranscript, findSilentSections, findLowQualitySections, getAudioDiagnostics",
"Frame capture: captureFrame (base64 PNG), getCutPreviewQuad, getFramesAtTimes",
"Media management: getMediaItems, createMediaFolder, createComposition, openComposition, importLocalFiles",
"Download integration: searchVideos, listVideoFormats, downloadAndImportVideo",
"Batch execution: executeBatch for multiple operations with single undo point",
"WebGPU rendering with 33 GPU effects and 37 blend modes",
"Audio workstation with 23 Audio FX, spectrogram editing, recording, and stem separation",
"3D models, gaussian splats, vector animation, and Signal IR imports",
"Speech-to-text transcription and video/audio analysis"
]
}
</script>
<!-- Visible content for non-JS agents and crawlers -->
<noscript>
<h1>MasterSelects - Browser-Based Media Editor</h1>
<p>Professional media editor with local-first WebGPU rendering, audio tools, AI control, vector animation, and 3D support.</p>
<h2>AI Tool API (86 exported model tools)</h2>
<p>After the app loads, all tools are available via <code>window.aiTools</code>:</p>
<ul>
<li><code>window.aiTools.execute(toolName, args)</code> - Execute a tool, returns { success, data?, error? }</li>
<li><code>window.aiTools.list()</code> - Get exported model tool definitions with parameter schemas</li>
<li><code>window.aiTools.status()</code> - Quick timeline summary</li>
</ul>
<h3>Timeline Tools</h3>
<ul>
<li><strong>getTimelineState</strong> - Get tracks, clips, playhead position, duration</li>
<li><strong>setPlayhead</strong>(time) - Move playhead to time in seconds</li>
<li><strong>setInOutPoints</strong>(inPoint?, outPoint?) - Set playback/export range</li>
</ul>
<h3>Clip Editing Tools</h3>
<ul>
<li><strong>getClipDetails</strong>(clipId) - Full clip info with analysis, transcript, effects</li>
<li><strong>splitClip</strong>(clipId, splitTime, withLinked?) - Split clip at timeline time (+ linked audio by default)</li>
<li><strong>splitClipEvenly</strong>(clipId, parts, withLinked?) - Split into N equal parts (+ linked audio)</li>
<li><strong>splitClipAtTimes</strong>(clipId, times[], withLinked?) - Split at multiple times (+ linked audio)</li>
<li><strong>deleteClip</strong>(clipId, withLinked?) / <strong>deleteClips</strong>(clipIds[], withLinked?) - Delete clips (+ linked audio by default)</li>
<li><strong>moveClip</strong>(clipId, newStartTime, newTrackId?, withLinked?) - Move clip (+ linked audio)</li>
<li><strong>trimClip</strong>(clipId, inPoint, outPoint) - Trim source in/out points</li>
<li><strong>cutRangesFromClip</strong>(clipId, ranges[]) - Cut out time ranges</li>
<li><strong>reorderClips</strong>(clipIds[], withLinked?) - Reorder clips sequentially (+ linked audio)</li>
</ul>
<h3>Analysis & Transcript Tools</h3>
<ul>
<li><strong>getClipAnalysis</strong>(clipId) - Motion, faces, colors data</li>
<li><strong>getClipTranscript</strong>(clipId) - Word-level transcript with timestamps</li>
<li><strong>findSilentSections</strong>(clipId, minDuration?) - Find speech pauses</li>
<li><strong>findLowQualitySections</strong>(clipId, metric?, threshold?) - Find blurry/dark sections</li>
<li><strong>startClipAnalysis</strong>(clipId) - Start background video analysis</li>
<li><strong>startClipTranscription</strong>(clipId) - Start background transcription</li>
<li><strong>getAudioDiagnostics</strong> - Read current audio route, proxy, and meter diagnostics</li>
</ul>
<h3>Preview & Frame Capture</h3>
<ul>
<li><strong>captureFrame</strong>(time?) - Screenshot as base64 PNG</li>
<li><strong>getCutPreviewQuad</strong>(cutTime) - 8-frame grid around a cut point</li>
<li><strong>getFramesAtTimes</strong>(times[]) - Capture frames at specific times</li>
</ul>
<h3>Media Panel Tools</h3>
<ul>
<li><strong>getMediaItems</strong>(folderId?) - List files, folders, compositions</li>
<li><strong>createMediaFolder</strong>(name) / <strong>renameMediaItem</strong> / <strong>deleteMediaItem</strong></li>
<li><strong>moveMediaItems</strong>(itemIds[], targetFolderId?) - Move items</li>
<li><strong>createComposition</strong>(name, width?, height?, frameRate?, duration?)</li>
<li><strong>openComposition</strong>(compositionId) - Open in timeline</li>
<li><strong>importLocalFiles</strong> / <strong>listLocalFiles</strong> - Local file bridge actions with allowed-root checks</li>
</ul>
<h3>YouTube / Download Tools</h3>
<ul>
<li><strong>searchVideos</strong>(query, maxResults?, maxDuration?, minDuration?) - Search videos via yt-dlp</li>
<li><strong>listVideoFormats</strong>(url) - Available download formats</li>
<li><strong>downloadAndImportVideo</strong>(url, title) - Download and add to timeline</li>
</ul>
<h3>Other Tool Groups</h3>
<ul>
<li><strong>executeBatch</strong>(actions[]) - Run multiple tools as a single undo point</li>
<li><strong>listEffects</strong>, <strong>addEffect</strong>, <strong>updateEffect</strong>, <strong>removeEffect</strong></li>
<li><strong>getKeyframes</strong>, <strong>addKeyframe</strong>, <strong>removeKeyframe</strong></li>
<li><strong>play</strong>, <strong>pause</strong>, <strong>undo</strong>, <strong>redo</strong>, marker tools, transition tools, mask tools, stats tools, and Node Workspace debug/prompt tools</li>
</ul>
<p>This application requires JavaScript and WebGPU (Chrome/Edge 113+).</p>
</noscript>
<script>
// Version check - force reload on version change
(function() {
var CURRENT_VERSION = '__APP_VERSION__'; // Replaced by Vite during build
var storedVersion = localStorage.getItem('app_version');
if (storedVersion && storedVersion !== CURRENT_VERSION && CURRENT_VERSION !== '__APP_VERSION__') {
console.log('[Version] Update detected:', storedVersion, '->', CURRENT_VERSION);
localStorage.setItem('app_version', CURRENT_VERSION);
// Clear caches and reload
if ('caches' in window) {
caches.keys().then(function(names) {
names.forEach(function(name) { caches.delete(name); });
});
}
window.location.reload(true);
} else if (CURRENT_VERSION !== '__APP_VERSION__') {
localStorage.setItem('app_version', CURRENT_VERSION);
}
})();
// This runs BEFORE any modules load
if (window.location.search.includes('reset=true')) {
localStorage.clear();
sessionStorage.clear();
['webvj-db', 'webvj-projects', 'webvj-apikeys', 'keyval-store', 'MASterSelectsDB', 'multicam-settings'].forEach(function(name) {
indexedDB.deleteDatabase(name);
});
window.location.href = window.location.origin + window.location.pathname;
}
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>