Previous topicNext topic

Videos to only play when I hit the music play button...

Questions, comments, feedback, etc.
Post Reply
SpaceTraveller
Posts: 42
Joined: Fri Mar 12, 2021 10:33 pm

Videos to only play when I hit the music play button...

Post by SpaceTraveller »

There might be a simple answer hopefully,

But with a few scenes of video all connected to the main scene - how do I prevent these videos playing until I start the music on the input sources window so they all start at the same time?

All stopping when I hit stop would be great too...


Any help greatly appreciated...
Sadler
Posts: 1348
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Videos to only play when I hit the music play button...

Post by Sadler »

I think you asked this question before: https://magicmusicvisuals.com/forums/vi ... 84&p=10801
SpaceTraveller
Posts: 42
Joined: Fri Mar 12, 2021 10:33 pm

Re: Videos to only play when I hit the music play button...

Post by SpaceTraveller »

Sadler wrote:I think you asked this question before: https://magicmusicvisuals.com/forums/vi ... 84&p=10801

Yes - I never did find a suitable outcome -I was hoping this could now be done in house (just using MMV) but sadly not :(

Here's hoping for the future :idea:
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Videos to only play when I hit the music play button...

Post by Magic »

I tinkered for a few minutes and came up with something that:
1) rewinds a VideoFile module when the Input Sources file rewind button is clicked
2) pauses a VideoFile module when the Input Sources file pause button is clicked
Screen Shot 2022-04-15 at 9.30.54 AM.png
Screen Shot 2022-04-15 at 9.30.54 AM.png (268.1 KiB) Viewed 22475 times
The first expression is: if(x-xp=0, 0, 1)
Which, in this case, means that if the current playback time (x) is the same as the previous playback time (xp), set the speed to 0 (paused); else set it to 1 (normal)

Therefore it's important to know that xp is a reserved variable in the Expression modifier which stores the previous input value, whereas x is the current input value. This allows you to compare them.

The second expression is: if(x=0, 1, 0 )
Which, in this case, means that if the playback time is 0, trigger a rewind; otherwise don't do anything else.

Hope that helps!
SpaceTraveller
Posts: 42
Joined: Fri Mar 12, 2021 10:33 pm

Re: Videos to only play when I hit the music play button...

Post by SpaceTraveller »

Thanks for that Eric; I look forward to trying it out further... ;)
bylefjild
Posts: 18
Joined: Wed Oct 23, 2024 7:37 am

Re: Videos to only play when I hit the music play button (revisited)

Post by bylefjild »

I have the same issue and I did apply the solution provided by @Magic and technically it works, BUT there is a noticable delay in the video playback. My video is synchronized with some visual effects in the video, with the music, but now the effects in the video appear later as said, so delayed. If the delay was earlier, then I could set the start time a bit later, but now I should set the start time to negative, wich is (obviously) not possible. How to fix this?
Post Reply