jit.vcr - Recording video

Phil Spitler's icon

Hi, I want to create a simple setup that waits for a key and then records video and audio from the webcam.

Note, this is my first go a using Max :-)

I have the camera working and it starts when the user presses "a" on the keyboard.

However, the jit.vcr doesn't seem to record.

I was using jit.qt.record and that also didn't work.

Oddly enough at one point my patcher did prompt me for a filename and did record.

I have attached a screenshot of my patcher, I'm sure it's something dumb.

I'm excited to start using Max in my projects.

Cheers

Phil

jit.jpg
jpg
Andro's icon

Pictures aren't so helpful.
Select your whole patch. Ctrl + a.
Go to edit. Copy compressed. Paste that in the forum.

Phil Spitler's icon
Max Patch
Copy patch and select New From Clipboard in Max.
Greg Finger's icon

eh, the picture is enough to tell what's going on. you're gonna want to turn on your audio input/output. connect a [ezadc~] to the first two inlets of [jit.vcr] (remove the [jit.pwindow] from going into there). You can have any noises going into the first two inlets, just make sure the audio is on (check the vcr helpfile).

Also you should have your [jit.grab] going into the right side, but i guess the pwindow also spits out a matrix, even though the patch cord doesn't indicate that.

MrMaarten's icon

you connected the selection of the key to the metro driving the grab (and the recorder). That is not necessary. Also it doesn't end the recording: you use the message 'stop' for that.
With [sel 1] you can make the key press binary: on or off (0 or 1) and with that start and stop.

I didn't test audio. And connected to matrix out of the grab directly to the VCR.

Max Patch
Copy patch and select New From Clipboard in Max.

See this patch:

Phil Spitler's icon

Thanks for the replies.

@Mr Maarten, I tried your patch and it doesn't seem to save a QT file anywhere.

Have I specified the filename in the correct place?

Thanks.

Phil

MrMaarten's icon

if you first save the patch, it saves it in the patch location (otherwise use search in the OS to find the file). You can also specify a path

Max Patch
Copy patch and select New From Clipboard in Max.

here is an example patch that shows the principles:

Phil Spitler's icon

Thanks that helps and will certainly help down the road when I want to create random file names.

Having said that, my patch still isn't recoding video.

It seems odd that I'm putting the filename into the "audio in"

Here is my patch.

As you can tell, I'm a total noob here and your help is great.

Max Patch
Copy patch and select New From Clipboard in Max.

Phil

Phil Spitler's icon

Looking at the console I see a ton of these messages.

jit.vcr: DSP must be enabled before writing

I think that is a clue,

Phil

MrMaarten's icon

To be honest, I've never used the jit.vcr. I always use jit.record. I am not so well versed in the audio aspects of max/msp/jitter.

So I can't help you too much with audio stuff. But I think that "DSP must be enabled before writing" means that you have to activate the audio DAC...

Max Patch
Copy patch and select New From Clipboard in Max.

Here is a patch with jit.record

Phil Spitler's icon

I enabled audio and it worked great. Thanks.

One issue is that audio isn't coming through.

I wonder if jit.qt.grab isn't seeing my audio device.

Phil Spitler's icon

I added an audio input and it worked.

The issue now is that the audio is out of sync with the video significantly.

Here is my patch.

Any thoughts on this issue?

Thanks

Max Patch
Copy patch and select New From Clipboard in Max.

Phil