Need to loop my Video so 100 small videos appear on the screen at the same time.

@muhammad7319

You have deliberately vandalised this discussion.

Please read the discussion DO NOT DELETE YOUR POSTS.

koogs has restored your original posting below.

Tagged:

Answers

  • you'll need two loops, one inside the other, one doing y, one doing x. there are 1000 posts on this forum about grids like this.

    get the frame from the video, RESIZE it to the final size, and they just copy it to the main screen, 100 times.

    try it first with a still image. then introduce the video.

  • edited May 2017 Answer ✓

    This worked for me -

    import processing.video.*;
    Capture myVideo;
    float angle;
    
    void setup() {
      size(640, 480);
      myVideo = new Capture(this, width, height);
      myVideo.start();
      angle = 0;
    }
    
    void draw() {
      if (myVideo.available()) {
        myVideo.read();
      }
      imageMode(CORNER);
      // Do a single resize, THEN display the image 100 times
      PImage img = myVideo.get(); //
      img.resize(width/10, height/10);
      for (int x = 0; x < width; x += img.width) {
        for (int y = 0; y < height; y += img.height) {
          image(img, x, y);
        }
      }
    }
    
  • DO NOT REMOVE QUESTIONS

    original question for reference:

    Hello, I am currently trying to copy my video so there are 100 of them at the same time, 10 down and 10 across the screen. It should look like the attached image.

    This is my code:

    import processing.video.*;
    Capture myVideo;
    float angle;
    
    void setup() {
      size(640, 480, P3D);
      myVideo = new Capture(this, width, height, 60);
      myVideo.start();
      angle = 0;
    }
    
    void draw() {
      if(myVideo.available()) {
        myVideo.read();
      }
      translate(width/2, height/2);
      imageMode(CENTER);
      image(myVideo, 0, 0, width/10, height/10);
      tint(36, 178, 64);
      tint(245, 129, 234);
      angle = angle + 0.01;
    }
    

    img

This discussion has been closed.