Detect end of video

Apr 17, 2010 at 6:58am

Detect end of video

can anyone tell me how i could get maxx to tell me when a clip has started and where it ends? I’d like to have one video end then send a bang that starts another one, starting a chain reaction that follows that trend.

#49821
Apr 17, 2010 at 8:16am

Send a ‘getduration’ message to jit.qt.movie to get the movie’s duration (in timescale units) out the right outlet. Then send regular ‘gettime’ messages to jit.qt.movie to get the current time (in timescale units), and compare it to the duration with a >= object. Something like this:

– Pasted Max Patch, click to expand. –

–Chris

#178919
Apr 17, 2010 at 5:10pm

Hey. not really sure how to implement this with my patch. Think you could take a look and see what i’m missing?

– Pasted Max Patch, click to expand. –
#178920
Apr 17, 2010 at 6:23pm

Sorry, I don’t really have time to help you debug, etc., but here are a couple of quick suggestions. 1) You need to use the right outlet of unpack (from the read message) not the left outlet. 2) You need to store the duration value (for example in the right inlet of a >= object, and then you need to compare each time report to that value to see if it has equalled or surpassed the known duration of the movie. When that test comes out true (1), you will use a select 1 object to detect that, and that can trigger the next thing to happen, such as choosing a new movie to read in.

#178921

You must be logged in to reply to this topic.