pausing beween clips

Jan 24, 2007 at 3:44am

pausing beween clips

I am a jitter newbie who has cobbled together this simple patch that should play random clips from a folder. There are 2 problems I am having:

1. There is a pause that occurs at the end of each clip before the next clip plays.

2. The clips look very pixilated in jitter, but in Quicktime, they look fine.

I think that the second issue has to do with my window setting. My clips are 720 x 480 and have been exported from QT using H.264. The largest one is 13MB. Would it be best to preload the next clip to avoid the pause? If so, what would be the best way to do this? I am running this on a 12″ PowerBook with 1.5 GHz processor and 1.25G of RAM. Thanks!

max v2;
#N vpatcher 116 44 746 584;
#P origin 0 -19;
#P window setfont “Sans Serif” 9.;
#P message 172 56 51 196617 seed 777;
#P button 132 112 15 0;
#P newex 477 353 43 196617 zl nth 2;
#P newex 477 373 31 196617 sel 1;
#P message 477 394 124 196617 gettimescale , getduration;
#P newex 517 331 77 196617 print loopnotify;
#P newex 357 387 44 196617 onebang;
#P newex 357 367 31 196617 sel 1;
#P message 135 403 70 196617 bang , gettime;
#P newex 135 430 129 196617 jit.qt.movie @loopreport 1;
#P newex 397 327 50 196617 -;
#P newex 357 306 213 196617 route time duration timescale read loopnotify;
#P newex 357 347 50 196617 >=;
#P newex 135 459 163 196617 jit.window quarry @size 720 480;
#P hidden newex 590 559 106 196617 bgcolor 190 190 180;
#P comment 123 190 49 196617 clip menu;
#P comment 30 111 87 196617 drop movie folder;
#P user ezdac~ 50 398 94 431 0;
#P toggle 50 278 37 0;
#P newex 60 373 57 196617 qmetro 40;
#P newex 126 373 68 196617 prepend read;
#P newex 132 156 43 196617 random;
#P newex 112 208 74 196617 route populate;
#P user ubumenu 22 188 100 196617 0 1 1 0;
#X add clip1.mov;
#X add clip2.mov;
#X add clip3.mov;
#X add clip4.mov;
#X add clip5.mov;
#X add clip6.mov;
#X add clip7.mov;
#X add clip8.mov;
#X add clip9.mov;
#X prefix_set 0 1 “Macintosh HD:/Users/kuh/Desktop/project/clips/” 0;
#P newex 22 158 76 196617 prepend prefix;
#P user panel 22 31 103 123;
#X brgb 143 82 232;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user dropfile 22 31 125 154 0;
#P comment 24 258 88 196617 Click here to start;
#P user panel 21 251 100 80;
#X brgb 228 0 248;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 2 0 4 0;
#P fasten 10 0 5 0 55 345 8 345 8 229 8 182 27 182;
#P fasten 7 0 5 0 137 179 27 179;
#P connect 4 0 5 0;
#P fasten 10 0 11 0 55 354 55 354;
#P fasten 10 0 9 0 55 358 65 358;
#P connect 5 2 6 0;
#P fasten 5 1 8 0 72 236 131 236;
#P fasten 22 0 27 0 362 431 292 431 292 108 137 108;
#P fasten 28 0 7 0 177 131 137 131;
#P connect 27 0 7 0;
#P fasten 9 0 20 0 65 394 140 394;
#P connect 20 0 19 0;
#P fasten 8 0 19 0 131 426 140 426;
#P fasten 24 0 19 0 482 423 140 423;
#P connect 19 0 15 0;
#P fasten 6 0 7 1 117 232 191 232 191 149 170 149;
#P fasten 19 1 17 0 259 453 348 453 348 298 362 298;
#P connect 17 0 16 0;
#P connect 16 0 21 0;
#P connect 21 0 22 0;
#P fasten 17 4 22 1 460 323 460 379 396 379;
#P connect 17 1 18 0;
#P connect 18 0 16 1;
#P connect 17 2 18 1;
#P connect 17 3 26 0;
#P connect 26 0 25 0;
#P connect 25 0 24 0;
#P connect 17 4 23 0;
#P pop;

#29901
Jan 24, 2007 at 8:00am

The appendix “QuickTime Confidential” in the Jitter
Tutorial provides a good source for questions about
best formats, etc. The short answer is that you’ll
do well with Photo-JPEG for a balance of the usual
things.

One solutin that comes to mind would be to use
the poly~ object to load, play, and reload a
number of films, and simply route the control
messages [i.e. the metronome stuff and anything
else you may wish to do or set up] to to the
various poly~ instantiations.

You’ll find an example of poly~ used with movies
in the jitter-examples/video/quicktime/PolyMovie
folder.

#94354
Jan 24, 2007 at 8:02am

Oh, and I forgot to mention that the tutorial
stuff on the poly~ object is part of the MSP
tutorial. While the examples there are about
audio stuff, you should be able to get a
handle on how to creat multiple instantiations,
how to send specific messages to a particular
instantiation, and how to use the mute message
to turn CPU on and off, etc. That stuff all
works just fine with movies inside your little
polything.

#94355
Jan 25, 2007 at 2:19am

Thanks so much for the info. I will try out poly~. I was using the photo jpg codec, but I thought that the larger files might have been the culprit so I switched to H.264. Thank you again!

#94356
Jul 12, 2007 at 10:15pm

I tried the photo jpg codec, but with no luck. The pause occurs after the bang to choose a new clip and before the new clip starts playing. This is a really simple patch and my clips are all under 20MB. I looked at the poly~ tutorial but am a bit confused on how to apply it. Would it be better to have the patch choose the next clip before the first clip ends? Should I use jit.gl.slab to do this? Any thoughts would be of great help.

