Best way to record raw / uncompressed with jit.record in Max 7? (worked well in Max 6)

aartcore's icon

I had a patch working well in Max 6 recording video in raw codec. I use this to record a sequence of float numbers.

Now i want to use this in Max 7 but playing the recorded file doesn't work properly.
I use the viddll engine to record an avi in the huffyuv codec, which looks to go fine. But playing the file in a jit.movie doesn't. VLC player does play the recorded file well.

And is this the best way to record uncompressed video in max 7?

see the attached patch:

record-raw.maxpat
Max Patch

Rob Ramirez's icon

looks like the problem is in the @realtime 1 on your jit.record. setting realtime to 0 seems to fix it. any particular reason you need that enabled?

if that doesn't fix it for you, then i'd reccommend launching in 32 bit and using @engine qt

aartcore's icon

I need the realtime 1 because i want it to sync skeleton data from the kinect with a video. The skeleton data i convert to a matix / video sequence to be able to play it back in sync.
this seems to me the best solution the be able to record this data, or is there another good way?

if i launch in 32bit i will lose a lot of computer power right? and i need it already badly...

Rob Ramirez's icon

you don't lose cpu power, you simply are limited in memory use (~2GB).

my solution for recording kinect frame matrices was to write them out as sequences of jitter binary data frames, using the "write" message to jit.matrix.

if you're interested in that solution, i'll try and dig up my old patch that did that. this means that for playback, you also have to read them back in frame by frame using the jit.matrix "read" message (or you could store sequeneces of frames in a single jit.matrixset).

i'll also investigate a better solution with viddll for writing out raw data files, but this is low priority.

aartcore's icon

Would love to see your solution, sounds interesting a jxf sequence..

thanks in advance!

Rob Ramirez's icon

there's not a whole lot to it.

you have to think about each folder of frames being a single recording "clip". so before recording a new clip, drag and drop the folder, telling it where to write the frames to. toggle the recording on, record some frames, and toggle it off. to playback simply toggle the playback on, and it will loop through all the frames in the current clip folder.

there's lots more that could be built on top of this to handle stuff like editing, looping, rate, etc. but this is a good start. maybe at some point i'll expand on this and release it as a tool.

make sure you have lots of drive space, as the clip frames are uncompressed, and will be quite large. you could also rework this to use jit.matrixset instead, if you are recording clips short enough to be stored in memory.

Max Patch
Copy patch and select New From Clipboard in Max.

aartcore's icon

Thanks Rob!
i will check it out.