Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ruby-processing: video capture processing example
#!/usr/bin/env ruby
# this is a test of ruby-processing ( with video capture
# use "rp5 unpack library" at a command line to install the video library, among others
# tested with Ruby 1.9.2 on OSX with built in web cam
class VideoCaptureTest < Processing::App
load_library :video
include_package ""
def setup
size(720, 576, P2D)
@video =, width, height, 30)
def draw
tint(* { rand(256) }) if @video.available?
image(@video, 0, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.