Realtime video looper help

Dec 8, 2006 at 12:41pm

Realtime video looper help

Hi
I am trying to create a live video looper and am wondering what is the best way to go about it?

I have created a patch that allows me to record short clips of video via a webcam using jit.qt.grab.
I save the file with jit.record, using a sprintf to create a unique file name, which bangs
Jit.qt.movie to access the file via a ubumenu, and loop it.

I then want to record more clips and build a simple looping montage (no effects) in realtime.
Has anyone done anything similar or could at least point me in the right direction of which objects.

I can post the patch, but it is currently in a very confused state.

Best

David

#29106
Dec 8, 2006 at 4:53pm

open the jit.qt.movie help patch, look at the editing subpatch. i
believe that’s what you’re looking for – copy to clipboard, cut,
paste, etc.

cheers
evan

On Dec 8, 2006, at 12:41 PM, David Atkinson wrote:

>
> Hi
> I am trying to create a live video looper and am wondering what is
> the best way to go about it?
>
> I have created a patch that allows me to record short clips of
> video via a webcam using jit.qt.grab.
> I save the file with jit.record, using a sprintf to create a unique
> file name, which bangs
> Jit.qt.movie to access the file via a ubumenu, and loop it.
>
> I then want to record more clips and build a simple looping
> montage (no effects) in realtime.
> Has anyone done anything similar or could at least point me in the
> right direction of which objects.
>
> I can post the patch, but it is currently in a very confused state.
>
> Best
>
> David
>

#90154
Dec 10, 2006 at 11:49pm

Hi Evan
Thanks for your reply. The editing in jit.qt.movie is just what I need.

I have just spent the last couple of days trying to get my basic patch into a reasonable state to get some feedback on it.
There are a few places where I need some advice!

1) As I will be grabbing lots of short movie files via a webcam, to be immediately used as live loops. I wondered what the best way to save these files would be? Either writing the files with unique filenames using jit.record (which I’ve attempted in the patch below)or maybe using ‘copy’ in jit.qt.movie and then just adding to a newmovie?

2) How do I get the newly recorded file to be automatically detected in my chosen media folder? Or rather, how do I get the folder contents to automatically refreshed? Is it something to do with prefix?

3) I have attempted to create a means for me to easily send different ‘edit’ (insert/paste/trim etc) messages to the jit.qt.movie. is there a simpler way of doing this?

Any help would be appreciated as I am a relative newbie working working in Jitter isolation.
Please find the patch below.

Best

David

