How to do a grid of videos?

wrybread's icon

I'm new to Jitter and Max and trying to make a 4 x 4 grid of videos, each clickable.

I've been using this page as a starting point:

Am I correct in thinking I'll be laying out the videos as a jit.matrix? Note that I don't need any processing on these videos, just simply play them in a loop.

Any tips would be hugely appreciated.

yair reshef's icon

position all 16 movies in window, either with jit.glue or better yet with
jit.gl.videoplane and its position value.
then watch the right outlet of jit.window for the mouse position (check help
file) , some logic/math needed to divide the mouse coordinate output to
activate the correct video..
you will have to use some known tricks to make 16 video play smoothly
simultaneously... start with low res/dim videos and work up
goodluck

On 8/15/07, wrybread wrote:
>
>
> I'm new to Jitter and Max and trying to make a 4 x 4 grid of videos, each
> clickable.
>
> I've been using this page as a starting point:
>
> http://music.arts.uci.edu/dobrian/IAP2004/JitterExamples.htm
>
> Am I correct in thinking I'll be laying out the videos as a jit.matrix?
> Note that I don't need any processing on these videos, just simply play them
> in a loop.
>
> Any tips would be hugely appreciated.
>

Thijs Koerselman's icon

On 8/15/07, wrybread wrote:
>
>
> I'm new to Jitter and Max and trying to make a 4 x 4 grid of videos, each
> clickable.
>
> I've been using this page as a starting point:
>
> http://music.arts.uci.edu/dobrian/IAP2004/JitterExamples.htm
>
> Am I correct in thinking I'll be laying out the videos as a jit.matrix?
> Note that I don't need any processing on these videos, just simply play them
> in a loop.
>
> Any tips would be hugely appreciated.

I think you might be confused on jit.matrix. It IS the actual video, the
matrix of pixels representing one frame of video / image.

There are several ways to do what you want. These are the 2 most obvious I
can think of:

simpel:
- stream/map the 16 videos into one jit.matrix using the @dstdimstart and
@dstdimend attributes on your grid matrix. Changing them for every input
video to to position each in its right place.

flexible:
- stream each video to a jit.gl.texture
- draw a jit.gl.videoplane with @automatic 0 on each position for every
frame, changing its texture name to the corresponding video texture for each
position. Thus drawing the same jit.gl.videoplane on a different position
with a different texture 16 times for every frame.

For the clicking you need to do some kind of mouse event handling. Again 2
ways to do this:

simpel:
- catch the mouse information from jit.pwindow / jit.window out of the right
outlet. Determine which video is hit using basic max objects.

flexible:
- attach an EventListener to your window using JavaScript. Use its callback
function to determine which video is hit.

If you really don't want to do any processing or more advanced interaction,
you're probably better of using the simple approach.

If you go for the 2nd approach I strongly recommend to do it all in
JavaScript. There are tutorials available in the standard Jitter
documentation for each of the steps I described, so you'll have to do a bit
of reading and research. The advantage of the 2nd approach is that it will
be really easy to add whatever processing or animation you want later on if
you do decide to get more fancy.

Here's an example of a similar approach I used to animate a grid of photo's
(same thing really): http://www.sndwrx.com/index.php?page=daisy

I used the word "simple" relative to the other approach. I'm not saying
you're an idiot if you can't get the first approach to work ;-)

Hope this helps and good luck.

Thijs

cborkowski's icon

interesting problem, it's been done before.

you're going to want to position your jit.qtmovie objects on a single jit.gl.videoplane object.

In a perfect world, if you have a decent processor and (more importantly) a good video card you can play up to 16 or more 720X480 movies if you properly format your QT files.

That being said, there are a few things you'll want to have in your patch to balance out the load on your CPU and GPU during playback.

Theoretically, the latest version of jitter and a top end video card will play back multiple streams of HD sized video on the jit.gl.videoplane object.

You can see a variation on the concept here where each movie is a button. Watch the "Installation In Action" video.

