Hey I am trying to load up to two live video streams and upto 12/14 .mov/avi files into animated bubbles. The problem is that with 2 live streams and just images loaded in the stystem almost comes to a standstill. Have tried on a Mac and PC with different video formats etc. What is the maximum nuber of videos that JMC can handle at the one time? For testing I have substituted the live stream with video and video array with images but its still running like a lame duck.
Code:
import jmcvideo.*;
import processing.opengl.*;
import javax.media.opengl.*;
int INSET = 20;
String VIDEO_FILE = "milesdavis.flv";
PImage brushMask;
PImage bubble;
//PImage head;
JMCMovie vid ,vid2;
int maxImages = 4;
int imageIndex = 0;
PImage[] images = new PImage[maxImages];
Bubble mybubble1;
Bubble mybubble2;
// PImage bubble, bubble2;
int numBalls = 4;
float spring = 0.05;
float gravity = -0.0015;
float friction = 0;
Ball[] balls = new Ball[numBalls];
void setup() {
mybubble1 = new Bubble(5, 7, 1);
mybubble1.setKeycodes('w','s','a','d');
mybubble2 = new Bubble(10, 50, 2);
mybubble2.setKeycodes('i','k','j','l');
size (600, 600);
frameRate (20);
for (int i = 0; i < numBalls; i++) {
balls[i] = new Ball(random(0,width), random(-height,height), int(random(50, 200)), i, balls);
}
for (int j = 0; j < images.length-1; j++ ) {
images[j] = loadImage( "video\\animal" + j + ".jpg");
}
}
void draw (){
background(0);
mybubble1.move();
mybubble1.display ();
mybubble2.move();
mybubble2.display();
for (int i = 0; i < numBalls; i++) {
balls[i].move();
balls[i].display(images[i]);
}
}
Any help would be much apprciated.