Forums > Jitter

recording precise video lengths…

October 30, 2007 | 5:43 pm

Hello forum – quick pointers needed…

I’ve got a patch working that loops/manipulates qt videos that are ‘read’ into jit.qt.movie. It works fine, but I need to convert it to working with live input.

So my question is – what’s the best way to chop up live video into, say, eight 1500ms chucks, and have them assigned to 8 different qt.movie objects?

I’ve read the relevant tutorials, but is seems very complicated…I could do it in 2 minutes if it was just audio, but videoland is making my brain ooze…

Thanks for any clues,

Lee Morgan


October 30, 2007 | 6:35 pm

try this fun patch. If you really want 8, this may get a bit bogged down in disk access and qt.movie decompression. You can swap out the qt.record+qt.movie for a jit.matrixset method for better performance, though memory might get tight, and you aren’t left with all the handy clips. This qt-based method may not be precise enough, either…

#P window setfont "Sans Serif" 9.;
#P window linecount 6;
#P comment 449 114 100 196617 another way to do this could be with matrixset , but for longer clips , this will get memory intensive.;
#P comment 448 37 100 196617 takes live camera input , records to disk , then loads the clip into a movie player. All BPM based.;
#P window linecount 1;
#P hidden newex 83 349 20 196617 t b;
#P window setfont Arial 9.;
#P message 110 327 143 131137545 http://www.lividinstruments.com/;
#P window linecount 2;
#P hidden message 110 346 230 131137545 ; max launch_browser http://www.lividinstruments.com/;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 110 313 143 196617 pnyboer at slambassador.com;
#P comment 110 298 109 196617 patch by peter nyboer;
#N vpatcher 30 89 375 532;
#P window setfont "Sans Serif" 9.;
#P newex 51 90 40 196617 t 0 1 b;
#P newex 51 158 36 196617 t stop;
#N vpatcher 30 89 630 489;
#P window setfont Arial 9.;
#P newex 59 135 92 131137545 sprintf %s_%ld.mov;
#P message 61 88 34 131137545 Movie;
#P newex 50 50 52 131137545 t b b ticks;
#P newex 95 88 40 131137545 date;
#P window setfont "Sans Serif" 9.;
#P newex 44 177 167 196617 pack write name 30. jpeg max 600;
#P comment 100 67 200 196617 low chance of overwriting existing movie!;
#P inlet 50 30 15 0;
#P outlet 44 199 15 0;
#P connect 5 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 6 0 7 0;
#P connect 5 1 6 0;
#P connect 7 0 3 1;
#P connect 5 2 4 0;
#P connect 4 2 7 1;
#P pop;
#P newobj 144 168 85 196617 p generate-name;
#P comment 150 74 108 196617 one measure of tempo;
#P newex 118 73 29 196617 * 4.;
#P newex 233 326 42 196617 r drive;
#P newex 235 297 59 196617 print READ;
#P newex 166 296 68 196617 prepend read;
#P newex 165 326 63 196617 jit.qt.movie;
#P newex 167 275 51 196617 zl slice 1;
#P newex 165 254 62 196617 route write;
#P newex 120 50 55 196617 !/ 60000.;
#P newex 51 135 55 196617 pipe 5000;
#P newex 93 197 29 196617 gate;
#P newex 51 235 124 196617 jit.qt.record @realtime 1;
#P inlet 51 67 15 0;
#P inlet 116 177 15 0;
#P inlet 120 30 15 0;
#P outlet 165 348 15 0;
#P connect 3 0 18 0;
#P connect 18 0 6 0;
#P connect 6 0 17 0;
#P connect 17 0 4 0;
#P connect 5 0 4 0;
#P fasten 16 0 4 0 149 231 56 231;
#P fasten 6 0 5 0 56 155 98 155;
#P fasten 18 1 5 0 71 131 98 131;
#P connect 14 0 6 1;
#P connect 2 0 5 1;
#P connect 7 0 14 0;
#P connect 1 0 7 0;
#P fasten 18 2 16 0 86 128 149 128;
#P connect 4 1 8 0;
#P connect 11 0 10 0;
#P connect 13 0 10 0;
#P connect 10 0 0 0;
#P connect 9 0 11 0;
#P connect 8 0 9 0;
#P connect 11 0 12 0;
#P pop;
#P newobj 331 201 96 196617 p record-then-play;
#P button 331 136 34 0;
#P user jit.pwindow 330 228 82 62 0 1 0 0 1 0;
#N vpatcher 30 89 375 532;
#P window setfont "Sans Serif" 9.;
#P newex 51 90 40 196617 t 0 1 b;
#P newex 51 158 36 196617 t stop;
#N vpatcher 30 89 630 489;
#P window setfont Arial 9.;
#P newex 59 135 92 131137545 sprintf %s_%ld.mov;
#P message 61 88 34 131137545 Movie;
#P newex 50 50 52 131137545 t b b ticks;
#P newex 95 88 40 131137545 date;
#P window setfont "Sans Serif" 9.;
#P newex 44 177 167 196617 pack write name 30. jpeg max 600;
#P comment 100 67 200 196617 low chance of overwriting existing movie!;
#P inlet 50 30 15 0;
#P outlet 44 199 15 0;
#P connect 5 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 6 0 7 0;
#P connect 5 1 6 0;
#P connect 7 0 3 1;
#P connect 5 2 4 0;
#P connect 4 2 7 1;
#P pop;
#P newobj 144 168 85 196617 p generate-name;
#P comment 150 74 108 196617 one measure of tempo;
#P newex 118 73 29 196617 * 4.;
#P newex 233 326 42 196617 r drive;
#P newex 235 297 59 196617 print READ;
#P newex 166 296 68 196617 prepend read;
#P newex 165 326 63 196617 jit.qt.movie;
#P newex 167 275 51 196617 zl slice 1;
#P newex 165 254 62 196617 route write;
#P newex 120 50 55 196617 !/ 60000.;
#P newex 51 135 55 196617 pipe 5000;
#P newex 93 197 29 196617 gate;
#P newex 51 235 124 196617 jit.qt.record @realtime 1;
#P inlet 51 67 15 0;
#P inlet 116 177 15 0;
#P inlet 120 30 15 0;
#P outlet 165 348 15 0;
#P connect 3 0 18 0;
#P connect 18 0 6 0;
#P connect 6 0 17 0;
#P fasten 16 0 4 0 149 231 56 231;
#P connect 5 0 4 0;
#P connect 17 0 4 0;
#P fasten 18 1 5 0 71 131 98 131;
#P fasten 6 0 5 0 56 155 98 155;
#P connect 14 0 6 1;
#P connect 2 0 5 1;
#P connect 7 0 14 0;
#P connect 1 0 7 0;
#P fasten 18 2 16 0 86 128 149 128;
#P connect 4 1 8 0;
#P connect 11 0 10 0;
#P connect 13 0 10 0;
#P connect 10 0 0 0;
#P connect 9 0 11 0;
#P connect 8 0 9 0;
#P connect 11 0 12 0;
#P pop;
#P newobj 220 201 96 196617 p record-then-play;
#P newex 40 102 42 196617 s drive;
#P button 220 137 34 0;
#P newex 207 35 72 196617 loadmess 120;
#P user jit.pwindow 219 229 82 62 0 1 0 0 1 0;
#P flonum 207 64 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.pwindow 86 229 82 62 0 1 0 0 1 0;
#P message 184 102 33 196617 close;
#P newex 149 80 41 196617 sel 1 0;
#P message 150 102 30 196617 open;
#P toggle 87 32 27 0;
#P newex 87 102 52 196617 metro 33;
#P newex 87 133 56 196617 jit.qt.grab;
#P comment 244 64 100 196617 BPM;
#P connect 2 0 12 0;
#P hidden connect 20 0 21 0;
#P connect 3 0 2 0;
#P connect 4 0 1 0;
#P connect 6 0 1 0;
#P connect 2 0 1 0;
#P connect 1 0 7 0;
#P hidden connect 21 0 19 0;
#P connect 3 0 5 0;
#P connect 5 0 4 0;
#P connect 5 1 6 0;
#P connect 10 0 8 0;
#P connect 11 0 13 0;
#P connect 13 0 9 0;
#P fasten 1 0 13 1 92 175 268 175;
#P fasten 8 0 13 2 212 192 311 192;
#P connect 15 0 16 0;
#P connect 16 0 14 0;
#P fasten 1 0 16 1 92 175 379 175;
#P fasten 8 0 16 2 212 191 422 191;
#P window clipboard copycount 24;