cheers
chris
perpetual art machine

jtshavitz's icon

hi -
recent convert from softVNS - to - jitter
and I'm having trouble getting even 1 movie to play back smoothly! -

> In a perfect world, if you have a decent processor and (more
> importantly) a good video card you can play up to 16 or more
> 720X480 movies if you properly format your QT files.

What do you mean here? specific format?
1 - med quality photojpeg 720 480 file jumps on playback. (both CPU & GPU sets ups) - 3, 4, 5 and it gets worse. (even w/loadram)

what possible configuration would play up to 16 - 720 480 movies smoothly?!
(i'm on 2.4 Intel MBP 17"- 2gbgram / 256 vidram)

-
My G5 2.0 (2004) - 10.3.9 / Max 4.5 / softVNS video playback setup plays 4 streams perfectly, smooth, fast -

whats the trick?
example patch!?
is it this machine?

cap10subtext's icon

Can you post your patch? Sounds like a metro issue. Soft VNS doesn't require one so maybe your settings aren't right. Your system sounds like it should handle the video. Unless your videos are high res and huge.

jtshavitz's icon

Quote: cap10subtext wrote on Tue, 30 October 2007 22:56
----------------------------------------------------
> Can you post your patch? Sounds like a metro issue. Soft VNS doesn't require one so maybe your settings aren't right. Your system sounds like it should handle the video. Unless your videos are high res and huge.
----------------------------------------------------
actually, no need to post a patch, as opening ANY of the example patches for Jitter all have the same results (CPU & GPU based patches)

not 1 video will playback without this 3 - 4 second interval / "hiccup" or stutter..

I can play 5 jitter (jit.qt.movie to slabs to videoplane) and the FPS will still have room to spare. my machine CPU still has plenty of juice - so this playback stuttering is NOT due to pushing the machine too hard. Most of my video is Photo Jpeg / Med quality, 29.97/30 fps.

this seems to be a threading/servicing implementation Jitter issue (i'm guessing) - The same movies playback smoothly in Quicktime and any other applications.

hmmm
???
ugh

Wesley Smith's icon

Hi James. I have the exact same machine as you minus 2 inches. If
you post a patch and 5 sample videos, I can do some tests to see if I
get the same results.

wes

On 11/13/07, james wrote:
>
> Quote: cap10subtext wrote on Tue, 30 October 2007 22:56
> ----------------------------------------------------
> > Can you post your patch? Sounds like a metro issue. Soft VNS doesn't require one so maybe your settings aren't right. Your system sounds like it should handle the video. Unless your videos are high res and huge.
> ----------------------------------------------------
> actually, no need to post a patch, as opening ANY of the example patches for Jitter all have the same results (CPU & GPU based patches)
>
>
> not 1 video will playback without this 3 - 4 second interval / "hiccup" or stutter..
>
>
> I can play 5 jitter (jit.qt.movie to slabs to videoplane) and the FPS will still have room to spare. my machine CPU still has plenty of juice - so this playback stuttering is NOT due to pushing the machine too hard. Most of my video is Photo Jpeg / Med quality, 29.97/30 fps.
>
>
> this seems to be a threading/servicing implementation Jitter issue (i'm guessing) - The same movies playback smoothly in Quicktime and any other applications.
>
> hmmm
> ???
> ugh
>
>
>

dan.r's icon

Quote: thijs.koerselman wrote on Wed, 15 August 2007 05:19
----------------------------------------------------

>
> Here's an example of a similar approach I used to animate a grid of photo's
> (same thing really): http://www.sndwrx.com/index.php?page=daisy
>
>
> I used the word "simple" relative to the other approach. I'm not saying
> you're an idiot if you can't get the first approach to work ;-)
>
> Hope this helps and good luck.
>
> Thijs
>
>
>
> http://www.nano-soundworks.com
>
>
>
----------------------------------------------------
hi
can you re upload the link im interested in this.
thanks