# Problem with slitscan effect for pre-recorded video

**URL:** https://discourse.processing.org/t/problem-with-slitscan-effect-for-pre-recorded-video/5456
**Category:** Libraries
**Created:** [November 11, 2018, 7:49pm UTC](https://discourse.processing.org/t/problem-with-slitscan-effect-for-pre-recorded-video/5456 "2018-11-11T19:49:15Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [November 11, 2018, 10:35pm UTC](https://discourse.processing.org/t/problem-with-slitscan-effect-for-pre-recorded-video/5456/2 "2018-11-11T22:35:42Z")

</div>

- The video library takes some time to “ignite” after we issue a “play” command.
- Until then, its _width_ & _height_ dimensions are still `0`!
- As a workaround, we can **delay()** inside **setup()** until the video is fully ready.
- This way, when **draw()** is called back for the 1st time, we’re safe to access the video.

```java
void setup() {
  // ...

  ( myMovie = new Movie(this, "kat.mov") ).loop();
  while (myMovie.height == 0) delay(2);
}

```

---

_[View the full topic](https://discourse.processing.org/t/problem-with-slitscan-effect-for-pre-recorded-video/5456)._