October 31, 2007 | 7:50 pm

pnyboer – that’s so cool…what can I say? I owe you a drink – and I even have a recipie for that too.

It’s all working fine, just got to get the audio to record as well. The manual and help files seem to have about 5 ways to turn the audio-recording side of jit.grab on, but none are helping. If you wouldn’t mind this last piece of the puzzle…..

Really, this is very sweet of you. I’ll get the cocktail shaker out.

Lee


November 1, 2007 | 2:56 pm

This is driving me insane. Does jit.qt.record not record audio along with video? Meaning I have to use jit.vcr, and split the incoming audio? That seems crazy….or can I replace the jit.qt.record with another grab object? It’s so close to being a great patch, with the name-generating patch especially smart. I just want the sound to reach the recorded movies too….

Any help handsomly paid for (in esteem, anyway…)

Lee


November 1, 2007 | 11:42 pm

green patch cord means matrix data.
you want to record audio using msp objects.

jit.vcr seems like exactly what you want.
what is the problem with using that?

before jit.vcr, this was a pain, but now…


November 2, 2007 | 6:57 am

I appreciate that jit.vcr does that, it’s more the fact that with the grab object, you can hear and loop the audio without even having to route audio in to max/msp. But if that’s the only way to make the excellent patch posted above audio too, then I’ll try that. I guess it’s about accepting that a matrix and a sound-filled qt.movie aren’t as closely related as they appear.

