Ollin

Video

These examples use recorded footage as drawing material. Video playback lives in a separate library, so add import OllinVideo. The library provides a VideoPlayer, which presents each decoded frame as a GPU-textured Image. A sketch then draws that image with drawImage. See the Video reference.

ExampleWhat it shows
VideoPlaybackloops a video file as a live image, draws it letterboxed with drawFrame, and draws a playback-progress line along the bottom; by default it plays a bundled clip (Voladores de Papantla México by José Millán, CC BY-SA, the Totonac pole-flying ritual dance), or you pass a path on launch to play your own video (VideoPlayer, drawFrame, duration/currentTime)
SoundReactiveanalyzes the playing clip's own soundtrack live, and draws spectrum bars and a beat-kick ring over the footage they react to (Soundtrack(of: player), bands, beat; it also needs import OllinAudio); its clip pairs the voladores footage with the El Fandanguito violin recording as the soundtrack, and both are CC BY-SA

To run one, use swift run Example-Video-VideoPlayback (or Example-Video-SoundReactive).

↑↓ move ↩ open