Page 1 of 1

Video file end trigger

Posted: Wed Jul 20, 2022 2:15 pm
by Ornette
Hi!
I'm searching for a way to change the effect used on videoclips automatically. Like if I use videoclips played from a folder, I want the effect scene to be changed with the beginning of the next clip. Is that possible? I've with the playlist, but then all clips need to be the same length or they are not played til the end. Is there a way to get the playback time of the current clip for example, or even better, a trigger by the end of each clip?

Re: Video file end trigger

Posted: Thu Jul 21, 2022 9:22 pm
by Sadler
Hey,

If you know the duration of all your clips you can use the playlist to configure the timing using the same scene for every entry. That scene would contain a VideoFolder connected to an effect (chain) for each video and you could switch between each effect using an InputSelector triggered by the playlist. You could trigger the scene change manually or using the auto advance on the playlist.
Screenshot 2022-07-21 220234.png
Screenshot 2022-07-21 220234.png (77.59 KiB) Viewed 3380 times
Unfortunately, this takes over all of Magic - at least the Playlist anyway - but you don't have to use the playlist for the timing. You could use an Increase modifier and an expression.

I though this setup might work but it seems the y expression doesn't work for Playlist Entry but in fact it gives quite odd results.
Screenshot 2022-07-21 093127.png
Screenshot 2022-07-21 093127.png (11.18 KiB) Viewed 3380 times
If this did work it would be a relatively simple way to trigger stuff using the playlist - I guess a playlist change event trigger would be a better solution. For another version maybe.

Re: Video file end trigger

Posted: Fri Jul 22, 2022 3:47 pm
by Magic
Interesting solution Sadler! I think if you do:

Code: Select all

if (x!=xp, 1, 0)
your expression will work as you intend. Basically it means: if the current x value isn't the same as the previous x value, output 1; otherwise output 0. This results in a nice trigger.

Re: Video file end trigger

Posted: Fri Jul 22, 2022 7:03 pm
by Sadler
Thanks Eric (?) for that insight - another technique for the toolbox. I was misled by the user guide which says "Evaluates the specified math/logic expression using the current input value as x and/or the previous output value as y."

To Ornette - so that means you don't need to know the durations of all videos, you just specify any duration in the playlist and combined with the InputSelector each FX will be applied to each video in time to the Playlist.

Re: Video file end trigger

Posted: Fri Jul 22, 2022 8:25 pm
by Magic
The difference is that y is the previous output whereas xp is the previous input.

So comparing x to xp is comparing apples to apples, whereas y is an orange and only to be used for a specific purpose.

Re: Video file end trigger

Posted: Sat Jul 23, 2022 11:03 am
by Ornette
Wow!! Thank you both!
I'll try it and let you now how it works