Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

playing 2 or more video files simultaneously

$
0
0

I want to overlay multiple video files (they're saved inside my data folder). I am able to load one successfully, but the moment I try more than one, all I hear is the audio and the video never loads. Below is some simplified code as an example that doesn't function for me:

import processing.video.*;

Movie vidFile1;
Movie vidFile2;

void setup()
{ 
  size(1920, 1080);
  background(0);


  vidFile1 = new Movie(this, "video1.mp4");
  vidFile1.loop();
  vidFile2 = new Movie(this, "video2.mp4");
  vidFile2.loop();
}

void movieEvent(Movie vidFile1, Movie vidFile2)
{
  vidFile1.read();
  vidFile2.read();
}

void draw()
{
  image(vidFile1,0,0);
  image(vidFile2,720,0);
}

Viewing all articles
Browse latest Browse all 2896

Trending Articles