Lag related to jit.record
Hi there !
I created a basic video sampler that grabs video from various inputs (essentially cameras) in 1080p and allows me to play later the recorded samples. In parallel, there is always video monitoring of the camera and i can crossfade between my samples and my live monitoring.
Although it works quite well, i've noticed whenever I press the stop button of the recorder (which means, i guess, max writes the movie file), I get a lag in my video output, like a stutter.
It seems to affect the whole rendering process.
Do you know if it's a normal thing linked to the way max treats video recording itself, or do I need to set specific parameters to avoid that ?
Thank you a lot for that,
probably unavoidable. My suggestion would be to run a separate process (meaning separate instance of Max) for the recording. you can use syphon or spout to pass frames, and udpsend/receive to communicate between the instances. basic example below:
SENDER patch
RECEIVER patch
Thank you for the suggestion Rob !
I'll try to sort this out asap and I'll get back to you.
Hi again Rob !
I checked with a new instance of max and it does not work. However, i discovered it's not jit.record that causes the stutter when it writes data, it's jit.movie at the moment it reads a file (because my patch reads the file straight after it's been recorded, i did not figured it out).
I then checked if the operation is not done simultaneously and the stutter still persists.
use asyncread
Wonderful ! it works ! Thanks a lot, no sure why though (the technical reason i mean).