Hi.
I'm hoping someone out there with more expertise than I can help me modify
a script I've pieced together. I'm working on a project requiring that I end up
with a media file that has 5 seconds of silence and no video placed every 10 seconds (imagine a roll of postage stamps split apart at the perforations). The script I have here puts markers every 10 seconds, but does not insert a split, nor does it insert 5 seconds of blank space at these splits. I'm sure someone out there with scripting experience would find this to be an easy task. Here's the script and thanks in advance for your help:
/**
* This script will add markers at the specified interval
*
* Written By: Edward Troxel
* www.jetdv.com/tts
* Modified: 09-19-2003
**/
import System;
import System.IO;
import System.Windows.Forms;
import
SonicFoundry.Vegas;
//Modify the timecode on the next line to change the interval.
var Interval = "00:00:10:00";
var zd7f2e30bc7=
Interval;
try{
var z75282fe324:
Marker;
var za684dd0854:Timecode=new Timecode(zd7f2e30bc7);
var z88cf708b9e:
Timecode=za684dd0854;
var z0174fc9e78:Timecode=Vegas.Project.Length;
while(
z88cf708b9e<z0174fc9e78){
z75282fe324=new Marker(z88cf708b9e);
Vegas.Project.
Markers.Add(z75282fe324);
z88cf708b9e=z88cf708b9e+za684dd0854;
}
}catch(z744b6e974a){
MessageBox.Show(z744b6e974a);
}
var fiveSecondGap : Timecode = new Timecode("00:00:05.00");
try
{
// step through all selected video events:
for (var track in Vegas.Project.Tracks)
{
if( !track.Selected) continue;
var tracktime = fiveSecondGap;
for (var evnt in track.Events)
{
evnt.AdjustStartLength(tracktime, evnt.Length, true);
tracktime = tracktime + evnt.Length + fiveSecondGap;
}
}
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
Thanks.
Kurt E. Freeman
Center for Human Services Research
University at Albany, SUNY
I'm hoping someone out there with more expertise than I can help me modify
a script I've pieced together. I'm working on a project requiring that I end up
with a media file that has 5 seconds of silence and no video placed every 10 seconds (imagine a roll of postage stamps split apart at the perforations). The script I have here puts markers every 10 seconds, but does not insert a split, nor does it insert 5 seconds of blank space at these splits. I'm sure someone out there with scripting experience would find this to be an easy task. Here's the script and thanks in advance for your help:
/**
* This script will add markers at the specified interval
*
* Written By: Edward Troxel
* www.jetdv.com/tts
* Modified: 09-19-2003
**/
import System;
import System.IO;
import System.Windows.Forms;
import
SonicFoundry.Vegas;
//Modify the timecode on the next line to change the interval.
var Interval = "00:00:10:00";
var zd7f2e30bc7=
Interval;
try{
var z75282fe324:
Marker;
var za684dd0854:Timecode=new Timecode(zd7f2e30bc7);
var z88cf708b9e:
Timecode=za684dd0854;
var z0174fc9e78:Timecode=Vegas.Project.Length;
while(
z88cf708b9e<z0174fc9e78){
z75282fe324=new Marker(z88cf708b9e);
Vegas.Project.
Markers.Add(z75282fe324);
z88cf708b9e=z88cf708b9e+za684dd0854;
}
}catch(z744b6e974a){
MessageBox.Show(z744b6e974a);
}
var fiveSecondGap : Timecode = new Timecode("00:00:05.00");
try
{
// step through all selected video events:
for (var track in Vegas.Project.Tracks)
{
if( !track.Selected) continue;
var tracktime = fiveSecondGap;
for (var evnt in track.Events)
{
evnt.AdjustStartLength(tracktime, evnt.Length, true);
tracktime = tracktime + evnt.Length + fiveSecondGap;
}
}
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
Thanks.
Kurt E. Freeman
Center for Human Services Research
University at Albany, SUNY