jit.glue / stretch problems with matrices
I’m trying to use the jit.glue object as sort to combine two videos together. It’s working fine except the videos are stretched and not well displayed with their original dimensions…. Which parameters I should use instead to get the well-proportioned dimensions?
It’s not clear to me where you’re trying to get the proportions right. If it’s the window, they way your patch is setup right now, the concatenated matrices will be stretched to the size of the window, so you’ll need to set the window proportions to match those of the matrix you’re sending to the window. If you want to set the window to an arbitrary size yet still have the video displayed without distortion, you’ll need to use a jit.gl.videoplane object to show the video in the window with black space padding out the rest.
Unfortunately, when I read the reference and help files related to jit.gl.videplane, I don’t get how to do for padding out the rest.
Also, when I launch a new record, I would like to display a red blinking dot at the bottom of the jit.window as sort to indicate when the record is active. I searched for many ways but didn’t find anything satisfying because the red blinking led, each time I found something, is a component but cannot be displayed within the window… any idea?
Definitely have a look at the jit.gl.videoplane help file. If you want to create a "record" LED in the window, you’ll need to use some gl geometry. I’d recommend using a jit.gl.gridshape @shape sphere @color 1 0 0 1 and enable/disable it depending on the recording state
Here’s something to get you started. If there’s something you don’t understand, have a look at the reference pages and play around with it.
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 729.3ocyXF0aaBCDG+YxmBKTerKCaf.rm19bLUU4Dtj5JvN01oMqU869vlPS Wq6hSaffhDHNic9e+7cGG7zjfv4hsfJD8CzuQAAOMIHvZxXHX20Ag0zsKpnJ 6sEVCJEcEDdY6XZXq1ZWsfVAnKvnlecCxJsCIle62HwcFWJ3ZNsFrC8KIiV0 MBeSMiWAZ6eDYuQwFcmU7qVDE6Q6hfISi1Yt8N0+YMz5Rggnq1MzZpdwML9p qkvBc6nj37lYhHEXyorTyQbiIzUlo77jIlCW5IW3vCM946vBrcsDcwR72uXI wEVviWrjZOkkXuH5zhEYij.TIq1ASv4mDlPNVlbombAWXNMC2Gb4VldZMUKY aY7kBWvI8HgCdvBXv446yi9zf4ipuHAZIpT7HHmVKt2EYRFeoRwYDarhMhoH 9KUf4i.iXMvcgCxHrxRZ1dbDm0G0aMIP2oMgHL.EShPjjHWzI5jjFcr0XZT2 0so2GrZSbrMbonM0Bm1WUaVUsAP+bgnZSMWgb8LphyR43i.UDr8YT3zh9lUR 57+SPU9XOlhDkrOlpsbTefoGX7RwCN.T1YAPyo7UGDMIISSM87zVuNt+x1ld OqDDqqn7lzNsjxUKEx5Fkn.syNmmM5ipZS+hi20oXeBOIvKAoCJkNhCsvup5 TVTePm6pAsTzrE3fLmm1hrj4vTIusW5uVEasX0pJvgqG+I5H9cdBiq8vQl8x 9Zmi7xLjMLWCxqANcdkcUiNc67ZzbDHoJWtO9rlSzpJORLv1GG01Z36hAryO rhwe6WovtdF6+KyThMxEcRo6COf1ucTBJMiS0LA+U2zr+4dtgUVB1g6bxRlx r2U9waddKGrGx4MZtO0i4ksOrdvCldJ7PNl2AdnvSpO5IeTgmgKX17J2GlNQ CmdHdnmgayBOxny3BNQdHGS3NdPjStmpY31pvGPMoip.mgSMdUyYvTiOcWj7 IUSSiPOO4uf6JTNp -----------end_max5_patcher-----------
That’s much better, but now I have a flickering pictures.
I don’t understand why it does this.
The patch is simple.
When I stike the space bar, it generates a random and unique name. Then, a vidéo is recorded (3 seconds) from the webcam.
Previously to this, I opened the jit.qt.grab component.
Then, whan my video is recorded, it is displayed on the left corner screen while the right displays the current video capture (not recorded)…
You can’t both send a matrix to the window and use gl.render to do 3D graphics in the window at the same time. This is causing your flickering. There are two ways to display visual information in a window with jitter:
1) send a matrix to the window
2) use OpenGL to render graphics to the window
These two techniques are mutually exclusive. You’re using both. This is a common mistake when starting out with Jitter. Using OpenGL is the most flexible way to display graphics.
Forums > Jitter