PDA

View Full Version : is it possible to script this in vtscript?



doc debolt
06-09-2006, 08:02 AM
I am trying to figure out if it is possible to make a script that will drop the solid color black for 10 seconds in between a project full of clips -

this is something i do very often - i make a load-in disc for our production guys with a bunch of short elements that have to be re-captured on the playback system and i usually have to put 10 secs of black so they can pause/play the dvd player and give it enough time to have the "play" text disappear

it would be a helluva time saver if i could run a script that would go in and insert a solid 10 sec black between each video clip

is this something that is possible with vt script??

doc

PIZAZZ
06-09-2006, 09:56 AM
I am trying to figure out if it is possible to make a script that will drop the solid color black for 10 seconds in between a project full of clips -

this is something i do very often - i make a load-in disc for our production guys with a bunch of short elements that have to be re-captured on the playback system and i usually have to put 10 secs of black so they can pause/play the dvd player and give it enough time to have the "play" text disappear

it would be a helluva time saver if i could run a script that would go in and insert a solid 10 sec black between each video clip

is this something that is possible with vt script??

doc

Doc, having done hundreds of events just like you describe...those were the days.... If you are using Sony DVD players, you can get past the onscreen display by pressing the Pause button instead of the Play button. You get no display then. Also some of the newer Sony decks allow you to completely disable the onscreen display. Look in the setup menu for the DVD player. Of course you will most likely have to re-setup the menu every time you plug and unplug the DVD player. Just some thoughts.

On to your question about VT Script. You should be able to do what you asked. I unfortunately do not have any time to test some ideas right now. i will put it on my list though.

doc debolt
06-09-2006, 01:06 PM
hehehe, yah - unfortunately the dvd players that we use for load in are cheapy players that you cannot turn that lovely feature off of -

Welp, i will dig a bit deeper into the scripting - since you say it should be possible - i'll see what i can come up with.....

if anyone else has any pointers on this - any direction would be greatly appreciated.

Thanx!

doc:thumbsup:

Aussie
06-09-2006, 06:19 PM
Yes you can doc. Here are the comments for each code line needed. Definitely do this in Storyboard only though. Timeline will easily mess this up.

//---- Set variable to store desired length
MyLength = 0.0

//---- Set variable to hold black file & path
Black = "V:ColorBlack.tga"

//---- Requestor gets desired length of black from user, or else cancel
a = Req_Buttons(" This tool will insert a Black clip \n between each clip in your Storyboard. \n It looks for a file at V://Black.tga\n\n Select the length of black you desire", "Insert Black", "2 sec", "5 sec", "10 sec", "Cancel")

switch(a)
{
case 1 MyLength = 2.0
case 2 MyLength = 5.0
case 3 MyLength = 10.0
}
if (MyLength > 0)
{

//---- Get number of clips in project
ClipCount = GetNoChildren()

//---- Jump to last clip (always easier to work backwards)
SelectLast(true)

//---- Start loop
for(i=(ClipCount-1), i>0, i=i-1)
{

//---- Go back one clip
SelectPrevChild(true)

//---- Insert Black clip
AddFiles(Black)

//---- Calculate and set length adjustment
AdjustOutPt(true, (MyLength - GetCurrentClipLength()))

//---- Go back one extra clip (jump over the one we just inserted)
SelectPrevChild(true)

//---- Go back start of loop
}

//---- Update Editor
UpdateInOutPanelSel()

//---- Say goodbye
Req_OK(" Wow, that was good for me", "All Done")

}
//---- Exit


If I was doing this as a hotkey, wrap the code like this, to lock it into Storyboard only...

CreateShortCut ("F10", code(
// code goes here <<<<<<
), "OrderedFocus", 1000, "Storyboard_Layout .*")

Then drop it into VT4\Skins\VideoEditor\MainWindow\Main\User Scripts
and it will refresh whenver editor opens

Cheers, Aussie

doc debolt
06-12-2006, 09:32 AM
Aussie!!!

did i ever mention how much you rock!!

thanks a bunch!

Doc

Jim_C
07-10-2006, 11:34 AM
This is good stuff.

Is there a way to alter this to insert a particular clip instead of a black .tga?
Duration would not have to be a variable then obviously.

I have kind of hacked at it, but knowing 0 about scripting I am basically getting nowhere... slowly.

Thanks in advance....

Jim

doc debolt
08-22-2006, 08:12 AM
for some reason - this script is only stepping back once and inserting black - then it is giving an invalid syntax - im trying to track down why, but am lost, any thoughts?

doc debolt
08-22-2006, 02:44 PM
i figured out - it is invalid syntax'ing on the following line

//---- Calculate and set length adjustment
AdjustOutPt(true, (MyLength - GetCurrentClipLength()))

any thoughts as to why??