Best wishes,

Lee


November 2, 2007 | 4:19 pm

sorry i missed the follow up on this!
glad the patch worked out for you…mostly.
here’s another way of doing it.
I looked at qt.grab help file and was reminded that it has it’s own recorder built in. Lesson learned – just when you think you know everything, you don’t.
This will do audio and video. The drawback to this method is that your live camera feed is kinda shot during recording, in spite of the supposed "write_preview" support. You also have less control over audio, so clicks and pops at loop points may be prevalent, since you can’t do a nice fade in/out at start/end as you could with the MSP audio.
That said, this patch is HELLA FUN!

#P user jit.pwindow 522 383 82 62 0 1 0 0 1 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 534 310 21 196617 t 3;
#N vpatcher 867 196 1212 639;
#N comlet from grab out;
#P inlet 165 222 15 0;
#N comlet to grab;
#P outlet 51 262 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 51 90 31 196617 t 0 b;
#P newex 51 158 36 196617 t stop;
#N vpatcher 30 89 630 489;
#P window setfont Arial 9.;
#P newex 59 135 92 131137545 sprintf %s_%ld.mov;
#P message 61 88 34 131137545 Movie;
#P newex 50 50 52 131137545 t b b ticks;
#P newex 95 88 40 131137545 date;
#P window setfont "Sans Serif" 9.;
#P newex 44 177 167 196617 pack write name 30. jpeg max 600;
#P comment 100 67 200 196617 low chance of overwriting existing movie!;
#P inlet 50 30 15 0;
#P outlet 44 199 15 0;
#P connect 5 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 6 0 7 0;
#P connect 5 1 6 0;
#P connect 7 0 3 1;
#P connect 5 2 4 0;
#P connect 4 2 7 1;
#P pop;
#P newobj 144 168 85 196617 p generate-name;
#P comment 128 75 108 196617 one measure of tempo;
#P newex 96 74 29 196617 * 4.;
#P newex 233 326 42 196617 r drive;
#P newex 235 297 59 196617 print READ;
#P newex 166 296 68 196617 prepend read;
#P newex 165 326 63 196617 jit.qt.movie;
#P newex 167 275 51 196617 zl slice 1;
#P newex 165 254 62 196617 route write;
#P newex 98 51 55 196617 !/ 60000.;
#P newex 51 135 55 196617 pipe 5000;
#P inlet 51 67 15 0;
#P inlet 98 31 15 0;
#N comlet movie out;
#P outlet 165 348 15 0;
#P connect 2 0 15 0;
#P connect 15 0 3 0;
#P connect 3 0 14 0;
#P connect 14 0 16 0;
#P fasten 13 0 16 0 149 238 56 238;
#P connect 4 0 11 0;
#P connect 11 0 3 1;
#P connect 1 0 4 0;
#P fasten 15 1 13 0 77 122 149 122;
#P connect 17 0 5 0;
#P connect 8 0 7 0;
#P connect 10 0 7 0;
#P connect 7 0 0 0;
#P connect 6 0 8 0;
#P connect 5 0 6 0;
#P connect 8 0 9 0;
#P pop;
#P newobj 523 338 96 196617 p record-then-play;
#P button 523 274 34 0;
#P window linecount 8;
#P comment 623 230 100 196617 this includes sound , but by relying on the grab to do the recording , we pretty much lose our "preview" out of grab during recording;
#P window linecount 1;
#P newex 428 311 21 196617 t 2;
#N vpatcher 867 196 1212 639;
#N comlet from grab out;
#P inlet 165 222 15 0;
#N comlet to grab;
#P outlet 51 262 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 51 90 31 196617 t 0 b;
#P newex 51 158 36 196617 t stop;
#N vpatcher 30 89 630 489;
#P window setfont Arial 9.;
#P newex 59 135 92 131137545 sprintf %s_%ld.mov;
#P message 61 88 34 131137545 Movie;
#P newex 50 50 52 131137545 t b b ticks;
#P newex 95 88 40 131137545 date;
#P window setfont "Sans Serif" 9.;
#P newex 44 177 167 196617 pack write name 30. jpeg max 600;
#P comment 100 67 200 196617 low chance of overwriting existing movie!;
#P inlet 50 30 15 0;
#P outlet 44 199 15 0;
#P connect 5 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 6 0 7 0;
#P connect 5 1 6 0;
#P connect 7 0 3 1;
#P connect 5 2 4 0;
#P connect 4 2 7 1;
#P pop;
#P newobj 144 168 85 196617 p generate-name;
#P comment 128 75 108 196617 one measure of tempo;
#P newex 96 74 29 196617 * 4.;
#P newex 233 326 42 196617 r drive;
#P newex 235 297 59 196617 print READ;
#P newex 166 296 68 196617 prepend read;
#P newex 165 326 63 196617 jit.qt.movie;
#P newex 167 275 51 196617 zl slice 1;
#P newex 165 254 62 196617 route write;
#P newex 98 51 55 196617 !/ 60000.;
#P newex 51 135 55 196617 pipe 5000;
#P inlet 51 67 15 0;
#P inlet 98 31 15 0;
#N comlet movie out;
#P outlet 165 348 15 0;
#P connect 2 0 15 0;
#P connect 15 0 3 0;
#P connect 3 0 14 0;
#P fasten 13 0 16 0 149 238 56 238;
#P connect 14 0 16 0;
#P connect 4 0 11 0;
#P connect 11 0 3 1;
#P connect 1 0 4 0;
#P fasten 15 1 13 0 77 122 149 122;
#P connect 17 0 5 0;
#P connect 8 0 7 0;
#P connect 10 0 7 0;
#P connect 7 0 0 0;
#P connect 6 0 8 0;
#P connect 5 0 6 0;
#P connect 8 0 9 0;
#P pop;
#P newobj 417 339 96 196617 p record-then-play;
#P button 417 275 34 0;
#P user jit.pwindow 416 384 82 62 0 1 0 0 1 0;
#P newex 291 311 21 196617 t 1;
#P newex 366 235 47 196617 gate 3 1;
#P newex 265 48 48 196617 loadbang;
#P message 74 123 65 196617 snd_settings;
#P message 265 69 222 196617 write_video 1 , write_audio 1 , write_preview 1;
#P window linecount 6;
#P comment 624 155 100 196617 another way to do this could be with matrixset , but for longer clips , this will get memory intensive.;
#P comment 623 78 100 196617 takes live camera input , records to disk , then loads the clip into a movie player. All BPM based.;
#P window linecount 1;
#P hidden newex 116 464 20 196617 t b;
#P window setfont Arial 9.;
#P message 143 442 143 131137545 http://www.lividinstruments.com/;
#P window linecount 2;
#P hidden message 143 461 230 131137545 ; max launch_browser http://www.lividinstruments.com/;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 143 428 143 196617 pnyboer at slambassador.com;
#P comment 143 413 109 196617 patch by peter nyboer;
#N vpatcher 869 195 1214 638;
#N comlet from grab out;
#P inlet 165 222 15 0;
#N comlet to grab;
#P outlet 51 262 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 51 90 31 196617 t 0 b;
#P newex 51 158 36 196617 t stop;
#N vpatcher 30 89 630 489;
#P window setfont Arial 9.;
#P newex 59 135 92 131137545 sprintf %s_%ld.mov;
#P message 61 88 34 131137545 Movie;
#P newex 50 50 52 131137545 t b b ticks;
#P newex 95 88 40 131137545 date;
#P window setfont "Sans Serif" 9.;
#P newex 44 177 167 196617 pack write name 30. jpeg max 600;
#P comment 100 67 200 196617 low chance of overwriting existing movie!;
#P inlet 50 30 15 0;
#P outlet 44 199 15 0;
#P connect 5 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 5 0;
#P connect 6 0 7 0;
#P connect 5 1 6 0;
#P connect 7 0 3 1;
#P connect 5 2 4 0;
#P connect 4 2 7 1;
#P pop;
#P newobj 144 168 85 196617 p generate-name;
#P comment 128 75 108 196617 one measure of tempo;
#P newex 96 74 29 196617 * 4.;
#P newex 233 326 42 196617 r drive;
#P newex 235 297 59 196617 print READ;
#P newex 166 296 68 196617 prepend read;
#P newex 165 326 63 196617 jit.qt.movie;
#P newex 167 275 51 196617 zl slice 1;
#P newex 165 254 62 196617 route write;
#P newex 98 51 55 196617 !/ 60000.;
#P newex 51 135 55 196617 pipe 5000;
#P inlet 51 67 15 0;
#P inlet 98 31 15 0;
#N comlet movie out;
#P outlet 165 348 15 0;
#P connect 2 0 15 0;
#P connect 15 0 3 0;
#P connect 3 0 14 0;
#P connect 14 0 16 0;
#P fasten 13 0 16 0 149 238 56 238;
#P connect 4 0 11 0;
#P connect 11 0 3 1;
#P connect 1 0 4 0;
#P fasten 15 1 13 0 77 122 149 122;
#P connect 17 0 5 0;
#P connect 8 0 7 0;
#P connect 10 0 7 0;
#P connect 7 0 0 0;
#P connect 6 0 8 0;
#P connect 5 0 6 0;
#P connect 8 0 9 0;
#P pop;
#P newobj 280 338 96 196617 p record-then-play;
#P newex 100 162 42 196617 s drive;
#P button 280 274 34 0;
#P newex 267 95 72 196617 loadmess 120;
#P user jit.pwindow 279 383 82 62 0 1 0 0 1 0;
#P flonum 267 124 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.pwindow 147 233 82 62 0 1 0 0 1 0;
#P message 244 162 33 196617 close;
#P newex 209 140 41 196617 sel 1 0;
#P message 210 162 30 196617 open;
#P toggle 167 93 27 0;
#P newex 147 162 52 196617 metro 33;
#P newex 147 193 56 196617 jit.qt.grab;
#P comment 304 124 100 196617 BPM;
#P connect 2 0 12 0;
#P hidden connect 17 0 18 0;
#P hidden connect 18 0 16 0;
#P connect 3 0 2 0;
#P fasten 32 0 1 0 528 362 84 362 84 184 152 184;
#P fasten 28 0 1 0 422 360 97 360 97 184 152 184;
#P fasten 13 0 1 0 285 361 118 361 118 184 152 184;
#P fasten 22 0 1 0 79 192 152 192;
#P fasten 21 0 1 0 270 87 152 87;
#P connect 2 0 1 0;
#P connect 6 0 1 0;
#P connect 4 0 1 0;
#P connect 1 0 7 0;
#P connect 3 0 5 0;
#P connect 5 0 4 0;
#P connect 5 1 6 0;
#P connect 23 0 21 0;
#P connect 10 0 8 0;
#P connect 11 0 13 0;
#P connect 13 1 9 0;
#P connect 11 0 25 0;
#P fasten 8 0 13 1 272 146 328 146;
#P connect 25 0 24 0;
#P connect 29 0 24 0;
#P connect 33 0 24 0;
#P connect 24 0 13 2;
#P fasten 1 1 24 1 198 221 408 221;
#P connect 27 0 28 0;
#P connect 28 1 26 0;
#P connect 27 0 29 0;
#P fasten 8 0 28 1 272 150 465 150;
#P fasten 24 1 28 2 389 338 508 338;
#P connect 31 0 32 0;
#P connect 32 1 34 0;
#P connect 31 0 33 0;
#P fasten 8 0 32 1 272 155 571 155;
#P fasten 24 2 32 2 407 331 614 331;
#P window clipboard copycount 35;


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