Forums > MaxMSP

A more efficient way for this, Multiple video and audio, Matrox ,windows 7


hzd
June 16, 2013 | 10:57 am

Hi there.
Working on an installation. 8 channel audio and 5 video streams.
Sfplay~ is playing an 8 channel audio file. Also it spits out the song position in milliseconds. We use this, to tell the jit.qt.movie objects, what frame to spit out. This is the sync part.
There are two jit.qt.movie objects. One is playing a film that is split into the four corners of the image. Four jit.windows are showing each corner. Separate jit.qt.movie and jit.window are for the fifth film. The five jit.windows are streaming to five video outlets via two Matrox M-series PCI cards.

This works fine, as long as there is not alot happening graphically. The image is staggering but the audio seems to behave.

Don’t know, if it is something in the patch that is not efficient or if it is an issue with the Matrox and Windows computer, installation, driver and all that.

We are troubleshooting on all fronts, you know.



hzd
June 16, 2013 | 11:00 am

I’m trying to post the patch, but somehow, it won’t post it here.
I’m copying compressed and all that.
Any ideas why it doesn’t work?
There are sub patchers. Is that maybe a reason?



hzd
June 16, 2013 | 11:01 am

Here’s the audio patch:

<code>

– Pasted Max Patch, click to expand. –

</code>



hzd
June 16, 2013 | 11:02 am

Here’s the video patch:

<code>

– Pasted Max Patch, click to expand. –

</code>



dtr
June 16, 2013 | 11:32 am

Some thoughts:

- Why are you splitting the video in 4 windows? Instead of tiling your videos 2×2 in the source video you can make it 4×1 and have 1 wide window that spans 4 display outputs. That’s likely to be more efficient.

- You might see a performance gain by porting your player patch to openGL. Stream your video into a jit.gl.videoplane. If you must have it, do your cutting also in jit.gl.* territory. You’ll take advantage of your graphics card’s hardware openGL acceleration. Lots of examples of this are floating around.



hzd
June 16, 2013 | 1:55 pm

Fantastic.

Just the kind of advice I’m looking for.

The video was like this, when I got it. I’ll see if it can be redone.. It is also alot tidier patch-wise, if it is 4×1, I think.

I’ll look into the .gl. stuff.

thx



hzd
June 16, 2013 | 3:33 pm

I’ve been sitting with this for a while now. I didn’t find a way in jit.gl to split the video.
I get it to work by using a jit.matrix. What gl object would be the obvious one to use for splitting this up?



hzd
June 16, 2013 | 4:05 pm

It is of course with jit.gl.camera, right?



dtr
June 17, 2013 | 1:21 am

No. You’d split the texture before putting anything in the 3d scene. Here’s 1 example: http://cycling74.com/forums/topic/opengl-scissors-and-glue/

But my point was you don’t need to cut yourself. Leave the 4×1 wide video as is. Run it into 1 videoplane. Make the window and videoplane size 4×1 ratio (eg. 4x800x600=3200×600) and position it at the top left corner of the leftmost triplehead display. The video window will now span 4 displays and – if everything is dimensioned correctly – the cuts between the videos should align with the display borders.



hzd
June 17, 2013 | 3:46 am

I now have a different problem.
I’m writing the patch on my mac, but the performance is on windows.
The jit.window is only showing the topmost pixel when using jit.gl.videoplane.
Also in the jit.gl.videoplane help file.
A jit.pwindow shows the video as it is.
Any ideas?

I haven’t yet gotten the video file to be 4 displays wide. (it will actually be 5 displays) But I will have that in time for the performance.
For now, I’m using the test file.


Viewing 10 posts - 1 through 10 (of 10 total)