Capturing video from two webcam and record it into computer using max?

R_Gol's icon

Is it possible to capture two identical (or they must be different?) simple webcams into max msp and record them into one video file? (on camera data on leftside and the other on right hand side)?

Is all the above possible? if not what is possible using max in term of video recording?

Thanks

LSka's icon

hi,

simplest way would be using two jit.grab objects, then jit.concat to join the videos and jit.record to record.

If you want something easier, you can check the Vizzie abstractions, which come with pre-built controls

R_Gol's icon

Thanks this is great!

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

Edit: What definition I need for high quality recording?

Edit2: What format I need to be able to open in VLC?

.mov won't open in VLC rather only in quick time

R_Gol's icon

Another strange issue. I record 5 seconds but my video file shows 25 seconds. why is that?

Edit:

I have added: @frame 30 @codec h264 which seems to solve it.

Edit2: the above did not solved it :( it records different length then the time I press write and stop

Is there any option to record also the sound from the cameras?

R_Gol's icon

Some updates:

1) The recording length is fine now! I made some mistake to stop the recording.

2) I'm using jit.vcr instread of jit.record in order to be able to record the audio in the patch as well.

3) my output file is way too large - ~300Mb for 01:20 minute of recording. How can I reduced the output file?

R_Gol's icon

There is no way to reduce the size of the recorded video? 300Mb for 01:20 minutes is too large...

Wil's icon

Try setting up to record in OBS

follow this thread about quality

There is an "undistinguishable quality" feature

I just recorded 1 minute video in jit.vcr = 1.5gb

Same recording in OBS = 9.1 mb

1920 x1080 - no quality difference

***note - if you use OBS, you can [jit.world @visible 0] with very large dimensions and massively increase frame rate

R_Gol's icon

I just recorded 1 minute video in jit.vcr = 1.5gb

Same recording in OBS = 9.1 mb

I really would preffer not using OBS (or any other external object/software)

Is there no other way to reduce to file when using jit.vcr?

Rob Ramirez's icon

you can change the codec attribute, but it will affect performance and quality.

R_Gol's icon

you can change the codec attribute, but it will affect performance and quality.

Which is the one I should use?

R_Gol's icon

Try setting up to record in OBS

follow this thread about quality

I don't understand how to record using OBS?

Do you have an example patch?

TFL's icon

The codec is not the whole story when it comes to quality/size ratio, encoding configuration (variable or constant bitrate, which target bitrate, one or two passes, etc.) is also very important, but you don't have access to that when using jit.record or jit.vcr. So best chance you have is to record as the highest possible quality (using Prores 422 or Prores 4444) and then compress using a third party app like Handbrake or ffmpeg.

Or you can send the Max output to OBS and record from it directly as it has much more fine control over encoding settings.

In order to record using OBS, you need to send your visual as a texture (not a matrix) to OBS using Spout (Windows) or Syphon (macOS). Various tutorials are available in the forum, like here. If you want to record audio at the same time, you need to route the audio from Max to OBS, usually using some virtual audio device software, like VB-Audio Cable (Windows) or Blackhole (macOS).

R_Gol's icon

Thanks for your answer. Its a shame it is not possible to reduce the file size of the video directly in MAX rather it is only possible via third party software..

R_Gol's icon

What can cause my camera to act slow (using jit.grab) ? what can I do in order make it run smooth?

TFL's icon

Increase the speed of the [qmetro] driving it, or the fps of the [jit.world] if you use one instead of a [qmetro]. Also, some cameras, especially some webcams are just slow in low light condition, so adding more lights to your scene might give smoother results.

But maybe it's something else, hard to say without knowing what your patch looks like now.