Set dim to moviedim

jfenwick's icon

Hi there,

I'm new to Jitter. This is my first time posting on the forum.

Here's my question:

Is there a way to automatically set dim to movie_dim on a jit.qt.movie object when you load a movie?

Here's why I'm asking the question:

I'm trying to play an MPEG-4 video with jit.qt.movie. I've noticed that if I don't set the dimensions of the video, the dim property defaults to 320x240. My movie is larger than these dimensions. If I let the movie play with the dim set to 320x240, then jagged edges appear in the movie that make it look ugly.

The solution is to set the dimension directly on the object to the correct dimensions. However, this is inconvenient as I want to use Max MSP as a video mixer. This means I would have to check the size of every clip I put into the mixer and input that to my jit.qt.movie object.

I've discovered that the moviedim and movie_dim properties of the jit.qt.movie object both have the correct size of the video. Hence my question about setting dim to moviedim automatically.

If anyone knows of a way to do this I would appreciate the help!

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Whenever a movie is read into jit.qt.movie, it sends out a read message that reports whether the movie was read in successfully. You can use that information to trigger a getmoviedim message to jit.qt.movie, and use the moviedim to set the dim of jit.qt.movie and all other objects that need to know that information. Like this.