We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Problem Lauching quicktime movie (Read 1010 times)
Problem Lauching quicktime movie
May 15th, 2008, 8:48pm
 
Hello.

I'm a bit of a rookie on Processing and am having trouble even playing a movie. I've read the explanation again and again but am having the same problem. I have my Quicktime movie in a "data" folder in the same folder as my sketch but when I lauch i get:

"The file "video2" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable."

Why is this?
Here is my sketch, it is the one I have taken from this website:

import processing.video.*;
Movie myMovie;

void setup() {
 size(200, 200);
 myMovie = new Movie(this, "video2");
 myMovie.loop();
}

void draw() {
 tint(255, 20);
 image(myMovie, mouseX, mouseY);
}

// Called every time a new frame is available to read
void movieEvent(Movie m) {
 m.read();
}

I need to run this vid for a university degree project and am getting a bit stressed so any help would be very welcome.
Thank you for you time
Re: Problem Lauching quicktime movie
Reply #1 - May 15th, 2008, 8:56pm
 
Is the file really called just "video2" or is it actually "video2.mov"? (windows can be set to hide file extentions) try changing it to new Movie(this,"video2.mov");
Re: Problem Lauching quicktime movie
Reply #2 - May 15th, 2008, 9:29pm
 
Thank you JohnG but still no luck. I've also tried:

import processing.video.*;
Movie myMovie;

void setup() {
 size(200, 200);
 frameRate(30);
 myMovie = new Movie(this, "tree.mov");
 myMovie.speed(4.0);
 myMovie.loop();
}

void draw() {
 if(myMovie.available()) {
   myMovie.read();
 }
 image(myMovie, 0, 0);
}

But I am getting the same thing. I've tried all video types too.
Is the movie meant to be in a "data" folder in the folder of the sketch or next to the sketch itself?
Cheers.
Re: Problem Lauching quicktime movie
Reply #3 - May 17th, 2008, 2:49pm
 
Jarvis,

Yes, the movie has to be next to the pde file.

If you want to store movies or other files you use in a subfolder, you have to mention that subfolder when you create the object, for example:
myMovie = new Movie(this, "data/tree.mov");

IF you still have trouble, why not start from the example available with Processing:
File > Examples > Libraries > Video (Movie) > Loop
and save it under another name, and modify it to suit your needs...

I hope this helps,

Olivier.
Re: Problem Lauching quicktime movie
Reply #4 - May 17th, 2008, 5:54pm
 
no, it needs to be in the data folder. and "data/" should *not* be specified when loading the file.

i'm guessing that johng is correct, or maybe even that an extension needs to be added. right-click on the movie in explorer and do "get info" to get the full name of the file.. or turn extensions on in explorer.
Re: Problem Lauching quicktime movie
Reply #5 - May 17th, 2008, 6:52pm
 
Thank You. will try these tips asap.
Re: Problem Lauching quicktime movie
Reply #6 - May 17th, 2008, 7:26pm
 
fry wrote on May 17th, 2008, 5:54pm:
no, it needs to be in the data folder.

Well, I am sorry to insist but it works perfectly well for me with the files sitting directly next to the pde source.

Now, you may be right on the second part: IF they are in the data folder, then maybe the path does not have to be added. That would mean that processing is checking by default both next to the pde and in the data folder if any.
Re: Problem Lauching quicktime movie
Reply #7 - May 18th, 2008, 1:29pm
 
I've tried all options now. The example works fine but as soon as I replace the video with my own it gives me the error message. I've also tried using the example video "station" in my sketch but I get the same error message. I downloaded the latest version of processing but with no luck! Will try running it on a mac and see what happens as my degree show needs to up by Friday! Will let you know of outcome.
Thanks again
Page Index Toggle Pages: 1