getduration

jit.gt.movie loopstart

This example lets you loop a movie, and jump to the beginning of the loop point by defining with a ‘looppoints’ attribute, and using ‘getloopstart’ to retrieve the loop’s starting time to be set to the time attribute for the jit.qt.movie object.

Detect end of video in imovie

The imovie object displays a video within a single UI object in a Max patch. To detect when the movie has ended, use the getduration message to determine the movie's duration, then use the gettime message to monitor the current time of the video as it plays. In this example, we use the grab object to get the duration once and store it in other objects (select and >=).