How to close a grabbed file

Jul 1, 2007 at 11:04am

How to close a grabbed file

Hi

I am using jit..qt.grap and jit.qt.movie after one another.
I record a camera stream, whereafter I manipulate this with a qt.movie editor.

First time I record everything works just fine, however the second time when I overwrite my sample file the file seems to remain open and then I cannot open it using qt.movie. What message should I use to the grab to close the file? I’ve tried close, stop and clear.

Included is a simplified patch.

max v2;
#N vpatcher 10 59 1207 708;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 289 405 62 196617 print movie;
#P newex 236 380 63 196617 jit.qt.movie;
#P newex 236 352 68 196617 prepend read;
#P button 331 214 15 0;
#P newex 331 241 86 196617 opendialog folder;
#P comment 348 214 100 196617 Set write Folder;
#P newex 489 336 63 196617 route close;
#P newex 398 315 101 196617 jit.qt.grab 720 576;
#B color 5;
#P user jit.pwindow 397 367 82 62 0 1 0 0 1 0;
#N vpatcher 456 125 1318 562;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 408 133 20 196617 t b;
#P outlet 408 278 15 0;
#P inlet 408 76 15 0;
#P window linecount 1;
#P message 408 260 16 196617 “Macintosh HD:/Users/maartenzeinstra/Desktop/sample”;
#P newex 335 234 62 196617 prepend set;
#P inlet 119 100 15 0;
#N vpatcher 10 59 610 459;
#P window setfont “Sans Serif” 9.;
#P newex 360 107 90 196617 prepend set codec;
#P inlet 360 57 15 0;
#P outlet 246 302 15 0;
#P outlet 85 302 15 0;
#P inlet 138 58 15 0;
#P inlet 85 58 15 0;
#P newex 138 143 62 196617 prepend set;
#P newex 138 108 51 196617 tosymbol;
#P newex 138 81 89 196617 sprintf %ssample;
#P newex 85 255 89 196617 append codec bmp;
#P newex 85 230 73 196617 prepend write;
#P message 85 194 16 196617 “Macintosh HD:/Users/maartenzeinstra/Desktop/sample”;
#P connect 6 0 0 0;
#P fasten 5 0 0 0 143 185 90 185;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P fasten 11 0 2 0 365 250 90 250;
#P connect 2 0 8 0;
#P connect 7 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P fasten 0 0 9 0 90 221 251 221;
#P connect 10 0 11 0;
#P pop;
#P newobj 81 212 48 196617 p writer;
#P inlet 100 100 15 0;
#P newex 81 162 62 196617 t b b;
#P message 133 212 30 196617 open;
#P outlet 228 278 15 0;
#P newex 228 135 57 196617 qmetro 40;
#P message 187 211 89 196617 close , stop , clear;
#P outlet 133 278 15 0;
#P newex 187 161 20 196617 t b;
#P newex 81 133 116 196617 sel 1;
#P inlet 81 100 15 0;
#P fasten 0 0 1 0 86 124 86 124;
#P connect 1 0 8 0;
#P connect 8 0 10 0;
#P connect 9 0 10 1;
#P connect 11 0 10 2;
#P connect 8 1 7 0;
#P fasten 7 0 3 0 138 252 138 252;
#P fasten 4 0 3 0 192 252 138 252;
#P fasten 10 0 3 0 86 253 138 253;
#P connect 1 1 2 0;
#P connect 2 0 4 0;
#P fasten 0 0 5 0 86 126 233 126;
#P connect 5 0 6 0;
#P fasten 10 1 12 0 124 231 340 231;
#P connect 14 0 16 0;
#P connect 16 0 13 0;
#P fasten 12 0 13 0 340 255 413 255;
#P connect 13 0 15 0;
#P pop;
#P newobj 293 264 126 196617 p record;
#P toggle 293 241 15 0;
#P fasten 1 2 8 0 414 305 241 305;
#P connect 8 0 9 0;
#P connect 9 1 10 0;
#P connect 0 0 1 0;
#P connect 7 0 6 0;
#P connect 6 0 1 1;
#P fasten 1 1 3 0 356 298 403 298;
#P fasten 1 0 3 0 298 298 403 298;
#P connect 3 0 2 0;
#P connect 4 1 1 3;
#P connect 3 1 4 0;
#P pop;

