I am trying to create two windows, and play the movie on the sub-window.
So far I’ve made the sub-window appear with Applet, but it does not play the movie.
The mp4 file is located in the data file, and it appears fine on the main window.
Please can someone help me with how to solve this?
import processing.video.*;
Movie Mov;
void settings(){
fullScreen(P3D);
}
void setup() {
String[] args = {"SecondApplet"};
SecondApplet sa = new SecondApplet();
PApplet.runSketch(args, sa);
}
void draw() {
background(0);
}
public class SecondApplet extends PApplet {
public void settings() {
fullScreen(P3D);
}
void setup(){
Mov = new Movie(this, "movie.mp4");
Mov.play();
}
void draw() {
background(255);
image(Mov,0,0);
}
void movieEvent(Movie m) {
m.read();
}
}
Yes I’ve implemented "–sketch-path=” argument passed to PApplet.runSketch():
But it didn’t make any change. Works on the main window but not on the sub-window…
Have you tried with the default renderer? Using more than one window with P2D or P3D is a recipe for disaster as there’s a bunch of static stuff that isn’t thread safe. The other issue is that the integration between GStreamer and OpenGL in the latest video library is, to put it mildly, a complete mess!