Cook Dependecy Loop Detected - video starting at the end of another

Hello everyone :slightly_smiling_face:
I’m new to TouchDesigner, so sorry for any silly questions! :slight_smile: I’m used to developing in other languages, and I’m not sure I’m tackling this problem the right way.

I have two videos: a standby_video and an activated_video.
The standby_video should loop continuously. When the activation trigger is activated (by pressing “1” on the keyboard), the activated_video should start as soon as the standby_video ends. After the activated_video finishes, the standby_video should play again.

The key point is that the last frame of the standby_video matches the first frame of the activated_video, and the last frame of the activated_video matches the first frame of the standby_video. This way, the transitions should be seamless:

  1. The activated_video should start right after the standby_video ends.
  2. The activated_video should reset to the 00:00 position before it plays through.
  3. The activated_video should only be visible for its duration.
  4. The standby_video should appear and restart when the activated_video reaches the end.

To set these conditions, I’m using the Info CHOP to know the duration of the videos and to manage the timing in the trigger, but there are some looping errors, and the patch isn’t working as I would like.

I’ve two starting triggers:

  1. the trigger that is activated when I press “1”, that have the duration of the standby_video
  2. the trigger activated then the standby_video is on the last_frame

When both are true, the third trigger becomes true: it sets “play” and opacity=1 on activated_video, and it has the length of the duration of the activated_video (here I have the problem: cook dependecy loop detected).

I don’t know how to avoid this.

Thank you very much!!

Hi @Marti,

it might be easier to solve this with a Timer CHOP with 2 segments:

  • First segment should cycle endlessly over the standby video
  • Second segment doesn’t cycle

When a key is pressed, you trigger the Exit Segment at End of Cycle parameter which will leave the standby video and proceed to playing the activated video. Also set the On Done parameter of the Timer CHOP to “Re-Start” which will start playing the first segment again and again loop until a key is pressed.

Attached a little example which uses the Media File Info DAT to retrieve frames and fps to calculate the length of each movie and fills a Table DAT using it’s “Fill by Column” feature. Also a custom parameter is used to trigger the exit of the standby movie.

Regarding the dependency loop, you should be able to now upload files - would be interesting to see where the loop happens to better explain it.

Hope this helps
cheers
Markus
base_sequence.tox (2.4 KB)

Hi Snaut!
Thanks for your answer :slight_smile:
I found a solution using “onDone” in the timer node, pulsing the standby_video the activated_video ends.

What do you think? Can be a stable solution?
Thank you :slight_smile:

video_activator.zip (895.5 KB)