Playing two videos in a same window, the second video next to the first.

the_droid's icon

Hello there,
Supposing that i have two videos of 320 x 240 px each…
I know how to play one video in max in the same windows size, but how can i play two videos in a same max msp windows output, and set the second video next to the first with a windows output of 640 x 240 ?

E'

MH's icon

Your message doesn't mention if you want to use openGL or not but here's a patch with your 2 players in one window for an output on second monitor if need it.

Best

2-videos-opengl-max6.maxpat.zip
zip
the_droid's icon

Hello Marie-Helene,
Thanks for your help. It makes sense.
By the way, i've made a mistake in my question. In fact, i would like to concatenate the two videos in a syphon output. The problem is that i don't know if it's possible to get two videos (which have each a jit.qt.movie) in just a one syphon output.

Any idea ?
E'

Pedro Santos's icon

[jit.concat]

the_droid's icon

By concatenate, i mean : having the two videos in a same jit.qt.movie but the second video next to the first (not upper or beyond the first).
So i'm wondering if concatenate is still ok for my use.

Andro's icon

Push it all to open gl
1-Create a jit.window.jit.gl.render and create 2 jit.gl.videpoplanes.
2- position them next to each other, make sure jit.window is set to the correct resoltion. 640 x 480.
3- send each of your videos to jit.gl.videoplane.
4-play around with the transform_reset options of each videoplane if your video seems squashed or stretched.
5-This should put two videoplanes next to each other which can then be sent out of jit.gl.render to the jitter syphon object.
Concentenate is very slow compared to open GL so I'd skip it. All movies should just be pushed to open gl if you want smooth efficient playback. Plenty of examples on the forums showing how to do it.
Hopefully that'll get you going !

the_droid's icon

Got a blinking problem between the two videos, which are overprinted. I want them the second next to the first.
And last but not least, I still don't know where to patch a syphon box.

E'