Jitter - Keep movies playing when not viewed

    Apr 14 2014 | 6:34 am
    I created patch where I can use a MIDI keyboard to cut between twelve different videos; however, every time I hit a note, each video starts back at the beginning instead of where I left off. Does anyone know if there's a way I can keep all 12 videos playing in the background when they're not being viewed, so when I cut to a different video, it doesn't always start with the first frame?
    Thanks! Any help is greatly appreciated!

    • Apr 14 2014 | 8:07 am
      If you send a stop message to jit.qt.movie, your video will pause at that frame -- then you can send a start message and it will pick up from where it left off.
      It's hard to help without seeing your patch or at least the part of it that's related to your problem. With Max, there are so many different ways to do things, and sometimes the problem (and answer!) is in the details.
      In your case, since you say the videos are starting at the beginning, it makes me wonder if you are sending the read message and re-loading the video each time you press a key. Unless you tell it otherwise, jit.qt.movie is going to start a newly loaded video from the beginning. Perhaps you ore only using one copy of jit.qt.movie. If you had 12 copies of it running (say, by using poly~), then you could use the stop and start messages like I mentioned before. Alternatively, you could have your patch save the frame number each video stops on, and then when that video is loaded, pass that frame back to jit.qt.movie so it picks up from where it left off.
      I'm just guessing, though. It's best if you share your patch. Hope that helps.
    • Apr 14 2014 | 9:31 am
      Don't know if this is the concept you have in mind:
      Anyway, this is a very quick and dirty (and inefficient) solution. Having 12 videos runnign in background could be very heavy for your CPU, depending on video resolution. Sure, you can start optimizing putting your players inside a poly~, or moving to GL world with jit.gl.hap. Maybe the most efficient solution could be using the "frame" or "jump" messages to control your jit.qt.movie's (see jit.qt.movie helpfile). With a set of 12 counters you can keep the frame count running and start playing the selected video from the right frame just when needed.
      Could be similar to this:
    • Apr 14 2014 | 11:48 am
      Thanks for the quick responses! I'll take a look at these shortly. Also, I've added my patch below. The green button triggers the write file, the keyboard, and the toggle for videos. Then, whenever I hit a key on my MIDI controller, it switches to a different video (there are only 8 videos in the umenu right now, there will be 12). Thanks again for your help!