Forums > Jitter

Auto load and unload of video segments to and from RAM

Dec 22 2009 | 5:33 pm


I’m designing a small patch to automatically load and unload quicktime video segments to and from RAM.
My idea is to begin by loading the first 30 seconds in RAM, (loadbang in input #1) and to begin tracking the current location in terms of frames (frame # input through "r curBloc").
When the frames begin to approach 30 seconds, I unload what’s playing in the, then load the next 30 seconds worth in (allowing some overlap, as I’m actually jumping back and forth within a range of frames in RAM).
My measurement of location in the file is done in terms of 30 frames per second.
My measurement of file to load using "loadram" is done in terms of 600 units per second.

The problem: although this seems to be counting properly, it does not seem to be loading properly after the first 30 seconds, and if I reload twice, it crashes. Any ideas? Perhaps I’m not giving enough time between the "unload" and the "reload"? I don’t know how to check in Max for a return function call when a function (say, "unload") has successfully completed. Any help is appreciated. Patch is below.


-- Pasted Max Patch, click to expand. --

Dec 22 2009 | 6:20 pm

Sorry, I left out system info.

I’m using a MacBook Pro 17", OS 10.6.2, 4GB RAM, Max 5.1.1.

Dec 23 2009 | 6:59 pm

hi, thanks for the report. would you please provide a complete patch so we can take a look? this one seems to be only a section of the patch.

Dec 29 2009 | 8:34 pm

I’ve copied a compressed patch below of my video loadram regulator patch, that includes everything to see it work on a linear video play.

What I have now looks like it’s working, but has a couple of bugs I’d love some help with, if someone has the time. It may be that a debugged version of this will be useful to more people than just me.

1. When I run this with the Max window open, I’m seeing both a "loadram X X" with the lowram and highram numbers as programmed, and another "loadram 1" showing up. I don’t know where the "loadram 1" is coming from, or how to delete it.
2. At the end of the loop (when the top frame number is reached), the video image vanishes for a second or two, then picks up. I’d like to have that smoothed out so it loops politely, without going blank.

I appreciate any help anyone can provide. The compressed patch is below my name.


-- Pasted Max Patch, click to expand. --

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > Jitter