Moving video behind of a mask

Godzinhu wrote on 8/29/2023, 11:29 AM

Ok i will try to explain myself as best as i can, i have a webcam in my video and i have set a circular mask arround my face, but sometimes i move out of this circular mask, then i go for the keyframes and move the mask to keep in sync with my face, but the problem is that the mask moves aswell in the feed. I want the mask to keep moving as much as i like but i want to the source in the video remain in the same position, for exemple, when i move left i have to adjust the mask to the left, but i don't want the mask to move in the video, i just want the mask to match with my position without having to adjust the position in the video aswell. Is there any way that i can do this ? I hope that i have been clear enough

 

https://www.youtube.com/shorts/c5wrpdtMN4Q (this is a video exemple of my situation)

As i mention i want just to move the mask without moving it in the final product, i understand that i can use the same theyframe to adjust back the position of the screen, but there is no better way to do it ? If i adjust the mask to the left i have to adjust the screen to the right, it feels that i am doing it in the most hard/wrong way possible.

Comments

Former user wrote on 8/29/2023, 2:02 PM

@Godzinhu Hi,can you screen capture your whole screen with Vegas pro on it showing what you're doing? Either upload it to YT, leave it as Unlisted then post the link on here using the chain button at the top of a new comment, or just post it on here using the arrow button next to the smiley at the top of a new comment.

Godzinhu wrote on 8/29/2023, 3:05 PM

once i get home i will do that, but i am using event pan/crop to move the mask to follow me, i don't know other way to do it https://prnt.sc/Zm7meYQKwZRo

Former user wrote on 8/29/2023, 4:22 PM

@Godzinhu I'm not 100% sure what you're doing because you have Motion Tracker in the fx chain before Pan/Crop, Whatever tracking you've done may be being counteracted by your keyframes in Pan/Crop but apart from the 1st keyframe there's no other keyframes on the position timeline, 🤷‍♂️ You need to click on Mask on the left if you want to keyframe the mask, the dotted selection box in Pan/Crop will change & the controls on the left will change to mask controls, In your pic it shows Position highlighted, that also shows by the dotted box on screen.

Godzinhu wrote on 8/29/2023, 4:24 PM

motion tracker was selected but it wasnt doing anything in the scene, when i move the mask to the left i have to move the position to the right to compensate, is this the right way to do it ? There is no way to lock the position in place and just move the mask ? Because it feels so weird to do like this and it also messes with the default position that i want for the camera in the video

fr0sty wrote on 8/29/2023, 6:45 PM

If you buy VEGAS 21 suite, or VEGAS 21 post, or any of the suite or post VEGAS 365 versions (basically any VEGAS version that doesn't have "Edit" in the name), they all come with mocha, which makes this sort of thing far easier to do. Watch the mocha tutorial videos stickied to the top of the VEGAS video forums, you'll see just how powerful it is. It is the industry standard tool to use for masking and motion tracking.

Godzinhu wrote on 8/29/2023, 7:46 PM

@fr0sty The tool that you mention really looks amazing, i have watched a video here, but it feels like really complicated to do for a simple webcam centralization haha, and i am amateur in video edditing so maybe this tool is way beyond me, i wish vegas could do it in a simpler way

fr0sty wrote on 8/29/2023, 7:52 PM

You want the video to remain stabilized under a stationary mask, so as you move, the video pans around in order to keep your face in the same spot of the circular mask. This is how to do that exact effect in mocha VEGAS (starting at the 8 minute mark).

Last changed by fr0sty on 8/29/2023, 7:53 PM, changed a total of 1 times.

Systems:

Desktop

AMD Ryzen 7 1800x 8 core 16 thread at stock speed

64GB 3000mhz DDR4

Geforce RTX 3090

Windows 10

Laptop:

ASUS Zenbook Pro Duo 32GB (9980HK CPU, RTX 2060 GPU, dual 4K touch screens, main one OLED HDR)

RogerS wrote on 8/29/2023, 7:56 PM

Mocha looks intimidating but I found it useful for tracking a subject and creating a mask even without really understanding it.

For just this circle are you sure VEGAS motion tracking can't do it? This and a circular bezier mask? (Haven't tried it myself for a use case like this, I use it to selectively color moving objects or have text follow an object)

