Previous topicNext topic

Video file end trigger

Questions, comments, feedback, etc.
Post Reply
Ornette
Posts: 2
Joined: Wed Jul 20, 2022 1:36 pm

Video file end trigger

Post 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?
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Video file end trigger

Post 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 3141 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 3141 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.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Video file end trigger

Post 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.
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Video file end trigger

Post 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.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Video file end trigger

Post 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.
Ornette
Posts: 2
Joined: Wed Jul 20, 2022 1:36 pm

Re: Video file end trigger

Post by Ornette »

Wow!! Thank you both!
I'll try it and let you now how it works
Post Reply