Totally blocked with my patch.

May 14, 2008 at 2:42pm

Totally blocked with my patch.

This patch selects some movie files then play it in random order with randomly generated playback length (loop points).

The problem is it happens sometimes, and very often times,
the loop start point is bigger than loop end value and it makes the whole patch blocked ’cause the the playback time reaches the loop end value, it has to launch another movie file.

I’ve tried all the possible tryouts and I’m totally blocked and now I’m really sure that I CAN NOT SOLVE THIS MYSELF.

I’ve already tried some questions here but it’s difficult to do that ’cause I’m not sure of the source of the problem.

PLEASE HELP ME WITH THIS PATCH.

thank you, I’ll really appreciate.

#37772
Jun 5, 2008 at 6:00am

When you generate your random loop start point, just choose a length (can also be random) and add that to get the end point. This way the end point will always be later than the start, rather than doing a random one for each.

Not sure what happens if the end point is beyond the length of the video… when you load a movie, do a getduration, then set the end loop point number box with “max $1″ to ensure it doesn’t go over (if it’s a problem).

–CJ

#130672
Jun 10, 2008 at 9:24am

Yep, like seejay said, don’t pick em totally random.

First, get the movie length.
Pick a random fragment length shorter than that.
Choose a starting point that will make the fragment end before the end of the movie.

Something like this (sorry, no max5):

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 168 285 72 196617 print endpoint;
#P newex 86 189 43 196617 t b i;
#P newex 98 234 27 196617 +;
#P newex 86 167 27 196617 !- 0;
#P newex 307 95 66 196617 prepend 100;
#P newex 86 285 80 196617 print startpoint;
#P newex 86 212 43 196617 random;
#P newex 242 285 62 196617 print length;
#P newex 86 117 43 196617 t b i;
#P newex 86 140 43 196617 random;
#P message 86 77 75 196617 getframecount;
#P newex 228 95 63 196617 jit.qt.movie;
#P newex 228 49 88 196617 r getMovieLength;
#P newex 86 97 112 196617 grab 1 getMovieLength;
#P comment 227 119 119 196617 temp framecount of 100;
#P connect 6 1 11 1;
#P connect 6 1 5 1;
#P connect 8 0 9 0;
#P connect 8 0 12 0;
#P connect 5 0 11 0;
#P connect 5 0 12 1;
#P connect 5 0 7 0;
#P connect 12 0 14 0;
#P connect 13 0 8 0;
#P connect 13 1 8 1;
#P connect 11 0 13 0;
#P connect 2 0 3 0;
#P connect 2 0 10 0;
#P connect 6 0 5 0;
#P connect 1 0 6 0;
#P connect 4 0 1 0;
#P window clipboard copycount 15;

#130673

You must be logged in to reply to this topic.