Previous topicNext topic

Video sync between scene changes

Questions, comments, feedback, etc.
Post Reply
benlowe
Posts: 3
Joined: Fri Jan 15, 2021 1:22 am

Video sync between scene changes

Post by benlowe »

I recently got Magic and I've really been enjoying it. Let me see if I can succinctly explain my situation, I'm hoping there is an easy solution for this.

I am making a lyric video for an original song. I have 2 video files playing at once, the first one is speed synced (via volume) to a specific audio stem and running in the background. The other video file is timed lyrics that play along with the song and overlaid over the first video (with lumakey. It runs at its original speed throughout the song so as to stay in time with the singing.

I want to be able to change the first video speed to be synced with a different stem OR run at normal speed at a specific point in the song (verses) and then go back to synced to the original stem file during the other parts of the song. I figured this would need to be a scene change, but when I try that, both videos do not carry over from the first scene to the next. Is there any way (maybe not a scene change?) to change the way a video file is speed synced throughout the song while keeping the lyric video that's overlaid on top unaffected?

It sounds more complicated than it is, sorry its hard to put into words accurately.
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Video sync between scene changes

Post by Sadler »

Normally to have a video sync throughout you'd just put it into its own scene then include that scene wherever you need it. But I don't think that would help you in this situation. Perhaps an expression might help you, something like this:

if (PlayBackTime > normal_speed_bit_start and PlayBackTime < normal_speed_bit_end then normal_speed else stem_speed)

Use the Internal PlayBackTime as the source for the Speed parameter. It is more convenient to set up the other variable as Globals except, normal_speed is just 1. The line above is for understanding but it would look like this in Magic: if (x>start & x<end, 1, stem_speed).

Hope this helps
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Video sync between scene changes

Post by Magic »

Yup that’s exactly right.
benlowe
Posts: 3
Joined: Fri Jan 15, 2021 1:22 am

Re: Video sync between scene changes

Post by benlowe »

Sadler wrote:Normally to have a video sync throughout you'd just put it into its own scene then include that scene wherever you need it. But I don't think that would help you in this situation. Perhaps an expression might help you, something like this:

if (PlayBackTime > normal_speed_bit_start and PlayBackTime < normal_speed_bit_end then normal_speed else stem_speed)

Use the Internal PlayBackTime as the source for the Speed parameter. It is more convenient to set up the other variable as Globals except, normal_speed is just 1. The line above is for understanding but it would look like this in Magic: if (x>start & x<end, 1, stem_speed).

Hope this helps

Thanks so much! I'll give it a shot.

I'm a bit stretched with my current understanding of how everything works together, and some of the more programming expression stuff is also a bit out of reach for me at the moment. I took basic programming far too many years ago to remember much. Do you have any opinions on whether learning some basic programming might help with magic? Or should I just dig into magic specifically to figure stuff out. Though I guess learning programming is a good thing to do regardless, is there a best language that will give the biggest bang for the buck as far as understanding the basics in magic too?

Thanks!
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Video sync between scene changes

Post by Sadler »

A little programming knowledge would certainly help but isn't essential. The syntax of the expression modifier is C like but uses very little C notation (no data types, pointers etc.) The expression is awesome for glueing bits of magic together with conditionals and once you get your head around it, it is quite powerful - but not really programming.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Video sync between scene changes

Post by Magic »

Yeah, the reasons I added the Expression modifier are: 1) it allows for functionality that wasn't specifically anticipated, as in your case; and 2) it's pretty hard to do "advanced" data control without some kind of math or logic that isn't easily implemented in a regular GUI, no matter what the app is.

I wouldn't worry too much about programming though. The most important thing for most people to understand is the "if" statement, as Sadler described.
benlowe
Posts: 3
Joined: Fri Jan 15, 2021 1:22 am

Re: Video sync between scene changes

Post by benlowe »

Awesome guys, thanks a lot, I really appreciate it. :D
Post Reply