Godzinhu wrote on 8/29/2023, 8:09 PM

You want the video to remain stabilized under a stationary mask, so as you move, the video pans around in order to keep your face in the same spot of the circular mask. This is how to do that exact effect in mocha VEGAS (starting at the 8 minute mark).

@fr0sty It feels quite challenging for me, but i will give it a try. I understood the concept of centralization, but i quite didn't got how i would place it under a circular mask without having to keep moving it arround like i was doing in pan and crop

Godzinhu wrote on 8/29/2023, 8:28 PM

@RogerS I have tried to use motion tracking but for some reason it wasn't working for me, when i tried to track something it failed i didn't understood why so i gave up

Former user wrote on 8/29/2023, 8:49 PM

@Godzinhu Hi, pls share the video of what you're trying to do, make it as long as you'd like, actually longer or more info is better 👍

fr0sty wrote on 8/29/2023, 8:51 PM

Mocha looks intimidating but I found it useful for tracking a subject and creating a mask even without really understanding it.

For just this circle are you sure VEGAS motion tracking can't do it? This and a circular bezier mask? (Haven't tried it myself for a use case like this, I use it to selectively color moving objects or have text follow an object)

VEGAS can motion track the circle to a face, but it will move around, which he doesn't want. He wants the circle mask to remain stationary, and the video beneath the mask to pan around automatically so that the face remain centered inside of the circle. The best way I know how to do this in VEGAS is using Mocha VEGAS.

It's a bit challenging to learn, but if you do learn it, you can do some really cool stuff, like sticking an image to your wall that remain in place as the camera moves, changing the image that is on a computer or cell phone screen even as the camera moves around, isolating people from the background behind them, removing things from the video frame entirely, etc.

Last changed by fr0sty on 8/29/2023, 8:53 PM, changed a total of 1 times.

Systems:

Desktop

AMD Ryzen 7 1800x 8 core 16 thread at stock speed

64GB 3000mhz DDR4

Geforce RTX 3090

Windows 10

Laptop:

ASUS Zenbook Pro Duo 32GB (9980HK CPU, RTX 2060 GPU, dual 4K touch screens, main one OLED HDR)

Godzinhu wrote on 8/29/2023, 9:06 PM

@Former user Actually @fr0sty understood exactly what i am trying to do, its just my lack of skill that are preventing to do so, i am trying mocha as we speek, since i am still in the trial for the vegas post, if i manage to do what i am trying to do i will probably buy the software, it opens a lot of possibilities to video edditing, i got the potential of the tool, just need to understand the usage

Former user wrote on 8/29/2023, 9:19 PM

then i go for the keyframes and move the mask to keep in sync with my face, but the problem is that the mask moves aswell in the feed. I want the mask to keep moving as much as i like but i want to the source in the video remain in the same position,

@Godzinhu Ok sorry I was getting confused when you said "and move the mask" & "I want the mask to keep moving as much as i like" but then -

when i move left i have to adjust the mask to the left, but i don't want the mask to move in the video,

So you want the circle mask to stay like this not moving & your face to stay within that circle when you move around.?

Godzinhu wrote on 8/29/2023, 9:20 PM

@Former user Yes! sorry thats my mistake, i wasn't clear enough

Former user wrote on 8/29/2023, 9:25 PM

@Godzinhu No prob, it's not easy to put it writing sometimes, If the problem was down to a bit of camera movement you could poss use Stabilization but this is you moving around,

Godzinhu wrote on 8/29/2023, 9:28 PM

Update: I used mocha to track the movement, now i have a pretty precise moving bubble haha, i guess that my issue is to understand how in the world i just place a static mask and just adjust the video inside it, thats my barrier atm

Former user wrote on 8/29/2023, 9:42 PM

@Godzinhu Yeah i was thinking that, somehow you need to reverse engineer that,