max v2;
#N vpatcher 20 50 1258 845;
#P window setfont Monaco 12.;
#P window linecount 1;
#P newex 705 624 199 262156 send another jit.qtmovie…;
#P window linecount 3;
#P comment 331 448 100 262156 and make it refresh contents…;
#P window linecount 2;
#P comment 300 90 100 262156 This still needs work…;
#P window setfont “Sans Serif” 18.;
#P comment 506 37 120 196626 4) Open file from folder;
#P window linecount 1;
#P comment 714 594 372 196626 6) Create message for jit.qtmovie editing;
#P window linecount 4;
#P comment 1055 310 153 196626 5) Set in and out points to for file to be added to montage;
#P window linecount 3;
#P comment 333 366 100 196626 3) Add new file to a folder;
#P window linecount 2;
#P comment 281 37 142 196626 2) Write unique filename…;
#P window setfont Monaco 9.;
#P window linecount 1;
#P newex 513 116 58 262153 r record;
#P button 228 65 15 0;
#P window setfont “Sans Serif” 9.;
#P comment 244 65 34 196617 reset;
#P button 178 64 15 0;
#P number 196 108 99 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter 0 999;
#X flags 0 0;
#P newobj 196 85 74 196617 counter 0 999;
#P newex 178 155 62 196617 prepend set;
#P message 178 176 50 196617 write 2;
#P newex 178 131 100 196617 sprintf write %s%s;
#P message 246 176 29 196617 stop;
#P message 34 98 30 196617 open;
#P user jit.pwindow 9 194 82 62 0 1 0 0 1 0;
#P toggle 10 100 15 0;
#P newex 10 119 46 196617 metro 2;
#P newex 106 237 108 196617 jit.qt.record 320 240;
#P newex 10 143 56 196617 jit.qt.grab;
#P window setfont Monaco 9.;
#P newex 112 533 66 262153 s record;
#P comment 1048 490 58 262153 out;
#P comment 978 490 52 262153 in;
#P comment 912 491 38 262153 trk#;
#P comment 847 491 58 262153 loop out;
#P number 1050 503 61 9 0 0 0 4 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 981 503 61 9 0 0 0 4 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 912 503 21 9 0 0 0 4 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 843 503 67 9 0 0 0 4 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 774 503 67 9 0 0 0 4 0 0 0 221 221 221 222 222 222 0 0 0;
#P user ubumenu 679 503 62 262153 0 1 1 0;
#X add paste;
#X add insert;
#X add trim;
#X add cut;
#X add tighten;
#X add copy;
#X prefix_set 0 0 0;
#P newex 705 528 357 262153 sprintf %s %ld %ld track %ld %ld %ld;
#P window setfont Monaco 14.;
#P message 705 570 334 262158 insert 378 749 track 0 0 0;
#P window setfont Monaco 9.;
#P newex 705 548 87 262153 prepend set;
#P comment 779 491 52 262153 loop in;
#P window setfont “Fixedwidth Serif” 10.;
#P message 525 202 50 1441802 gettime;
#P newex 718 317 38 1441802 sel 1;
#P window setfont Times 10.;
#P comment 680 224 321 1310730 Gets the timing , rate , and volume information of the movie clip when it loads;
#P comment 909 160 91 1310730 Reset the looppoints;
#P window linecount 2;
#P comment 839 168 62 1310730 Change the playback rate;
#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P newex 980 427 32 1441802 pack;
#P message 908 177 158 1441802 looppoints , getlooppoints;
#P message 980 449 103 1441802 looppoints $1 $2;
#P message 894 378 50 1441802 size $1;
#P user rslider 866 404 188 18 6000 1 0 12 0;
#P flonum 785 160 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 785 178 50 1441802 rate $1;
#P window setfont Times 10.;
#P comment 872 297 108 1310730 Movie timescale and fps.;
#P window setfont “Fixedwidth Serif” 10.;
#P message 704 404 43 1441802 set $1;
#P flonum 836 296 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 792 296 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont Times 10.;
#P comment 643 353 59 1310730 Current time;
#P comment 638 422 63 1310730 Current frame;
#P window setfont “Fixedwidth Serif” 10.;
#P number 704 422 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 704 384 27 1441802 /;
#P number 704 352 51 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont Times 10.;
#P comment 751 404 58 1310730 Total frames;
#P comment 759 353 50 1310730 Total time;
#P window linecount 2;
#P comment 890 331 91 1310730 Timescale/Fps=time values/frame;
#P window setfont “Fixedwidth Serif” 10.;
#P number 814 398 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 814 377 27 1441802 /;
#P number 814 353 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 856 353 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 856 330 32 1441802 / 1.;
#P newex 660 294 68 1441802 unpack s 0;
#P newex 660 261 369 1441802 route read time duration timescale fps rate vol looppoints;
#P message 660 206 308 1441802 getfps , gettimescale , getduration , getrate , getvol;
#P message 704 445 53 1441802 frame $1;
#P message 730 179 38 1441802 start;
#P message 697 179 32 1441802 stop;
#P user jit.pwindow 512 263 82 62 1 1 0 0 1 0;
#P window setfont Times 10.;
#P comment 528 147 26 1310730 Play;
#P window setfont “Fixedwidth Serif” 10.;
#P message 627 124 43 1441802 time 0;
#P message 610 124 14 1441802 1;
#P button 610 102 15 0;
#P newex 513 164 55 1441802 metro 40;
#P toggle 513 146 15 0;
#P newex 513 237 130 1441802 jit.qt.movie 320 240;
#B color 5;
#P window setfont Times 10.;
#P comment 625 102 44 1310730 Restart;
#P window setfont Monaco 9.;
#P window linecount 2;
#P message 112 503 359 262153 read “Macintosh HD:/Applications/MaxMSP 4.5/Max Documentation/Jitter Documentation/media/countdown15.mov”;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 112 466 30 196617 t s b;
#P number 221 369 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 221 386 49 196617 depth $1;
#P number 221 458 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 221 438 74 196617 route populate;
#P newex 144 385 76 196617 prepend prefix;
#P button 21 423 15 0;
#P newex 112 438 85 196617 prepend set read;
#P newex 21 343 62 196617 prepend set;
#P user dropfile 95 342 365 361 0 fold;
#P newex 144 366 56 196617 route text;
#P user textedit 95 342 365 361 32896 3 9 “Macintosh HD:/Applications/MaxMSP 4.5/Max Documentation/Jitter Documentation/media/”;
#P message 67 386 75 196617 autopopulate 1;
#P user ubumenu 67 412 100 196617 0 1 1 0;
#X add bball.mov;
#X add blading.mov;
#X add chilis.jpg;
#X add colorbars.pict;
#X add colorswatch.pict;
#X add colorwheel.pct;
#X add countdown.mov;
#X add countdown15.mov;
#X add crashtest.mov;
#X add dishes.mov;
#X add dozer.mov;
#X add fuzz_circle.jpg;
#X add garbage.mov;
#X add luv.qfx;
#X add models;
#X add oh.mov;
#X add ozone.mov;
#X add rain.mov;
#X add rca.mov;
#X add redball.mov;
#X add secret.txt;
#X add sunset.jpg;
#X add talk.aiff;
#X add track1.mov;
#X add track2.mov;
#X add traffic.mov;
#X add wheel.mov;
#X prefix_set 0 1 “Macintosh HD:/Applications/MaxMSP 4.5/Max Documentation/Jitter Documentation/media/” 0;
#P window setfont Monaco 9.;
#P window linecount 2;
#P comment 368 338 100 262153 drop media folder here;
#P window setfont “Sans Serif” 18.;
#P comment 2 36 131 196626 1) Grab movie from webcam;
#P user panel 168 26 258 190;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 1 27 135 238;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 15 332 462 225;
#X brgb 191 191 191;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 598 153 613 317;
#X brgb 0 130 0;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 498 24 192 355;
#X brgb 0 130 0;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 664 481 546 191;
#X brgb 203 178 178;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 85 0 84 0;
#P connect 84 0 82 0;
#P connect 87 0 82 0;
#P connect 82 0 86 0;
#P fasten 12 0 13 0 100 364 83 364 83 339 26 339;
#P connect 13 0 15 0;
#P fasten 19 0 8 0 226 409 72 409;
#P connect 9 0 8 0;
#P fasten 16 0 8 0 149 408 72 408;
#P fasten 13 0 10 0 26 364 83 364 83 339 100 339;
#P fasten 15 0 10 0 26 448 62 448 62 403 100 403;
#P fasten 82 0 83 0 15 164 111 164;
#P connect 90 0 83 0;
#P connect 88 0 83 0;
#P connect 8 1 14 0;
#P connect 14 0 21 0;
#P connect 21 0 22 0;
#P connect 22 0 81 0;
#P fasten 10 0 11 0 100 364 149 364;
#P connect 11 0 16 0;
#P connect 94 0 89 0;
#P connect 89 0 91 0;
#P connect 91 0 90 0;
#P connect 94 0 92 0;
#P connect 92 0 93 0;
#P connect 20 0 19 0;
#P fasten 8 2 17 0 162 435 226 435;
#P connect 17 0 18 0;
#P connect 96 0 92 2;
#P connect 93 0 89 1;
#P fasten 28 0 25 0 615 142 518 142;
#P connect 25 0 26 0;
#P connect 26 0 24 0;
#P connect 66 0 24 0;
#P fasten 59 0 24 0 985 467 1125 467 1125 198 518 198;
#P fasten 60 0 24 0 913 198 518 198;
#P fasten 55 0 24 0 790 198 518 198;
#P fasten 34 0 24 0 709 465 631 465 631 224 518 224;
#P fasten 33 0 24 0 735 198 518 198;
#P fasten 32 0 24 0 702 198 518 198;
#P fasten 29 0 24 0 632 186 518 186;
#P fasten 35 0 24 0 665 222 518 222;
#P connect 97 0 24 0;
#P connect 24 0 31 0;
#P connect 26 0 66 0;
#P connect 27 0 28 0;
#P fasten 27 0 29 0 615 118 632 118;
#P fasten 65 0 35 0 723 339 652 339 652 202 665 202;
#P fasten 24 1 36 0 638 258 665 258;
#P connect 36 0 37 0;
#P fasten 36 1 46 0 709 290 761 290 761 346 709 346;
#P connect 46 0 47 0;
#P connect 47 0 53 0;
#P connect 53 0 48 0;
#P connect 48 0 34 0;
#P connect 71 1 70 0;
#P connect 70 0 68 0;
#P connect 68 0 69 0;
#P connect 69 0 105 0;
#P connect 37 1 65 0;
#P fasten 39 0 47 1 861 375 726 375;
#P fasten 57 0 72 0 871 425 779 425;
#P connect 72 0 70 1;
#P fasten 36 5 56 0 885 292 1070 292 1070 156 790 156;
#P connect 56 0 55 0;
#P connect 36 3 51 0;
#P fasten 36 2 40 0 753 307 770 307 770 340 819 340;
#P connect 40 0 41 0;
#P connect 41 0 42 0;
#P fasten 39 0 41 1 861 375 836 375;
#P connect 36 4 52 0;
#P fasten 57 1 73 0 1049 425 848 425;
#P connect 73 0 70 2;
#P fasten 51 0 38 0 797 320 861 320;
#P connect 38 0 39 0;
#P fasten 58 0 57 0 899 397 871 397;
#P fasten 36 7 57 0 973 322 871 322;
#P fasten 52 0 38 1 841 314 883 314;
#P fasten 40 0 58 0 819 375 899 375;
#P connect 74 0 70 3;
#P connect 57 0 61 0;
#P connect 61 0 59 0;
#P connect 75 0 70 4;
#P fasten 57 1 61 1 1049 425 1007 425;
#P connect 76 0 70 5;
#P pop;

#90155

You must be logged in to reply to this topic.