Set dim to moviedim

Dec 22, 2009 at 3:18am

Set dim to moviedim

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 320×240. My movie is larger than these dimensions. If I let the movie play with the dim set to 320×240, 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!

#47340
Dec 22, 2009 at 9:01am

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.

– Pasted Max Patch, click to expand. –
#170370

You must be logged in to reply to this topic.