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
sound problems on video (Read 588 times)
sound problems on video
Apr 30th, 2007, 1:56pm
 
I am having problemts with my videos. The videos load perfectly, however they audio only plays for about a second. Please help!

myMovie = new Movie(this, "steamboat.mov"); // Loading the first movie into the sketch                                                  
 myMovie.loop();                               // So the movie can loop          
 myMovie1 = new Movie(this, "bob.MOV");    // Loading the second movie into the sketch          
 myMovie1.loop();                             // So the movie can loop
 frameRate(30);
Re: sound problems on video
Reply #1 - Jul 29th, 2008, 4:25pm
 
Hello,
I am having exactly the same problem. I would be thankful if someone could tell me where am I going wrong or solution to it. The code I am using is :

void setup() {
 size(640, 480, P3D);
 background(0);
 // Load and play the video in a loop
 
 
  myMovie1 = new Movie(this, "boyonbike.mov");
  myMovie1.loop();

  myMovie2 = new Movie(this, "littleboy.mov");
  myMovie2.loop();
 
  frameRate(30);

}

void movieEvent(Movie myMovie) {
     myMovie.read();
}

void draw() {
 //tint(255, 20);
 if(tag == 0)
 {
   myMovie1.loop();  
   image(myMovie1, myMovie1.width, myMovie1.height);
 }
 else if (tag == 1)
 {
     image(myMovie2, myMovie2.width, myMovie2.height);
 }
}

I am setting the tag value in rest of the code. The problem is that it plays the video properly according the the tag values, but the sound associated with it is not played continuously , but is played only for the initial 2 seconds. I want the sound also to loop with the video. Can anyone help ?

Thanks so much!
Page Index Toggle Pages: 1