max v2;
#N vpatcher 162 47 783 557;
#P origin 0 -3;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 450 357 32 196617 print;
#P message 246 60 70 196617 size 320 240;
#P user jit.pwindow 245 94 322 242 0 1 0 0 1 0;
#P message 166 328 29 196617 stop;
#P newex 49 430 129 196617 jit.matrix 4 char 320 240;
#P message 146 109 51 196617 seed 777;
#P button 132 69 15 0;
#P newex 352 404 43 196617 zl nth 2;
#P newex 352 424 31 196617 sel 1;
#P message 352 445 124 196617 gettimescale , getduration;
#P newex 392 382 77 196617 print loopnotify;
#P newex 232 418 31 196617 sel 1;
#P message 50 375 129 196617 bang , gettime , getduration;
#P newex 50 402 129 196617 jit.qt.movie @loopreport 1;
#P newex 272 378 50 196617 -;
#P newex 232 357 213 196617 route time duration timescale read loopnotify;
#P newex 232 398 50 196617 >=;
#P comment 576 12 120 196617 andrewb@cycling74.com;
#P comment 123 174 49 196617 clip menu;
#P comment 30 95 87 196617 drop movie folder;
#P toggle 50 280 37 0;
#P newex 50 346 57 196617 qmetro 40;
#P newex 25 214 68 196617 prepend read;
#P newex 132 140 43 196617 random;
#P newex 112 199 74 196617 route populate;
#P user ubumenu 22 172 100 196617 0 1 1 0;
#X add clip1.mov;
#X add clip2.mov;
#X add clip3.mov;
#X add clip4.mov;
#X add clip5.mov;
#X add clip6.mov;
#X add clip7.mov;
#X add clip8.mov;
#X add clip9.mov;
#X prefix_set 0 1 “Macintosh HD:/Users/kuh/Desktop/clips/” 0;
#P newex 22 142 76 196617 prepend prefix;
#P user panel 22 15 103 123;
#X brgb 95 228 52;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user dropfile 22 15 125 138 0;
#P comment 24 260 88 196617 Click here to start;
#P user panel 21 253 100 80;
#X brgb 228 0 248;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P hidden newex 461 68 106 196617 bgcolor 190 190 180;
#P connect 3 0 5 0;
#P connect 11 0 6 0;
#P fasten 8 0 6 0 137 165 27 165;
#P connect 5 0 6 0;
#P fasten 6 1 9 0 72 193 30 193;
#P connect 18 0 27 0;
#P fasten 11 0 10 0 55 342 55 342;
#P fasten 10 0 19 0 55 367 55 367;
#P fasten 28 0 18 0 171 395 55 395;
#P connect 19 0 18 0;
#P fasten 9 0 18 0 30 401 55 401;
#P fasten 22 0 18 0 357 462 329 462 329 369 55 369;
#P connect 6 2 7 0;
#P fasten 20 0 25 0 237 441 223 441 223 53 137 53;
#P connect 25 0 8 0;
#P fasten 26 0 8 0 151 117 151 117 151 131 137 131;
#P fasten 7 0 8 1 117 225 191 225 191 133 170 133;
#P fasten 18 1 16 0 174 425 204 425 204 348 237 348;
#P connect 16 0 15 0;
#P connect 15 0 20 0;
#P connect 30 0 29 0;
#P fasten 27 0 29 0 54 471 584 471 584 50 233 50 233 82 251 82;
#P connect 16 1 17 0;
#P connect 17 0 15 1;
#P connect 16 2 17 1;
#P connect 16 3 24 0;
#P connect 24 0 23 0;
#P connect 23 0 22 0;
#P connect 16 4 21 0;
#P connect 18 1 31 0;
#P pop;

#94357
Jul 13, 2007 at 3:50pm

This is unusual, if using the right codec + qt settings. Tried to run the patch anyway and indeed it runs smoothly, seamless switching between the clips. So I’m guessing your problem lies either in the codec settings (try the default 15fps high quality 320X240 px photo jpeg), or something with you machines memory / graphics card, or your quicktime installation…
A good test can be to use the clips included with max in the patches/media folder. Also try running just one clip on quicktime player (not in max) in loop mode, see if it does something similar when loading or looping.
hope it helps
-nadav

#94358
Jul 13, 2007 at 4:02pm

Without checking your patch i guess a solution could be to use the edit commands (jit.qt.movie help file -> editing subpatcher) to put all files in one qt movie before playing it. This will not take a lot of overhead since the editing commands only create reference files and do not swap actual data around.

hth,
Mattijs

#94359
Jul 13, 2007 at 5:54pm

you may also, for the sake of testing, take a look at the jsmoviebank-example.pat in jitter-examples/video/.
As for engaging with this patch beyond testing, this is a great take on doing essentially what poly~ does (that is, create multiple instances of jit.qt.movie, each with a movie preloaded), but a bit neater. Depending on your mindframe, you may find this more straightforward.
If you aren’t already, you may also want to think about using absolute paths (ie, Harddrive:/folder/folder/file.mov) rather than relative paths.

#94360
Jul 19, 2007 at 4:54am

You were right and thanks for all the great suggestions. It was the size and framerate of my clips. I am running the patch on a 12″ PowerBook G4 with a 1.5GHz processor and 1.25GB RAM, but it can only play clips that are 640 x 480, 15fps, with no sound. Quicktime can loop the clips seamlessly, however. The pause only occurs in Jitter.

I also tried exporting a 720 x 480 version and it worked fine when played in Quicktime. The only other thing is that the patch seems to trim the clips slightly.

#94361

You must be logged in to reply to this topic.