Script Required: Create a still image (or subclip) at cursor position

davidp wrote on 12/10/2016, 7:38 PM

I'm a seasoned Vegas Pro user and I've recently been creating a lot of online course material in which I need to stretch out individual video frames from a Camtasia recording to match up with a prerecorded voice over.

To accomplish this, I've been doing the following:

  1. split the clip at the cursor position
  2. advance the cursor a single frame
  3. split the clip again
  4. select the one-frame clip
  5. convert it into a subclip
  6. stretch the subclip out several seconds

This process isn't difficult or inaccurate but performing it over and over eats up a lot of time and begs for a script.

Questions:

  1. Does anyone have a working script they'd be willing to share?
  2. Is anyone willing to collaborate on creating one? (NB: I have coding experience and am more than willing to carry my weight.)

Thanks in advance.

Cheers,

dp

Comments

rs170a wrote on 12/10/2016, 9:54 PM

That's way too much work. Here are two alternatives.

#1 is to do a frame grab using the Save Snapshot to File icon above the preview window. Split the video event and move the right one further to the right. Drop the newly saved image (it shows up in your project media tab) back onto your timeline at the split point. Stretch it out as long as needed.

#2 is to use the velocity envelope. Add two points (100% and 0%) at the desired freeze point. Add two more (0% and 100%) at the desired resume point. The advantage to the second method is no possible slight image level/colour change due to method #1.

Mike

ushere wrote on 12/10/2016, 10:48 PM

you got there before me mike ;-)

i've generally found the 1st works well (set to best if appropriate) and saving as png.

davidp wrote on 12/11/2016, 10:20 AM

Gentlemen... Thank you. These suggestions are valuable.

As I think them through, #1 doesn't appear to save many steps or workflow cycles over my current process (i.e. which includes right-clicking the one-frame clip on the timeline and converting it to a subclip.) In fact, I can see it introducing additional steps as I'd have to change the settings on my preview to Best | Full before taking the snapshot and back to Preview | Auto when I'm done.

Mike... Was it your intention that these steps be automated? If so, I can see this being fairly elegant solution.

With respect to suggestion #2, this is one I've investigated and tried out. No doubt, it improves efficiency on the video end--since creation and placement of velocity envelope points if fairly straightforward to automate via script--but I lose on the audio end as I then have to manually align embedded mouse click SFX with the video--as you're aware there's no velocity automation for audio tracks.

Nonetheless, I appreciate your input, gents. You've given me more to think about. I still feel my current process (or Mike's #1) is a potential script candidate for someone with the right coding chops. I'm curious to know if others have attempted anything similar.

Thanks again.

Cornico wrote on 12/11/2016, 12:49 PM

If only a still at cursor is wanted I use always next:
1. Uncheck Options/Peferences/Editing  "Enable looping on events by default.
2. S(plit) at cursorposition.
3. Select the part left of the split, rightclick and choose "Create subclip".
4. Lenghten that clip with the amount of seconds you want for the still.

Former user wrote on 12/11/2016, 1:26 PM

In fact, I can see it introducing additional steps as I'd have to change the settings on my preview to Best | Full before taking the snapshot and back to Preview | Auto when I'm done.

What I have found is that the snapshot function in VP12 always uses Best / Full when saving a still if preview is set to any mode: Draft / Preview / Good / Best along with being set to "Auto".

Marco. wrote on 12/11/2016, 2:11 PM

Have you taken a look at Vegasaur's Freeze Frame feature?

davidp wrote on 12/11/2016, 2:47 PM

To jdw... I just tested that and it appears you're correct. The snapshot was a full HD / 1920x1080 despite my preview being 960x540.

To Marco... I'm a Vegasaur owner but hadn't realized this function existed (there are so many). In testing it just now, Freeze Frame accomplishes Mike's #2 suggestion to a T.

Since my last post on this topic, I borrowed some code from Edward Troxel, modified it to suit my purpose, and got it up and running. But it turns out Vegasaur does this with a single keystroke. Oh well... At least I learned something in the process.

Much thanks, Marco and all.

NickHope wrote on 12/11/2016, 10:19 PM

What I have found is that the snapshot function in VP12 always uses Best / Full when saving a still if preview is set to any mode: Draft / Preview / Good / Best along with being set to "Auto".

This was introducted in VP9. From the release notes:

"Copy Snapshot to Clipboard and Save Snapshot to File now deinterlace interlaced images and operate at Best (Full) resolution if the Video Preview is set to (Auto) size and Good quality if set to Draft or Preview."

Unfortunately those changes never made it to the online help or manual.

vic-borgogno wrote on 6/25/2017, 1:34 PM

David, was interested in having a 1 click script that would do exactly your 6 step (some 20 keystrokes) plus adding a text media over the freeze frame (with fade in and out on the text frame). But would be more than happy with anything that accomplished what you were describing.

I teach sports and am always trying to capture the athlete at an important times during a movement and I may have 10 freeze frames every 2 minutes in a 30 minute workout or 150 total per athlete. I've tried to simplify, as you have mentioned, and seem to have minimized the strokes.

I am presently trying out the Vegasaur and I don't think it will help reduce the number of strokes significantly.

You mentioned something about modifying some Edward Troxel code and I wondered if you might want to share your mods with me?

kind regards, vic borgogno

davidp wrote on 6/27/2017, 11:08 AM

Vic... I played around with Edward Troxel's code but it didn't get me where I needed to be.

Instead, I've been using the "Freeze Frame" tool in Vegasaur. Whenever I need to freeze, I drop the clip speed to zero, move the envelope points around to suit and I'm done.

