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 › Getting dimensions of a quicktime movie
Page Index Toggle Pages: 1
Getting dimensions of a quicktime movie (Read 1788 times)
Getting dimensions of a quicktime movie
Jun 3rd, 2010, 3:21pm
 
Hi,
is there a way to get the dimensions of a quicktime movie? I can't find anything in the Movie class. Are there any other ways?

Thanks,
Alex
Re: Getting dimensions of a quicktime movie
Reply #1 - Jun 3rd, 2010, 3:35pm
 
myMovie.width
myMovie.height

should work
Re: Getting dimensions of a quicktime movie
Reply #2 - Jun 6th, 2010, 4:02am
 
Thanks. Unfortunately, that didn't work - I always get dimensions of 1x1, no matter which video file I use. But I think something's wrong in general.  I have the following code:

import processing.video.*;

Movie mov;

void setup()
{
 size(500, 500);
 mov = new Movie(this, "cancun.mov");
 print(mov.duration());
 mov.play();
}

void draw()
{
 if (mov.available())
   mov.read();
 image(mov, 0, 0);
}


The duration is displayed correctly, but I always get the following exception at the last line: ArrayIndexOutOfBoundsException: Corrdinate out of bounds!
If I leave that line out for debugging purposes, I get this:
java(749,0xb1636000) malloc: *** error for object 0x12904d0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Invalid memory access of location 0xffffffff eip=0x9333e5c8


This happens regardless of which movie is being played back. Is something broken here?
I'm on Snow Leopard 10.6.3 and have Quicktime X, if that helps.
Re: Getting dimensions of a quicktime movie
Reply #3 - Jun 6th, 2010, 5:16am
 
hmm strange, i just checked it and it seems like there is a bug. I tested the standard movie playback code examples from the reference and got the same error. But when using it in an older version of processing, in this case 148, everything was alright.  I cant tell where exactly the problem is, but it looks like it is not your fault but a processing bug.
Re: Getting dimensions of a quicktime movie
Reply #4 - Jun 16th, 2010, 1:57am
 
I've had the same issue with the standard movie library in Processing.

However, when I need to switch between movies I use the JMC Library, the video.width and video.height functions work with it quite well.
Page Index Toggle Pages: 1