import processing.video.*;
Movie m;
void setup() {
size(640, 360);
background(0);
// Load and play the video in a loop
m = new Movie(this, "892677437.mp4");
m.loop();
}
void movieEvent(Movie m) {
m.read();
}
void draw() {
//if (movie.available() == true) {
// movie.read();
//}
image(m, 0, 0, width, height);
m.loadPixels();
int pixelSize = 20;
float sizemult = 3;
for (int y = 0;y<m.height;y+=pixelSize){
for (int x = 0;x<m.width;x+=pixelSize){
int mPixelPos=y*m.width+x;
color pixCol=m.pixels[mPixelPos];
float pixBrightness=255-brightness(pixCol);
fill(pixCol);
rect(x,y,pixelSize,pixelSize);
}
}
}