Callback on video finish

Hello all.

I am trying to stick a bunch of videos from an array (of directories) to a player. I need to understand what is the quick way to have some sort of callback when a video ends in a movie file in. So through that callback I can call the next index without having to establish timers in the python code.

Thanks in advance.

There may be several ways to do this. I would use an Info CHOP to monitor the playback progress, and a CHOP Execute to provide the callback mechanism.

1 Like

and to add to what Jesse suggested, once you attach an Info CHOP to the Movie File In TOP you’ll see a channel: last_frame. Monitor this channel to be notified when your movie ends.

1 Like

Hey! Sorry to revive this topic, but after reaching the same conclusion by myself I have to wonder…
What about frame-perfect “end” to a clip? Because if I add up everything correctly, triggering something on last_frame off-to-on might be premature because the last frame hasn’t been shown for its full duration or at all? I imagine the true end to a clip would be after the last_frame has been on for the duration of a frame.