#32701
Jul 1, 2007 at 12:30pm

Made a mistake when simplifying, this is the correct patch

max v2;
#N vpatcher 10 59 1207 708;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 542 361 32 196617 print;
#P newex 289 405 62 196617 print movie;
#P newex 236 380 63 196617 jit.qt.movie;
#P newex 236 352 68 196617 prepend read;
#P button 331 214 15 0;
#P newex 331 241 86 196617 opendialog folder;
#P comment 348 214 100 196617 Set write Folder;
#P newex 489 336 63 196617 route close;
#P newex 398 315 101 196617 jit.qt.grab 720 576;
#B color 5;
#P user jit.pwindow 397 367 82 62 0 1 0 0 1 0;
#N vpatcher 456 125 1318 562;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 408 133 20 196617 t b;
#P outlet 408 278 15 0;
#P inlet 408 76 15 0;
#P window linecount 1;
#P message 408 260 280 196617 “Macintosh HD:/Users/maartenzeinstra/Desktop/sample”;
#P newex 335 234 62 196617 prepend set;
#P inlet 119 100 15 0;
#N vpatcher 10 59 610 459;
#P window setfont “Sans Serif” 9.;
#P newex 360 107 90 196617 prepend set codec;
#P inlet 360 57 15 0;
#P outlet 246 302 15 0;
#P outlet 85 302 15 0;
#P inlet 138 58 15 0;
#P inlet 85 58 15 0;
#P newex 138 143 62 196617 prepend set;
#P newex 138 108 51 196617 tosymbol;
#P newex 138 81 89 196617 sprintf %ssample;
#P newex 85 255 89 196617 append codec bmp;
#P newex 85 230 73 196617 prepend write;
#P message 85 194 16 196617 “Macintosh HD:/Users/maartenzeinstra/Desktop/sample”;
#P connect 6 0 0 0;
#P fasten 5 0 0 0 143 185 90 185;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P fasten 11 0 2 0 365 250 90 250;
#P connect 2 0 8 0;
#P connect 7 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 5 0;
#P fasten 0 0 9 0 90 221 251 221;
#P connect 10 0 11 0;
#P pop;
#P newobj 81 212 48 196617 p writer;
#P inlet 100 100 15 0;
#P newex 81 162 62 196617 t b b;
#P message 133 212 30 196617 open;
#P outlet 228 278 15 0;
#P newex 228 135 57 196617 qmetro 40;
#P message 187 211 89 196617 clear , close , stop;
#P outlet 133 278 15 0;
#P newex 187 161 20 196617 t b;
#P newex 81 133 116 196617 sel 1;
#P inlet 81 100 15 0;
#P fasten 0 0 1 0 86 124 86 124;
#P connect 1 0 8 0;
#P connect 8 0 10 0;
#P connect 9 0 10 1;
#P connect 11 0 10 2;
#P connect 8 1 7 0;
#P fasten 7 0 3 0 138 252 138 252;
#P fasten 4 0 3 0 192 252 138 252;
#P fasten 10 0 3 0 86 253 138 253;
#P connect 1 1 2 0;
#P connect 2 0 4 0;
#P fasten 0 0 5 0 86 126 233 126;
#P connect 5 0 6 0;
#P fasten 10 1 12 0 124 231 340 231;
#P connect 14 0 16 0;
#P connect 16 0 13 0;
#P fasten 12 0 13 0 340 255 413 255;
#P connect 13 0 15 0;
#P pop;
#P newobj 293 264 126 196617 p record;
#P toggle 293 241 15 0;
#P fasten 1 2 8 0 414 305 241 305;
#P connect 8 0 9 0;
#P connect 9 1 10 0;
#P connect 0 0 1 0;
#P connect 7 0 6 0;
#P connect 6 0 1 1;
#P fasten 1 1 3 0 356 298 403 298;
#P fasten 1 0 3 0 298 298 403 298;
#P connect 3 0 2 0;
#P connect 4 0 1 3;
#P connect 3 1 4 0;
#P connect 4 1 11 0;
#P pop;

#108085
Nov 29, 2007 at 12:36pm

You probably want the ‘dispose’ message to jit.qt.movie so that it’s not in use anymore.

#108086

You must be logged in to reply to this topic.