# Movie.width and movie.length do not always work depending on movie

**URL:** https://discourse.processing.org/t/movie-width-and-movie-length-do-not-always-work-depending-on-movie/44260
**Category:** Coding Questions
**Created:** [April 9, 2024, 2:30pm UTC](https://discourse.processing.org/t/movie-width-and-movie-length-do-not-always-work-depending-on-movie/44260 "2024-04-09T14:30:43Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [April 10, 2024, 8:26am UTC](https://discourse.processing.org/t/movie-width-and-movie-length-do-not-always-work-depending-on-movie/44260/2 "2024-04-10T08:26:01Z")

</div>

Hello @lucedan

> [@lucedan](#):
>
> I _sometimes_ get the error “Width (0) and height (0) cannot be \<= 0”.

Related:  
_[OpenCV error in Processing 4.0b2 - #10 by glv](https://discourse.processing.org/t/opencv-error-in-processing-4-0b2/33284/10)_  
_[Problem with slitscan effect for pre-recorded video - #2 by GoToLoop](https://discourse.processing.org/t/problem-with-slitscan-effect-for-pre-recorded-video/5456/2)_

You can also add a `break` statement if you want a timeout in the `while()` loop.

Reference:

> **[break / Reference](https://processing.org/reference/break.html)**
>
> Ends the execution of a structure such as switch, for, or while and jumps to the next statement after.

`:)`

---

_[View the full topic](https://discourse.processing.org/t/movie-width-and-movie-length-do-not-always-work-depending-on-movie/44260)._
