sketch-mapper
sketch-mapper copied to clipboard
crashing with no debugging info
I've tried to make a sketch that plays back movies using the following code but, but it causes the sketch to crash with no debugging info. I'm assuming this is something I'm doing wrong - but it seems like there should be an error...
`public class MovieMapper extends AbstractSketch {
public MovieMapper(final PApplet parent, final int width, final int height) {
super(parent, width, height);
}
Movie movie;
@Override
public void draw() {
graphics.image(movie, 0, 0, graphics.width, graphics.height);
}
@Override
public void keyEvent(KeyEvent event) {
}
@Override
public void mouseEvent(MouseEvent event) {
}
public void movieEvent(Movie m) {
m.read();
}
@Override
public void setup() {
// Load and play the video in a loop
movie = new Movie(parent, "transit.mov");
movie.loop();
}
}`
In the parent sketch I have this in the setup loop:
sketchMapper.addSketch(new MovieMapper(this, width / 2, height / 2 ));
and the library import line is in the parent as well
Just curious, have you tried just the video library by itself? I'm on Linux and having a hard time just getting it to play a video. Tried the GLVideo library too with no luck.
Hmm yeah I've used the official (Processing Foundation) GStreamer based video library (just called 'Video') quite a bit on OSX and Windows - but haven't tried it on Linux. (Apart from on an RPI where I did not have any success - it seems like GL Video is the way to go there but I haven't tried it) I was just trying to incorporate and example sketch from the GStreamer library to use with sketch mapper. It would be great to have a processing based mapping solution for video. This seems like it could be it if we can figure it out.