Page 1 of 1

Simple volume to video playback position questions

Posted: Fri May 28, 2021 4:43 pm
by doleo
Hi everyone,

I have a simple question (for anyone that knows what they're doing). I'm pretty new to the software, and I can make a number of simple things happen, but I haven't been able to make this work, yet.

What I want to do is control the playhead of a video file, using the volume of an audio file as the input. Effectively, what that means is that the louder the volume becomes, the further through the video file the playhead moves. So if it were a video of an explosion, for example, the low volume input would play the start and as it becomes louder, it plays the flames leaping out from the center.

I hope my explanation makes sense! Let me know if you've achieved something like this. :D

Re: Simple volume to video playback position questions

Posted: Sat May 29, 2021 9:14 am
by Sadler
You can do this with short loops using the JPEG Folder module. Just attach the Index# to a source.

Hope this is what you're after!
Sadler

Re: Simple volume to video playback position questions

Posted: Sat May 29, 2021 6:11 pm
by doleo
Hey, thanks for getting back to me!

Can a JPG be animated, then? Because this module would accept my folder full of MOVs. And I never knew JPGs could be animated/loops.

Re: Simple volume to video playback position questions

Posted: Sat May 29, 2021 6:16 pm
by Magic
You can easily do this with the VideoFile module and its Goto Start parameter, but the caveat is that your video must use one of a very specific set of codecs that allow you to jump directly to any frame. For example, mp4's won't work very well. The best codec is Hap, but Motion JPEG will also work, as will Apple ProRes.

Re: Simple volume to video playback position questions

Posted: Sun May 30, 2021 12:00 am
by Sadler
doleo: Can a JPG be animated, then? Because this module would accept my folder full of MOVs. And I never knew JPGs could be animated/loops.
You might be confusing the VideoFolder with the JpegFolder. If you have a sequence of jpg images then you can play these frames back using the JpegFolder according to the index. Scale the index by the number of frames you want to play.
Eric: You can easily do this with the VideoFile module and its Goto Start parameter
Are you sure Eric? It would be great to play HAP files this way. Can you explain further?

Re: Simple volume to video playback position questions

Posted: Sun May 30, 2021 1:23 am
by Magic
Load a Hap file, set the Speed to 0, link the Start Time to the Volume, and trigger the Goto Start param when you want to jump.

Or you can set up some kind of Expression to trigger the Goto Start param regularly to achieve a smoother motion. Version 2.31 would let you do an Expression like "if current time is not equal to previous time, output 1, otherwise output 0": if (x != xp, 1, 0) where x is linked to the time, but I'm sure there are other useful ways to do it. Maybe keeping track of and comparing an integer frame counter would be more efficient since comparing time would almost always result in unnecessary triggers.

Re: Simple volume to video playback position questions

Posted: Sun May 30, 2021 8:49 am
by Sadler
Yeah, that works. An oscillator on the Goto Start seems to work too.