Looping a set of media sources - WarmUpTill/SceneSwitcher GitHub Wiki

Single macro setup

If you want to keep the complete setup in a single macro you could use a macro like this:

1744741762296

The "Plugin is running" condition will always be true when the plugin is active. This will ensure that the actions will be performed in a loop.

The first action will (re)start the playback of the first media source.
The next two actions - "Wait" and "Wait for playback to stop ..." - will ensure that the subsequent "Restart" action for the next media source will only be performed once the playback of the first media source has stopped.
(The "Wait 1 second" step might not strictly be necessary, but I would recommend to keep as it might take a short moment for OBS to execute the "Restart") Afterwards the same series of actions is performed for the next media source.

The "Run macro in parallel to other macros" option is checked to ensure other macros are not blocked while this macro is waiting.
The "Perform actions only on condition" change option is not checked as we want this macro to always be executed.

You can import this example macro using this code:

AAAOHHic7Vffb9owEP5XkJ9JRUKhhbeWMQ1p3dhge5mqyiRHsHDsyD8YFeJ/39kJSWi7burD2lVFQpi77+4+f3eOnB3JaKykJsMfOyJoBmRIxlua5RxIm6RK2pwMl5RraJOcWg0zuoFLWNENk4oMO6W1gVGUc+BkaJTF/1KMVlSkNUCvWT7eQvxZzAxVprYbmV/EhkmhJ8tP0ryTog5ydVdSmRFTsWVmvKHcUodtIkYWc2QjKRLmXKMVxOuJMKAQXeHiR0E74jJDY9E5iQZ3Pm1ibnPn2mNZwYxXYQNKez4hWhMZr2dgDBOpdrkUpExjjYrFiuqvVlxaY1xIoRTapk7Ke1bUyVj9kS6g3saKpSuOXzNZVnvRc2VrydQh/xy2SJFgPVI268juaxK3k/u+b4UNvfFRkYJRCarrt6iClqN9chTx3hF6LMQzdjFOt0mCAJpstA78ZAbOGJzG/QGltB/06Fk3OA273WDR7/WCwaJ3nvSjMOn0Hc2jLvjwYqSqgrOcM4OdmErNivnBsc/d+Ie98327XJ91O/vrMsEYuRVJfh/bH9SxPvLQ8A/SrOFWH5+gwojR15XqTZORacphetdc6+nrakgzEKY5ZbHknOYakvuH4nh44qaNXN22uF+2CQi64C6+mL0jNZnrS85tysSNxmY6ublMWezHP7HKn8crmbAlc5O+I4ZlcIO0tVGUieKYaHD70A+ftM6fTta+IQMZRkc+lIjGz61PBgmj5MCEDLtuxxz8v3mxtVqrJ4rgUsJ6CirG/dG0Gd27E+7pzKRFqG/IgUH5nL9y7lbhb4XEZcacMDswfiimQk0MZA8jWbKdN9bFL6J9tDsnz9ObnxS1fFz98G/UPySIntw/x6RSqOl5KWN7/ja2L2Zs/+NHSvTae/P2SHmNj5R/NbZ4Y4HqcqmLWx4TuTXfqWJOXm9zsE3DUL2lYTcOQNRZ42vZRcnAKQtLajlm8mpgtep69MWChbJapSUJ8TXnpBuEUZBGndNBFPVQhV/BlcOC

(You will have to readjust the media source selections after importing the example macro)

Multi macro setup

Alternatively you could use multiple macros like this to achieve a similar effect:

1744742515604

1744742535572

The first macro ensures to restart "Media Source 2" if the playback of "Media Source 1" ended.
And the second macro ensures that "Media Source 1" is restarted if the playback of "Media Source 2" ended.
This closes the loop and the actions will be performed continuously.

This time it is important to check "Perform actions only on condition change" so the media sources are not continuously immediately restarted over and over.

You can import these example macros using this code:

AAAPZXic7VZtb9owEP4ryJ9JRUKSAt9ayjSkdesK25epmoxzBItgR35BdKj/feckhFC6bl2lqZOoVNU533Mvz935uiUrypTUZPBtSwRdARmQ0Yau8gxaAWmTVEmbk4FRFqqPK2ooGWwJk1lGcw0JGcxppvFa8x8IDx4e2rWpW9CGKtO6hoTTpsEKklOrYULXcAkLuuZSkUGnkjZ0FM0yyGqBFMMFFSnswtJLno82wD6JiXO2j8fI/IIZLoUezz9KcyXF3qrzu5DKDLlilpvRmmaWOt2mxtCijdVQioS7q+EC2HIsDCjUrvXYs0pb4ixD49A5C/qPftrE3Ofu6gHdCm4KFtagdBGPj9JEsuUEjOEi1c6WgpRr9FFHsaD61opLa4yDlMSg7MZReSRFnozVH+isweqCp4sMf814Xueip8ruKVM7+1PYGFdcK0hVrAN54ZO4TI7vvpQyvGUHTsqIKqW9/xZV0HJhnx0g3rmAnoMUETuM422MLUpostbaK5rdc0JvFodRF5KZl7Bu4IX9877X85O+FwVx1/d7EHeikDyqQgEvW6p2OMkzbrASN1Lzsn9wknI3UX4Yu1Eoz7344a4yMMLYSiPPYKOwxnYcclfw99Is4V4fTlApRPRdzXpTZGSaZnDzWLzns/CrIV2BMM0uO57xeigOm4c1ZeT6vpUVxzYBQWeZw5e9d8Amd3VZuZcBFTOZclb0fWJVMYjXMuFz7lp8SwxfwXeMVxtFuSjnQ4NLQD89Yp3fjRSKtbSKFbBKtb17tsrnalLct3zidBkImEAGrKzTMYbUFqe7G+aegvoLX0KDp9jVEvPglaXuPuO/TOXgA+tK2VspKt3nqHfc1Xy8OmsNsLwBJFwYmjbR0SN4Ec7kz6odvKDaTmtsYPW0Jk8208a5/IvaBdrVCep3QJcDyUVuzVequKO3kP1ylfqnVXpapW9llZ7P+915ApHnd3Gfhj7reX3oBN4sAsriKAhjmL92lYaNVdp74SqNT6v0bazSlzyup1X6v6/Sl/zj9A9WKUrXDUG9WLEaO0XkWeMGvagicMzCnNoMLRVsoLe6KT5bsFB5q7kkPm6ks67nB14adMJ+EETY8z8B+1xDaw==

Conclusion

Which way is the "correct" one depends on your exact requirements, but to mention a few key differences:

  • This first setup (single macro) is easier to maintain. If an additional media source needs to be added into the chain you can simply insert more actions to the list.
  • The second setup (multiple macros) allows more fine grained control when the (re)start of the other media source happens exactly. For example pausing / stopping one media source will not automatically result in the next media source being restarted in the second setup while in the first one it does.

There probably are even more ways to set this up, but I hope this will get you on the right track.