# myMovie.speed() is not working

**URL:** https://discourse.processing.org/t/mymovie-speed-is-not-working/11956
**Category:** Libraries
**Created:** [June 10, 2019, 2:39am UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956 "2019-06-10T02:39:34Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![anty](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@anty](https://discourse.processing.org/u/anty)
#### Post date: [June 10, 2019, 2:39am UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956/1 "2019-06-10T02:39:34Z")

</div>

Hi friends, I am Anty and I want to control the movie’s speed by _**.speed()**_ but it seems not working in my code. Whatever the number I wrote to **“.speed(0.5)” “.speed(5)”** all of them are the same speed.

This is my code:

````auto
import processing.video.*;

Movie m;

void setup(){
  iRate=0.5;
  size(500,300);
  frameRate(30);
  m=new Movie(this,"m.mov");
 
  m.speed(0.1);
  m.loop();
  
  
}

void draw(){
  if(m.available()){
    m.read();
    
  }
  image(m,0,0,width,height);
  
  
}```

Thank you for your answer!
````

---

<div class="post-metadata">

### Author: ![InferNova](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/infernova/32/6009_2.png) [@InferNova](https://discourse.processing.org/u/InferNova)
#### Post date: [June 10, 2019, 3:26am UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956/2 "2019-06-10T03:26:47Z")

</div>

Hey There!

[https://www.processing.org/reference/libraries/video/Movie\_speed\_.html](https://www.processing.org/reference/libraries/video/Movie_speed_.html)

Seems like you have the same exact thing ! But your omg has width and height did you try and see how it works without the width and height variables present ?

---

<div class="post-metadata">

### Author: ![anty](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@anty](https://discourse.processing.org/u/anty)
#### Post date: [June 10, 2019, 4:31am UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956/3 "2019-06-10T04:31:37Z")

</div>

Hi friend,  
Thank you!  
I tried it without heigh and width variables present. It still doesn’t work with the speed. And I followed the guide of the link that you put. I cannot get more information about speed. It is not working…

\<I want to achieve a function that the video’s speed follow with the music’s loudness or music’s frequency so that’s why I need control the speed of video. As well as before I used this way, I have tried to use frameRate() to control the image’s appear’s speed, but it is also not working well, because the frameRate() became slower and slower ☹ \>  
Anty

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [June 10, 2019, 6:22am UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956/4 "2019-06-10T06:22:41Z")

</div>

can you just try the provided example, please,  
that is the usual way to get started.

File / Examples /  
Libraries / Video / Movie / Speed

( it uses mouseX for speed setpoint. )

---

<div class="post-metadata">

### Author: ![anty](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@anty](https://discourse.processing.org/u/anty)
#### Post date: [June 10, 2019, 6:55am UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956/5 "2019-06-10T06:55:34Z")

</div>

Hi kll

I try the original code showed in the below link: [https://www.processing.org/reference/libraries/video/Movie\_speed\_.html](https://www.processing.org/reference/libraries/video/Movie_speed_.html)

It is still not working  
The Processing can run my video, but the speed never ever change.

Thanks to your reply

Anty

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [June 10, 2019, 7:17am UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956/6 "2019-06-10T07:17:49Z")

</div>

and why did you not try the example?  
it works here ( win 7 / 64bit / processing 3.5.3 )

---

<div class="post-metadata">

### Author: ![anty](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@anty](https://discourse.processing.org/u/anty)
#### Post date: [June 10, 2019, 7:59am UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956/7 "2019-06-10T07:59:16Z")

</div>

Oh!!!  
Got it! It is working for this example!  
I will try it again in my sketch!  
Thank you kll!

My system is Mac…  
Just now I thought that you ask me to try the example code of website.  
Just now I tried the example inside of processing. It is working now!!!

Thank you so much!!!

---

<div class="post-metadata">

### Author: ![nanto2016](https://avatars.discourse-cdn.com/v4/letter/n/eb9ed0/32.png) [@nanto2016](https://discourse.processing.org/u/nanto2016)
#### Post date: [July 16, 2022, 12:52pm UTC](https://discourse.processing.org/t/mymovie-speed-is-not-working/11956/8 "2022-07-16T12:52:37Z")

</div>

I actually found out what is the problem. You must set the speed **while** the movie is playing ! in your original code, you just need to move the `m.speed(0.1);` to the line after `m.loop();`.  
Hope this works and helps !
