Detect if video is on frame boundaries?

Erk wrote on 12/20/2004, 2:19 AM
I'm wondering if scripting can detect whether a video event begins and ends quantized to frame boundaries. Sometimes I edit without quantization in order to be able to freely slide the accompanying audio around, and then once the audio is place, forget to quantize the video frame boundaries.

Since you wonderful scripters have been able to clean up so many of my other messes, I'd thought inquire about this one.

Many thanks,

Greg

Comments

rcampbel wrote on 12/22/2004, 8:07 AM
Greg,

Yes this is possible. Basically you can set the Timecode value for start and end to a integral frame value (timecode.FrameCount = 10 for example).

I threw together a quick script that will quantize the selected video events by default. You can easily modify the script to quantize all video or all video and audio events.

The script can be downloaded from the Peach Rock web site.

Randall
Erk wrote on 12/30/2004, 7:34 PM
Randall,

That's great, thanks!

Merry Christmas and Happy New Year,

Greg
rcampbel wrote on 12/31/2004, 12:28 PM
You are very welcome.

Have a great New Year and don't get too wasted! :-)

Randall

Frenchy wrote on 6/3/2006, 12:12 AM
I know this is a way old thread, but it covers exactly what I'm trying to do.

I'm using Vegas 4(e) build 239

I run the script, but am getting the error message:

"Error on Line 38"
"Variable 'Timecode' has not been declared"

Any help in what I can do, please?

Thanks
jetdv wrote on 6/3/2006, 6:06 AM
Why doesn't my script work?

In your case, you'll need to do it backwards - changing "Sony" to "SonicFoundry".
JohnnyRoy wrote on 6/3/2006, 2:43 PM
It’s important to note that while Vegas 4 scripts will almost always run fine on Vegas 5 & 6, the opposite is not always true. So after you change Sony back to SonicFoundry, you may find other errors if the script you change is using features of the Vegas 5 or 6 API that are not available in Vegas 4.

~jr
Marco. wrote on 6/3/2006, 3:31 PM
Just a note. I find the QuantizeToFrames script is VERY helpful for some people.

I often notice that people who are not yet familiar with Vegas doesn't care enough for the project properties. It's PAL here but the Vegas standard setting is NTSC. Now what happens if you use a NTSC project and put all your PAL events in there cut it and then you realize: "Oh, I forgot to use PAL project settings. I'll quickly change the NTSC setting to PAL" ...

All - all the events will have wrong frame boundaries now. The project could have short black gaps as well as serious field problems. Manually correcting the project now could be hell work. But using the QuantizeToFrames script is just a click to have the project and the frame boundaries cleaned again.

I cannot count how often a proposed to use this script. And in my opinion the red markers for unquantized frame boundaries (in the internal preferences) should be a direct access feature in Vegas.

Marco
mjr wrote on 11/20/2009, 12:15 PM
Hello,

this is my problem - I need to re-quantize to frames. Often I forget switch back the button "Quantize to frames" after I edit audio and then I continue to work with video...

I am looking for script QuantizeToFrames.zip, but the web link is old. Is there anybody, who has this script or who can write any similar or better? :-)

Yes, I now there is upgraded function Quantize to frames in Vegas 9, but I am still using 8.0.

Thank you
Martin