// video width and height int vw = 360; int vh = 288; // sample width int sw = 1; // window width and height int ww = 1000; int wh = vh; // iterator int i = ww-sw; // frame flag boolean newFrame = false; void setup() { size(ww, wh); background(0); // Begin capturing video at vw x vh pixels and 10 frames-per-second. beginVideo(vw, vh, 10); } void videoEvent() { newFrame = true; } void loop() { if(newFrame) { replicate(video, (vw/2), 0, (vw/2)+sw, vh, 0+i, 0, sw+i, vh); i=i-sw; if (i<0) { i=ww-sw; } newFrame = false; } }