Besides the simplicity, the other benefit of this method is that I can also speed the clip up where I need to—and that comes in handy quite often.

I hope this helps.

Former user wrote on 6/27/2017, 11:43 AM

If you have a Shuttle controller, you might be able to do most of this as a macro.

vic-borgogno wrote on 6/27/2017, 7:21 PM

davidp, i like it! First time I went directly to the 1-click commands and missed the Freeze Frame. That is going to save me several tedious movements, do appreciate!

I try and keep busy analyzing movements for players learning what is called the Split Step.

vic-borgogno wrote on 6/27/2017, 7:42 PM

david-tu, I don't have a Shuttle controller and was hoping for a low cost way to memorize keystrokes on Vegas. In Excel and other Microsoft products one can create Macros and they are really powerful tools; the code can be modified by non-programming types (like me). Wish that Vegas would consider such an approach.

thanks for the feedback

3POINT wrote on 6/28/2017, 3:47 AM

You should film your sport instructions with a higher shutterspeed so that freezed images don't have so much motion blur.

vic-borgogno wrote on 6/28/2017, 3:57 PM

3Point, that I am guilty off. I need to do a slow-mo shot with my JVD HD Professional, but I lose the audio. I guess I could record the audio on my iPhone and combine in Post. Any other thoughts?

Former user wrote on 6/28/2017, 5:28 PM

david-tu, I don't have a Shuttle controller and was hoping for a low cost way to memorize keystrokes on Vegas. In Excel and other Microsoft products one can create Macros and they are really powerful tools; the code can be modified by non-programming types (like me). Wish that Vegas would consider such an approach.

thanks for the feedback

Gaming keyboards have programmable macro keys.

vic-borgogno wrote on 6/28/2017, 6:56 PM

JN, not familiar with gaming keyboards and how they could be used with Vegas, can you help me understand? Does one OPEN a Macro and then go thru all the editing operations that I want to include, then CLOSE the Macro? Then assign the Macro to a ShortCut Key on the keyboard?

thanks again for any help, vic

3POINT wrote on 6/28/2017, 11:56 PM

3Point, that I am guilty off. I need to do a slow-mo shot with my JVD HD Professional, but I lose the audio. I guess I could record the audio on my iPhone and combine in Post. Any other thoughts?

No, I meant shutterspeed not framespeed.

vic-borgogno wrote on 6/29/2017, 12:23 AM

I am also a bit slow in remembering that I have a manual setup my camera. That shutter speed increase may work with the light levels I normally have on the tennis court. I'm assuming my aperature setting could be a limitation.

Sorry for the 'level of skill', all this is pretty new to me.

3POINT wrote on 6/29/2017, 2:27 AM

The light conditions on a tennis court (outdoor,sunlight) should be more than sufficient to use a shutter speed of 1/250 sec for example. At the moment it looks to me that you used a shutter speed 1/50 sec or even slower. I don't know your camera, probably it has a "sports" exposure setting.

Former user wrote on 6/29/2017, 5:28 AM

Vic-borgono, yes thats about it, the gaming keyboards have dedicated macro programmable keys from a few to up to 18 (18 hard = 54 soft on one Corsair keyboard), they come with their own software, you can program your email, address, text strings and of course multiple key presses, all to an individual single macro key.

Check out the many YT reviews etc of these keyboards, mostly all "mechanical".

vic-borgogno wrote on 6/29/2017, 7:02 PM

Theo, thanks for the info. I will try it on our next project. When I go to Manual settings, I see the 1/250 sec and assume taking a light meter to check the aperture setting would be the best approach. Again, this is digging way back into some old memory banks.

vic-borgogno wrote on 6/29/2017, 10:03 PM

JN, in thinking about the keystrokes (AND mouse clicks) I began to realize that mouse locations on the screen (i.e. split points, etc) might not work with the gaming keyboard. Have you any thoughts on how one might get around this issue?

Former user wrote on 6/30/2017, 8:12 PM

Extract from "mouse actions" info in Corsair K95 keyboard ...

With the Corsair Utility Engine, you can create actions that send mouse clicks, movement, and scrolling. You might use this to assign keys to the mouse scroll wheel to enable scrolling up and down or side-to-side without having to roll the scroll wheel

 

In the Corsair Utility Engine, in the Actions menu, Click New

The Actions Editor window opens In the left- hand column, click Mouse

In the Name field, type a unique name for the action

In the Notes field, type any descriptive notes you want to make about the action

If you want the action to send a mouse click, in the Buttons section, click the desired option below: 

        –  Left Click – This option sends a single- click of the left mouse button

        –  Left Double Click – This option sends a double click of the left mouse button

        –  Middle Click – This option sends a single- click of the middle mouse button

        –  Right-click – This option sends a single- click of the right mouse button

        –  Forward – This option simulates the click of the forward button in a web browser

        –  Backward – This option simulates the click of the back button in a web browser

If you want the action to perform scrolling, in the Scroll section, click the desired option below: 

Up – This option scrolls up the screen

Down – This option scrolls down the screen

Left – This option scrolls left on the screen

Right – This option scrolls right on the screen

While pressed – If selected, this option performs the scrolling action continually while the assigned key is pressed
If you want to specify a custom lighting to run when the action runs, in the Lighting When Start section, in the drop-down list, click the name of the lighting you want to activate when the action starts To create a new lighting, click New

1 When you are finished creating the mouse action, click OK to save it

For more information on lightings, see Lightings Section