Some final questions

VegaMega wrote on 12/4/2023, 5:26 PM

@jetdv I'm getting it all going rather well now and I am nearly ready with my first script, just some finalizing things that I am not sure of on how to do.

1) Scale & Pan (10s)

I have a 1024x1024 png file on my timeline of a 1920x1080 videoTrack. I want to upscale my image to 1920x1920 so that it fits the screen and then pan it from bottom to top. I found 2 ways: 1) Pan & Crop on the VideoEvent and 2) MotionKeyFrames on the track. With Pan & Crop the scaling is really weird and I cannot figure out how to get the wanted result (it keeps cropping in the original square as well). With Motion Track I am not manipulating my 1024x1024 image, but my 1920x1080 video. So I am also scaling the black sides of the 1920 side to ??? So what would be the right approach for this?

2) Add Blur (10s)

The panning on 1) should also slowly unblur the image. Should I somehow add an effect on the VideoEvent? Does this influence the choice above? I havent found a good example for a blureffect.

3) Starting a script from a script

Is it possible to start a script from a script? I'm thinking of making a listener script that awaits (through a socket) a command to start a script. This way I can have Vegas open and listening and control it remotely. The alternative is to start and stop vegas. But starting is not really stable and pops up some errors now and then. Also I haven't found a way to close it through scripting. Hence my listener idea.....

 

Comments

jetdv wrote on 12/4/2023, 8:36 PM

1. Pan/Crop is the correct way to do it. Pan/Crop will work with the full resolution of the image. Track Motion works with the video frame so zooming in you'll lose resolution. So do your zooming and panning with Pan/Crop.

2. No, it doesn't matter. Just add any of the blur effects such as Gaussian Blur and use two keyframes - first keyframe blurred and second keyframe not blurred. You may need to set keyframes for multiple parameters.

3. From a Custom Command/Extension you can run another script.

And, yes, you can exit VEGAS from a script.

myVegas.Exit();

But it will ask if you want to save the changes unless you basically "start a new project" first and tell it to "not ask the save questions when starting this project".

myVegas.NewProject(false, false);

 

lan-mLMC wrote on 12/4/2023, 8:53 PM
  • Pan/Crop is always the first choice, and track motion always processes the results of Pan/Crop, so track motion is not the first choice.

 

  • You can also put PIP before Pan/Crop in the plug-in chain, so PIP will replace Pan/Crop to get the highest priority becoming the first choice.
VegaMega wrote on 12/5/2023, 3:32 AM

@jetdv and @lan-mLMC thanks for the great answers! Very helpful. The issue I have with Pan/Crop is that when I change the Width/Height is acting unexpectedly (in the GUI, to see what I have to do from the script). When I increase the W/H, the image gets smaller and when I decrease it gets bigger but it also is cropped from its original size (the original size remains the container) so that I never get the image filling the whole video frame.

lan-mLMC wrote on 12/5/2023, 3:37 AM

When I increase the W/H, the image gets smaller and when I decrease it gets bigger but it also is cropped from its original size (the original size remains the container) so that I never get the image filling the whole video frame.

This is the problem caused by the unique mechanism of Vegas Pan/Crop. To solve this problem, you must first match the output aspect ratio. Here are just some discussions that may help you:

https://www.vegascreativesoftware.info/us/forum/feature-request-match-output-aspect-without-rescaling--139164/?page=4#ca899501

jetdv wrote on 12/5/2023, 7:44 AM

When I increase the W/H, the image gets smaller and when I decrease it gets bigger but it also is cropped from its original size (the original size remains the container) so that I never get the image filling the whole video frame.

@VegaMega, that would be correct. Make the Width/Height bigger and you are "farther away" from the image so it will get smaller.

Make the Width/Height smaller and you are "closer" to the image so it will get bigger.

The image will fill the whole frame if you do the "Match Output Aspect" first: https://www.vegascreativesoftware.info/us/forum/feature-request-match-output-aspect-without-rescaling--139164/?page=4#ca874639

So based on your original description:

  1. Do a Match Aspect
  2. Make the Width/Height smaller (as desired)
  3. "Move" it to the bottom of the image
  4. Add a new keyframe at the end of the event and "Move" it to the top of the image

That will let you zoom in, start at the bottom, and pan to the top.

This was the beginning of a series and the first two deal with using Pan/Crop to create the movements

 

 

jetdv wrote on 12/5/2023, 7:45 AM

@VegaMega, also see here:

http://www.jetdv.com/montage-magic/

(I gave it away as a Christmas present last year - donations are accepted if you like it)