Lag related to jit.record

    Jan 11 2019 | 4:05 pm
    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,

    • Jan 11 2019 | 5:10 pm
      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
    • Jan 11 2019 | 5:59 pm
      Thank you for the suggestion Rob !
      I'll try to sort this out asap and I'll get back to you.
    • Jan 17 2019 | 9:47 am
      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 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.
    • Jan 17 2019 | 5:13 pm
      use asyncread
    • Jan 17 2019 | 5:47 pm
      Wonderful ! it works ! Thanks a lot, no sure why though (the technical reason i mean).