fr0sty wrote on 8/29/2023, 9:45 PM

If you use the tracking tutorial that begins at 8 minutes in the video above, it should freeze your face in one spot on the frame no matter where you move it... from there, just move your face into the circle... you're applying the motion tracking to the circle, instead of applying it to the video of your face, that's where you're messing up here. You need to freeze your face into one spot on the video first, using a combination of mocha and vegas stabilization, then overlay the circle mask on top of it.

Last changed by fr0sty on 8/29/2023, 9:48 PM, changed a total of 1 times.

Systems:

Desktop

AMD Ryzen 7 1800x 8 core 16 thread at stock speed

64GB 3000mhz DDR4

Geforce RTX 3090

Windows 10

Laptop:

ASUS Zenbook Pro Duo 32GB (9980HK CPU, RTX 2060 GPU, dual 4K touch screens, main one OLED HDR)

Former user wrote on 8/29/2023, 9:48 PM

I don't know exactly what you're doing, but I"ll assume you're playing a game, while recording yourself, then editing them together for a short highlight video with facecam. If that's the case you could export your edited face camera track full frame, import it to the free PC version of Capcut, use auto- reframe, then exported the reframed video back into vegas , resize and mask it with a circle and place it in corner of your video.

Only problem I could see is if timing is not perfect and you get some drift when importing it back into Vegas. Capcut has limited preset encoding frame rates and I don't think you can add a manual frame rate of your choice.

fr0sty wrote on 8/29/2023, 9:57 PM

He already has a better option with Mocha, might as well go with that.

Systems:

Desktop

AMD Ryzen 7 1800x 8 core 16 thread at stock speed

64GB 3000mhz DDR4

Geforce RTX 3090

Windows 10

Laptop:

ASUS Zenbook Pro Duo 32GB (9980HK CPU, RTX 2060 GPU, dual 4K touch screens, main one OLED HDR)

fr0sty wrote on 8/29/2023, 9:58 PM

By the way, this may make things easier on you. In the tutorial video I posted, she does an extra step to exclude the girl's hair from the motion track that isn't necessary in your case, so you can skip that part. Just track your face (instead of tracking the ear like she does on the girl, track your nose, or eyes), then export that face track to the VEGAS motion tracking system from the mocha effects panel in VEGAS, and do like she does in the video, select the "freeze motion effect" in the vegas motion tracking panel. This should lock your face into the same spot in the frame no matter where you move your head, it does the panning for you. From there, just move your face to where you want it to be on the screen, and add in the circle mask.

Last changed by fr0sty on 8/29/2023, 10:02 PM, changed a total of 3 times.

Systems:

Desktop

AMD Ryzen 7 1800x 8 core 16 thread at stock speed

64GB 3000mhz DDR4

Geforce RTX 3090

Windows 10

Laptop:

ASUS Zenbook Pro Duo 32GB (9980HK CPU, RTX 2060 GPU, dual 4K touch screens, main one OLED HDR)

fr0sty wrote on 8/29/2023, 10:04 PM

You can also use this same face freeze effect to pull off some cool shots like you see in many music videos, like this one.

Systems:

Desktop

AMD Ryzen 7 1800x 8 core 16 thread at stock speed

64GB 3000mhz DDR4

Geforce RTX 3090

Windows 10

Laptop:

ASUS Zenbook Pro Duo 32GB (9980HK CPU, RTX 2060 GPU, dual 4K touch screens, main one OLED HDR)

Former user wrote on 8/29/2023, 10:11 PM

@fr0sty I was thinking Stabilization, somehow transferring Mocha data to the mask, video as an insert in/on the mask rather than a mask applied to the video, but that would mean some kind of stabilization to the video, I wrote a comment about it but then deleted it, simplifying it to 'reverse engineer' 🤷‍♂️, I have Mocha Pro plugin/Standalone & am still on VP20 so I wasn't sure what Mocha Vegas could do,, Just watched that Boris vid & it's good to see it can be done with Mocha Vegas 👍 (should've watched it earlier 😂)