Processing video library can't display human figure in a video with green background(solved)

Hi everyone,

I am using the following code to play the welcoming p5js video which is green background with human figures talking. The problem is that I can only see green canvas (and hear voices) without human figures. I don’t understand where went wrong. Could anyone help? Thanks

The following is my code.

import processing.video.*;

Movie movie;

void setup() {
  size(320, 240);
  movie = new Movie(this, "video.mp4");
  movie.play();
}

void draw() {

  if (movie.available()){

    movie.read(); 
  }

  image(movie, 0, 0);
}

void keyPressed(){
  if (key == CODED){
    
    if (keyCode == UP){
      println("movie length: " + movie.duration());
    }
  }
}

the solution is to change canvas size to 960x720

Hi @Kenny
Is this the actual video size?

yes, that’s right, it is the video’s actual size.

1 Like