Concepts2 of 2
Supported formats
GLSL, p5.js, Three.js, video and stills.
Operatour plays three named kinds of sketch today. Anything else is refused by name, not loaded in hope.
GLSL
A folder with a sketch.glsl, or the .glsl file alone. No page,
render loop or boilerplate: Operatour supplies them, and the audio as
uniforms.
GLSL ES 3.00 and GLSL ES 1.00 (what most shaders online still use), detected from the source. Shadertoy, glslsandbox and The Book of Shaders shaders run as is, their own uniforms set every frame.
p5
A folder with a sketch.js that declares setup() or draw().
Global mode, as the p5 web editor writes it. Operatour supplies p5.js: no
library, no index.html, works offline.
See writing a p5 sketch.
Three.js
A folder with a scene.js that exports a function. An ES module:
import * as THREE from 'three' at the top, as in the Three.js docs, and one
export default function (stage) that builds the scene and returns
{ scene, camera, update }.
Three.js has no canonical export, so Operatour defines this one and holds it
frozen, like the audio contract. Operatour supplies Three.js, offline, plus
the canvas, renderer, loop and resizing; your module never creates a renderer,
runs a loop or touches a CDN. Addons import from three/addons/..., as every
tutorial spells them.
Video
A video file, or a folder with one video. .mp4, .m4v, .webm or
.mov: drop the clip or its folder on the window.
A layer, not a deck: same opacity, blend mode, placement and parameters as any layer, in the same stack as your sketches. Two parameters of its own: Speed (music can drive it) and Restart (a beat can fire it).
Codecs. H.264, HEVC, VP9 and AV1 play. HAP and ProRes do not: clips play in a browser engine, and no browser decodes either. Most commercial VJ packs ship HAP; convert first:
ffmpeg -i clip.mov -c:v libx264 -pix_fmt yuv420p -an clip.mp4
Transparency, and what to encode for a show
Use VP9 with alpha, in a .webm. A clip with alpha overlays your
sketches instead of covering them.
Measured on an Apple M3 Max at 60 fps, several copies at once (a set is never one clip). 4K first, the resolution a show runs at:
3840 × 2160 · frames per second per clip
| Encoding | Alpha | 1 | 2 | 4 | 6 |
|---|---|---|---|---|---|
| VP9 + alpha (webm) | yes | 60 | 60.1 | 58.8 | 58.4 |
| HEVC + alpha (mp4) | yes | 60 | 60.1 | 59.1 | 59.0 |
| VP8 + alpha (webm) | yes | 58.8 | 50.5 | 26.2 | 17.2 |
| H.264 (no alpha) | no | 60 | 60.2 | 59.7 | 60.2 |
1920 × 1080
| Encoding | 1 | 8 | 12 | Size (8 s) |
|---|---|---|---|---|
| VP9 + alpha | 60.4 | 60.4 | 60.7 | 15.4 MB |
| HEVC + alpha | 60.4 | 60.5 | 59.5 | 7.3 MB |
| VP8 + alpha | 60.4 | 42.8 | 28.6 | 8.1 MB |
| H.264 (no alpha) | 60.4 | 60.4 | 60.4 | 11.7 MB |
Alpha is close to free, even at 4K. Six simultaneous 4K clips with alpha hold 58-59 fps against H.264's 60 without: a frame or two.
VP8 is the trap. Fine on one clip; two thirds of its frame rate gone by six at 4K. It fails on the night, not in rehearsal. Do not use it.
HEVC with alpha matches VP9, smaller at 1080p; the better choice if everything you play is on a Mac.
# VP9 with alpha - the one to standardise on
ffmpeg -i source.mov -c:v libvpx-vp9 -pix_fmt yuva420p -b:v 0 -crf 30 -row-mt 1 -an out.webm
# HEVC with alpha - smaller, macOS
ffmpeg -i source.mov -c:v hevc_videotoolbox -alpha_quality 0.9 -tag:v hvc1 -pix_fmt bgra -an out.mp4
The source needs a real alpha channel: export ProRes 4444 or QuickTime Animation from your editor, then convert.
One machine, and a fast one. A venue laptop will be slower; the ordering holds, not the figures.
A folder with two or more videos is not a video layer: a silent choice is how a show plays the wrong thing in front of a room. Point at the one you mean.
What about a web page?
A whole web page (an index.html with its own scripts) is not a kind.
Operatour lists it and refuses to start it. A page is a platform, not a
runtime with a testable claim; "we run web pages" is the promise that turns
into probably.