We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've got this code to display a video but every time I run the code it says ,'Could not load movie file 0001-0100.mov' Does anyone know how I fix this? It's a quicktime video in H.264
import processing.video.*;
Movie myMovie;
void setup(){
size(400,400);
myMovie = new Movie(this, "0001-0100.mov");
myMovie.noLoop();
}
void draw(){
image(myMovie,mouseX,mouseY);
}
void movieEvent(Movie m) {
m.read();
}
Thanks
Answers
where is you movie? needs to be in a data subdirectory
It's in the folder that is created when I saved it (the sketch). The only 2 files in there are the video and .pde file.
Thanks for your reply! :)
the reference for Movie() says that it, like any images etc, should be in a subdirectory of the sketch folder called 'data'
Thanks for that! It works when I use myMovie.loop(); but not when I use noLoop(); Am I doing something else wrong now? Thank you :)
when you say noLoop() do you mean myMovie.noLoop()?
because processing also has it's own noLoop() which stops the draw() loop from running. which would make it look like it wasn't working.
http://processing.org/reference/noLoop_.html
Thanks I used myMovie.noLoop() Thanks for you help so far :)
When you reports "it doesn't work", try to be more explicit:
In a different environment, without your movie, etc., it is hard to reproduce issues, so the more information, the more we can help.
Moreover, what do you expect when you do noLoop()? It stops the movie (before it even starts!), so you cannot get an image from it. Perhaps you want to loop(), then to stop after the first image has been displayed.