Forums > Jitter

Jitter webcam record video database and playing it


JO
December 30, 2006 | 11:00 pm

I have done that patcher that records numbered quicktime video in a folder and that reads the 9 last that have been recorded.

The recording is driven by webcam motion sensor. I have a fiew problem with the playing of those clips :

They lags a lot or just stick on a frame.

I am looking to my cpu working line and it’s not heaven used at 30 %, on a macbookpro core 2 duo 2.33 2go ram.

Can somebody help me fixed that patch, It’s my firt one on jitter, and I am stuck here.

max v2;
#N vpatcher 15 53 935 932;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 570 300 41 196617 s start;
#P number 689 509 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Lucida Grande" 9.;
#N counter 0 1000;
#X flags 0 0;
#P newobj 686 450 81 67108873 counter 0 1000;
#B color 5;
#P window setfont "Sans Serif" 9.;
#N vpatcher 938 53 1690 999;
#P origin 0 -2;
#P toggle 600 57 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 605 81 52 196617 metro 20;
#P toggle 549 74 15 0;
#P newex 90 31 41 196617 r start;
#P toggle 8 21 15 0;
#P newex 13 45 52 196617 metro 20;
#P toggle 190 57 15 0;
#P newex 195 81 52 196617 metro 20;
#P user jit.pwindow 180 234 162 122 0 0 0 0 1 0;
#P user jit.pwindow 551 799 162 122 0 0 0 0 1 0;
#P user jit.pwindow 368 799 162 122 0 0 0 0 1 0;
#P user jit.pwindow 180 800 162 122 0 0 0 0 1 0;
#P user jit.pwindow 551 516 162 122 0 0 0 0 1 0;
#P user jit.pwindow 368 516 162 122 0 0 0 0 1 0;
#P user jit.pwindow 180 517 162 122 0 0 0 0 1 0;
#P user jit.pwindow 551 233 162 122 0 0 0 0 1 0;
#P user jit.pwindow 368 233 162 122 0 0 0 0 1 0;
#P newex 569 686 27 196617 – 9;
#P newex 386 691 27 196617 – 8;
#P newex 198 690 27 196617 – 7;
#P button 606 702 16 0;
#P window setfont "Lucida Grande" 9.;
#P number 569 727 35 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 607 748 106 196617 read 10clip.mov 30;
#P message 607 726 115 196617 set read $1clip.mov 30;
#P message 683 778 27 196617 stop;
#P newex 552 748 46 196617 metro 5;
#P newex 552 776 105 196617 jit.qt.movie 160 120;
#P button 423 702 16 0;
#P window setfont "Lucida Grande" 9.;
#P number 386 727 35 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 424 748 106 196617 read 11clip.mov 30;
#P message 424 726 115 196617 set read $1clip.mov 30;
#P message 500 778 27 196617 stop;
#P newex 369 748 46 196617 metro 5;
#P newex 369 776 105 196617 jit.qt.movie 160 120;
#P button 235 703 16 0;
#P window setfont "Lucida Grande" 9.;
#P number 198 728 35 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 236 749 106 196617 read 12clip.mov 30;
#P message 236 727 115 196617 set read $1clip.mov 30;
#P message 312 779 27 196617 stop;
#P newex 181 749 46 196617 metro 5;
#P newex 181 777 105 196617 jit.qt.movie 160 120;
#P newex 569 403 27 196617 – 6;
#P newex 386 408 27 196617 – 5;
#P newex 198 407 27 196617 – 4;
#P button 606 419 16 0;
#P window setfont "Lucida Grande" 9.;
#P number 569 444 35 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 607 465 106 196617 read 13clip.mov 30;
#P message 607 443 115 196617 set read $1clip.mov 30;
#P message 683 495 27 196617 stop;
#P newex 552 465 46 196617 metro 5;
#P newex 552 493 105 196617 jit.qt.movie 160 120;
#P button 423 419 16 0;
#P window setfont "Lucida Grande" 9.;
#P number 386 444 35 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 424 465 106 196617 read 14clip.mov 30;
#P message 424 443 115 196617 set read $1clip.mov 30;
#P message 500 495 27 196617 stop;
#P newex 369 465 46 196617 metro 5;
#P newex 369 493 105 196617 jit.qt.movie 160 120;
#P button 235 420 16 0;
#P window setfont "Lucida Grande" 9.;
#P number 198 445 35 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 236 466 106 196617 read 15clip.mov 30;
#P message 236 444 115 196617 set read $1clip.mov 30;
#P message 312 496 27 196617 stop;
#P newex 181 466 46 196617 metro 5;
#P newex 181 494 105 196617 jit.qt.movie 160 120;
#P button 28 62 15 0;
#P inlet 64 66 15 0;
#P number 64 100 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 569 120 27 196617 – 3;
#P newex 386 125 27 196617 – 2;
#P newex 198 124 27 196617 – 1;
#P button 606 136 16 0;
#P window setfont "Lucida Grande" 9.;
#P number 569 161 35 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 607 182 106 196617 read 16clip.mov 30;
#P message 607 160 115 196617 set read $1clip.mov 30;
#P message 683 212 27 196617 stop;
#P newex 552 182 46 196617 metro 5;
#P newex 552 210 105 196617 jit.qt.movie 160 120;
#P button 423 136 16 0;
#P window setfont "Lucida Grande" 9.;
#P number 386 161 35 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 424 182 106 196617 read 17clip.mov 30;
#P message 424 160 115 196617 set read $1clip.mov 30;
#P message 500 212 27 196617 stop;
#P newex 369 182 46 196617 metro 5;
#P newex 369 210 105 196617 jit.qt.movie 160 120;
#P button 235 137 16 0;
#P window setfont "Lucida Grande" 9.;
#P number 198 162 35 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 9.;
#P message 236 183 106 196617 read 18clip.mov 30;
#P message 236 161 115 196617 set read $1clip.mov 30;
#P message 312 213 27 196617 stop;
#P toggle 155 57 15 0;
#P newex 181 183 46 196617 metro 5;
#P newex 181 211 105 196617 jit.qt.movie 160 120;
#P connect 88 0 87 0;
#P connect 87 0 27 0;
#P connect 26 0 25 0;
#P connect 27 0 25 0;
#P connect 89 0 2 0;
#P connect 2 0 1 0;
#P fasten 5 0 0 0 241 204 186 204;
#P connect 1 0 0 0;
#P fasten 3 0 0 0 317 204 186 204;
#P connect 0 0 84 0;
#P connect 2 0 29 0;
#P fasten 30 0 28 0 317 487 186 487;
#P connect 29 0 28 0;
#P fasten 32 0 28 0 241 487 186 487;
#P connect 28 0 78 0;
#P connect 2 0 53 0;
#P fasten 56 0 52 0 241 770 186 770;
#P connect 53 0 52 0;
#P fasten 54 0 52 0 317 770 186 770;
#P connect 52 0 81 0;
#P connect 89 0 86 0;
#P connect 86 0 85 0;
#P connect 25 0 22 0;
#P fasten 7 0 6 0 203 153;
#P connect 22 0 6 0;
#P connect 25 0 49 0;
#P fasten 34 0 33 0 203 436;
#P connect 49 0 33 0;
#P connect 25 0 73 0;
#P fasten 58 0 57 0 203 719;
#P connect 73 0 57 0;
#P connect 85 0 7 0;
#P connect 85 0 34 0;
#P connect 85 0 58 0;
#P connect 6 0 4 0;
#P connect 4 0 5 0;
#P connect 7 0 5 0;
#P connect 33 0 31 0;
#P connect 31 0 32 0;
#P connect 34 0 32 0;
#P connect 57 0 55 0;
#P connect 55 0 56 0;
#P connect 58 0 56 0;
#P connect 2 0 9 0;
#P fasten 10 0 8 0 505 203 374 203;
#P connect 9 0 8 0;
#P fasten 12 0 8 0 429 203 374 203;
#P connect 8 0 76 0;
#P connect 2 0 36 0;
#P fasten 39 0 35 0 429 486 374 486;
#P connect 36 0 35 0;
#P fasten 37 0 35 0 505 486 374 486;
#P connect 35 0 79 0;
#P connect 2 0 60 0;
#P fasten 61 0 59 0 505 769 374 769;
#P connect 60 0 59 0;
#P fasten 63 0 59 0 429 769 374 769;
#P connect 59 0 82 0;
#P connect 25 0 23 0;
#P fasten 14 0 13 0 391 152;
#P connect 23 0 13 0;
#P connect 25 0 50 0;
#P fasten 41 0 40 0 391 435;
#P connect 50 0 40 0;
#P connect 25 0 74 0;
#P fasten 65 0 64 0 391 718;
#P connect 74 0 64 0;
#P fasten 85 0 14 0 428 135;
#P connect 85 0 41 0;
#P connect 85 0 65 0;
#P connect 13 0 11 0;
#P connect 11 0 12 0;
#P connect 14 0 12 0;
#P connect 40 0 38 0;
#P connect 38 0 39 0;
#P connect 41 0 39 0;
#P connect 64 0 62 0;
#P connect 65 0 63 0;
#P connect 62 0 63 0;
#P connect 2 0 16 0;
#P connect 90 0 16 0;
#P fasten 19 0 15 0 612 203 557 203;
#P connect 16 0 15 0;
#P fasten 17 0 15 0 688 203 557 203;
#P connect 15 0 77 0;
#P connect 2 0 43 0;
#P fasten 44 0 42 0 688 486 557 486;
#P connect 43 0 42 0;
#P fasten 46 0 42 0 612 486 557 486;
#P connect 42 0 80 0;
#P connect 2 0 67 0;
#P fasten 70 0 66 0 612 769 557 769;
#P connect 67 0 66 0;
#P fasten 68 0 66 0 688 769 557 769;
#P connect 66 0 83 0;
#P connect 25 0 24 0;
#P fasten 21 0 20 0 574 152;
#P connect 24 0 20 0;
#P connect 25 0 51 0;
#P fasten 48 0 47 0 574 435;
#P connect 51 0 47 0;
#P connect 25 0 75 0;
#P fasten 72 0 71 0 574 718;
#P connect 75 0 71 0;
#P connect 92 0 91 0;
#P connect 85 0 21 0;
#P connect 91 0 21 0;
#P connect 85 0 48 0;
#P connect 85 0 72 0;
#P connect 20 0 18 0;
#P connect 18 0 19 0;
#P connect 21 0 19 0;
#P connect 47 0 45 0;
#P connect 45 0 46 0;
#P connect 48 0 46 0;
#P connect 71 0 69 0;
#P connect 72 0 70 0;
#P connect 69 0 70 0;
#P pop 1;
#P newobj 711 545 59 196617 p mosaique;
#P window setfont "Lucida Grande" 9.;
#P newex 429 320 66 67108873 jit.rgb2luma;
#P button 442 75 200 0;
#P user jit.pwindow 1015 836 162 122 0 1 0 0 1 0;
#P user jit.pwindow 851 836 162 122 0 1 0 0 1 0;
#P user jit.pwindow 687 836 162 122 0 1 0 0 1 0;
#P user jit.pwindow 1015 712 162 122 0 1 0 0 1 0;
#P user jit.pwindow 1015 588 162 122 0 1 0 0 1 0;
#P user jit.pwindow 851 712 162 122 0 1 0 0 1 0;
#P user jit.pwindow 687 712 162 122 0 1 0 0 1 0;
#P user jit.pwindow 851 588 162 122 0 1 0 0 1 0;
#P user jit.pwindow 687 588 162 122 0 1 0 0 1 0;
#P user jit.pwindow 334 388 162 122 0 1 0 0 1 0;
#P user panel 322 365 184 154;
#X brgb 140 140 140;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 9.;
#P number 268 490 35 9 1 1 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 225 490 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 307 343 69 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 146 315 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 233 163 105 196617 select 1 2 3 4 5 6 7;
#P newex 818 319 49 196617 delay 50;
#P number 835 409 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 841 266 35 9 1 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 841 66 48 0;
#P window linecount 2;
#P comment 776 69 59 196617 Start record;
#P button 721 167 15 0;
#P button 711 246 15 0;
#P button 682 246 15 0;
#P number 806 355 35 9 0 1 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 762 355 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 787 424 15 0;
#P button 762 424 15 0;
#P window linecount 1;
#P newex 762 391 35 196617 select;
#P window setfont "Lucida Grande" 0.;
#P user jit.fpsgui 461 533 60 67108864 0;
#P window setfont "Lucida Grande" 9.;
#P message 284 544 35 67108873 min 1;
#P number 284 564 35 9 1 0 1 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 284 583 180 67108873 set write $1clip.mov 30. raw min 500;
#N counter 0 1000;
#X flags 0 0;
#P newobj 787 455 81 67108873 counter 0 1000;
#B color 5;
#P number 787 484 53 9 0 1000 3 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 284 604 172 67108873 write 20clip.mov 30. raw min 500;
#P message 487 637 27 67108873 stop;
#P newex 395 637 30 67108873 print;
#P newex 275 637 106 67108873 jit.qt.record 160 120;
#B color 5;
#P toggle 762 47 67 0;
#P objectname Strart;
#P window setfont "Sans Serif" 9.;
#P number 682 167 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user gswitch2 682 200 39 32 1 0;
#P button 762 281 15 0;
#P comment 841 51 100 196617 Remettre a 1;
#P user gswitch 248 110 41 32 1 0;
#P button 231 461 15 0;
#P button 253 461 15 0;
#P newex 231 430 55 196617 select 0 1;
#P number 231 399 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 500;
#X flags 0 0;
#P newobj 231 359 66 196617 counter 500;
#P number 375 76 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 336 123 15 0;
#P newex 336 97 49 196617 delay 10;
#P number 338 286 75 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 273 276 15 0;
#P toggle 310 32 15 0;
#P button 310 81 15 0;
#P newex 310 55 64 196617 metro 1000;
#P button 273 333 15 0;
#P newex 273 302 61 196617 delay 7000;
#P button 231 260 15 0;
#P newex 231 224 52 196617 metro 50;
#P toggle 231 200 15 0;
#P window setfont "Lucida Grande" 9.;
#P newex 38 195 66 67108873 jit.rgb2luma;
#P message 23 103 28 67108873 open;
#P newex 23 136 61 67108873 jit.qt.grab;
#B color 5;
#P newex 132 237 53 67108873 jit.3m;
#P comment 166 123 30 67108873 BANG;
#P newex 112 118 39 67108873 t b b b;
#P flonum 153 64 35 9 0.5 0 1 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 112 68 15 0;
#P newex 112 88 51 67108873 qmetro 2;
#P user panel 102 57 102 89;
#X brgb 200 247 201;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#N vpatcher 560 337 797 565;
#P window setfont "Lucida Grande" 9.;
#P comment 126 183 77 67108873 Evaluate Motion;
#B frgb 9 9 9;
#P newex 26 153 106 67108873 jit.op @op > @val 0.3;
#P newex 26 130 178 67108873 jit.slide @slide_up 2 @slide_down 10;
#P flonum 122 76 35 9 0 0 0 1024 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 26 108 106 67108873 jit.op @op > @val 0.2;
#P newex 26 82 89 67108873 jit.op @op absdiff;
#P newex 26 51 90 67108873 t l l;
#P inlet 26 31 15 0;
#P outlet 26 175 15 0;
#P connect 1 0 2 0;
#P connect 2 1 3 0;
#P connect 3 0 4 0;
#P connect 4 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 0 0;
#P connect 2 0 3 1;
#P connect 5 0 4 1;
#P pop;
#P newobj 23 251 86 67108873 p evaluatemotion;
#P user panel 14 246 102 28;
#X brgb 231 183 115;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 743 36 102 89;
#X brgb 200 247 201;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P fasten 76 0 11 0 447 286 509 286 509 26 28 26;
#P connect 11 0 10 0;
#P connect 7 0 10 0;
#P hidden connect 12 0 2 0;
#P connect 10 0 12 0;
#P fasten 76 0 5 0 447 278 518 278 518 26 117 26;
#P connect 5 0 4 0;
#P connect 4 0 7 0;
#P fasten 2 0 9 0 28 277 121 277 121 227 137 227;
#P fasten 12 0 9 0 43 225 137 225;
#P connect 9 1 61 0;
#P connect 6 0 4 1;
#P connect 30 0 63 0;
#P connect 60 0 13 0;
#P connect 60 1 13 0;
#P connect 60 2 13 0;
#P connect 60 3 13 0;
#P connect 60 4 13 0;
#P connect 60 5 13 0;
#P connect 60 6 13 0;
#P connect 60 7 13 0;
#P connect 13 0 14 0;
#P connect 14 0 15 0;
#P connect 15 0 26 0;
#P connect 26 2 27 0;
#P connect 26 0 27 0;
#P connect 27 0 28 0;
#P connect 28 0 30 0;
#P connect 31 0 60 0;
#P fasten 19 0 31 0 315 101 253 101;
#P fasten 24 0 31 0 306 138 306 101 253 101;
#P connect 28 1 29 0;
#P connect 29 0 64 0;
#P connect 15 0 21 0;
#P connect 21 0 16 0;
#P connect 16 0 17 0;
#P connect 17 0 26 3;
#P fasten 10 0 37 0 28 165 6 165 6 698 280 698;
#P fasten 39 0 37 0 492 699 280 699;
#P fasten 40 0 37 0 289 680 280 680;
#P fasten 61 0 31 2 151 336 221 336 221 83 283 83;
#P fasten 41 0 44 0 792 521 716 521 716 420 289 420;
#P connect 45 0 44 0;
#P connect 44 0 43 0;
#P fasten 52 0 40 0 687 397 289 397;
#P connect 43 0 40 0;
#P connect 62 0 26 4;
#P fasten 76 0 20 0 447 271 525 271 525 26 315 26;
#P connect 20 0 18 0;
#P connect 18 0 19 0;
#P connect 22 0 16 1;
#P connect 10 0 66 0;
#P connect 19 0 23 0;
#P connect 23 0 24 0;
#P connect 25 0 23 1;
#P connect 37 1 38 0;
#P connect 66 0 46 0;
#P fasten 53 0 39 0 716 433 492 433;
#P fasten 76 0 81 0 447 288 575 288;
#P fasten 36 0 35 0 687 114;
#P connect 35 0 34 0;
#P connect 34 0 52 0;
#P connect 53 0 79 0;
#P connect 79 0 80 0;
#P fasten 54 0 34 1 726 189 716 189;
#P connect 34 1 53 0;
#P connect 80 0 78 0;
#P fasten 36 0 54 0 726 114;
#P fasten 63 0 36 0 230 520 534 520 534 26 767 26;
#P fasten 64 0 36 0 273 520 545 520 545 26 767 26;
#P connect 36 0 33 0;
#P connect 33 0 50 0;
#P connect 50 0 47 0;
#P connect 47 0 48 0;
#P fasten 51 0 47 1 811 383 792 383;
#P connect 47 1 49 0;
#P connect 49 0 42 0;
#P connect 42 0 41 0;
#P fasten 59 0 51 0 823 348 811 348;
#P fasten 36 0 51 0 767 150 811 150;
#P fasten 33 0 59 0 823 296;
#P connect 47 1 58 0;
#P connect 56 0 57 0;
#P pop;


December 31, 2006 | 10:49 am

You’ve got two metro objects running each qt.movie in the subpatch "mosaic". Try turning one of them off and setting the rest of them to something more realistic, such as 66, which will give you a frame rate closer to that of your webcam. I am rather a neophite in Jitter myself, so I won’t go in depth in this, but if you keep framerates down to a refresh-rate that they need instead of the maximum possible, you’ll save resources for other things. Also, don’t duplicate objects which could be used once (as, unless I’m wrong, the metros for the "mosaic".)
I just had time for a quick scan of what you are up to, and it’s entertaining, keep it up. If I missed the point, forgive me… Are you sure you want to record movies instead of using [matrixset] to make loops? This could eliminate any operating-system interuptions in writing files.



JO
December 31, 2006 | 5:02 pm

Tanks for your feed back.

I am not shure what you you mean about the matrix seat but I will cheak it out.

shears


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