Poly~ for Video Limitations


    Aug 09 2019 | 2:40 pm
    Hi there! I have a patch which loads video clips into a poly~ object for triggering with a midi keyboard. I've noticed that I can only load about 2GBs worth of video clips (Mjpeg quicktimes at 960X540). I'd love to be able to load more. Is there a 2GB cap for loading clips into poly? I'm also using the LoadRam function but even without it it seems to crash.
    Is poly for video still the best option for switching clips on the fly in Max 8? And if so, are there limits other than the maximum voice number?

    • Aug 11 2019 | 8:24 pm
      Hi Charlie, good to see ya here :D
      "Is there a 2GB cap for loading clips into poly?"
      poly~ itself isn't loading the video clips(it only loads the max patches and objects), since you mention 'loadram' i assume you're using 'jit.movie' within a poly~ ...so perhaps somewhere, the patch loaded within poly~(the jit.movie object specifically), fails to unload previous clips and reallocate RAM appropriately when a poly~ voice is no longer in use(?) ....using 'loadram', although it makes for quicker response, might complicate unloading from RAM more if used within poly~ and this is further complicated by your settings for 'cache_size'.... if you're using VIDDLL like this, see that specific tab in the jit.movie helpfile.
      Is poly for video still the best option for switching clips on the fly in Max 8?
      yes, but in a general way: poly~ helps split out processes into a voice-allocation system to help allocate resources of your computer only when certain things are needed, so it's great for that type of thing as long as the patch it loads is designed to utilize that system efficiently/effectively. it's been recommended that everyone take a newer/fresh look at vizzie objects(they've been redesigned to work more efficiently with your GPU resources as of Max8). perhaps look at 'viewr'(or 'vz.viewr', or use the 'vizzie' menu on the left-sidebar of a patcher window to check everything vizzie-related out), also perhaps 'vz.playr'(maybe also 'vz.moviefoldr'), and then nest what you want within a poly~.
      And if so, are there limits other than the maximum voice number?
      i've not heard of any, but i'm guessing no(other than what your computer's resources are limited to).
      i think others might have better advice, so at least this bumps it up to their attention, but you could also upload your poly~ patch, and people might be able to help you work on its efficiency more.
      🍻
    • Aug 12 2019 | 9:38 pm
      Raja! You are always there for me man! I always really appreciate your help. You've already helped a ton over the years with my patch. Thanks for the reply. I've been thinking of recreating this app from the ground up again but in a simpler form. I will definitely run some tests on the vizzie objects. I love the response time of the app currently but you're probably right about the ram loading/unloading. But it's good to know that there isn't some cap on amount of data I'm able to load. I'm guessing that unloading and reloading to ram isn't something that can be done without interruption to playback. I'm cool with working within limitations but I'd love to be able to load more clips. I'm sure I'll figure it out eventually! I will definitely also check out that help file. I'm not sure if I'm using the VIDDLL engine.
      Thanks again man!!!
    • Jul 24 2021 | 12:08 am
      Hi guys,
      I'm building a patch based on jit.movie in poly~ or at least it seems to be the solution. I'd like to have the possibility to switch between videos as quick as possible although I still haven't figured out how I can make it work. The signal goes trough the poly~ object, it works, but when I change the clip from list in the chooser object what I use for having a list of files, they start to be played together, I hear the audio of all of them, but the screen gets frozen and the GPU starts dying eventually. I tried the @steal attribute, but it doesn't seem to work. I don't know what's the solution. Would you share your thoughts about how to build a system like this? As I understand that's exactly what you already managed to create. Cheers, Ferko
    • Jul 25 2021 | 12:45 am
      I'm currently working on something similar and have come across a possible simple solution, especially if you're only playing one clip at a time. Basically you've got to tell Poly~ which clip to play and at the same time which clip to mute.
      This simple patch using a bucket object can possibly help you turn off the last note while at the same time triggering the current one.
    • Jul 25 2021 | 1:01 am
      It also would be a good idea to place a Change object before the Bucket object in order to filter out Re-triggers of the same clip.
    • Jul 28 2021 | 3:05 pm
      there is an example of this approach by Luke Dubois in Help/Examples/jitter-examples/video/movie/PolyMovie it just needs to be updated with jit.movie @output_texture 1
      after many tests with codecs and playback techniques, I found that to load tons of videos with zero lag, the best approach is to combine them into one single file, convert it to the Hap codec, and then use jit.movie's frame $1 message to play sections of that single file
      hope this helps!
    • Aug 03 2021 | 6:47 pm
      Hey Egon, although I haven't answered you, but I actually solved it. I don't use the poly object though, because it just didn't work for me somehow, but I created a system based on your and one of my friends idea. I turned my video player patch into a bpatcher what I multiplied and turned into another bpatcher and then I connected everything manually and it works perfectly. I can load the clips in voice by voice and the bucket object sends the 1s and 0s to my play button. Thanks for the tip, I never heard about the bucket object, pretty useful. :))))