# Movie as loop without getting stuck

**URL:** <https://discourse.processing.org/t/movie-as-loop-without-getting-stuck/42848>\
**Category:** Libraries\
**Created:** [September 28, 2023, 12:35pm UTC](https://discourse.processing.org/t/movie-as-loop-without-getting-stuck/42848 "2023-09-28T12:35:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blindschleiche](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@blindschleiche](https://discourse.processing.org/u/blindschleiche)\
**Post date:** [September 28, 2023, 12:35pm UTC](https://discourse.processing.org/t/movie-as-loop-without-getting-stuck/42848/1 "2023-09-28T12:35:06Z")

</div>

hello  
i would like to play a movie as loop. unfortunately it always stucks at the end for a few millis before it plays over again. what can i do to prevent this?  
thank you for help

```plaintext
Movie myMovie;

void setup() {
  size(1000, 1000);
  myMovie = new Movie(this, "drehen.mp4");
  myMovie.loop();
}

void draw() {
  //tint(255, 20);
  image(myMovie, 0, 0);
}

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

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [September 29, 2023, 8:46am UTC](https://discourse.processing.org/t/movie-as-loop-without-getting-stuck/42848/2 "2023-09-29T08:46:31Z")

</div>

Hi @blindschleiche,

Are you sure that your movie exactly ends and starts again without any black screen or pause?

---

<div class="post-metadata">

**Author:** ![blindschleiche](https://avatars.discourse-cdn.com/v4/letter/b/8edcca/32.png) [@blindschleiche](https://discourse.processing.org/u/blindschleiche)\
**Post date:** [October 2, 2023, 8:16am UTC](https://discourse.processing.org/t/movie-as-loop-without-getting-stuck/42848/3 "2023-10-02T08:16:02Z")

</div>

yes i am sure, that there is no black screen or pause
