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.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › Controling Video Speed with Mouseover Commands
Page Index Toggle Pages: 1
Controling Video Speed with Mouseover Commands? (Read 813 times)
Controling Video Speed with Mouseover Commands?
Sep 12th, 2007, 9:23am
 
I am really new to this so sorry if this question has a really simple answer...

Is it possible to set it so that once the video is playing you can control the speed (slow down or speed up) of the video with the mouse in real time?

I have seen where you can set the speed ahead of time but never on the fly.

Re: Controling Video Speed with Mouseover Commands
Reply #1 - Sep 12th, 2007, 10:02am
 
here's how (modified the "Loop" example):
Code:

/**
* Loop.
*
* Move the cursor across the screen to draw.
* Shows how to load and play a QuickTime movie file.
*/

import processing.video.*;

Movie myMovie;


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

}


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


void draw() {
image(myMovie, 0,0);
myMovie.speed(mouseX/(width/2.0));
}


F
Re: Controling Video Speed with Mouseover Commands
Reply #2 - Sep 12th, 2007, 6:02pm
 
Thanks! Very cool. I am looking forward to doing more stuff with video - as i learn more of the code.
Page Index Toggle Pages: 1