Tutorial: Page (1) of 2 - 07/07/05 Email this story to a friend. email article Print this page (Article printing at MyDmn.com).print page facebook
How to Use Scripts in Sony Vegas Software By Douglas Spotted Eagle

Sony Vegas Software has offered a powerful user-controlled function since Sony Vegas 4.0 known as "scripting." Scripting allows Visual Basic/Javascript-savvy users the ability to develop custom tools that work inside Sony Vegas, drawing on the tools and resources found inside the Vegas software application. For example, a script might take dozens of mundane or repetitive tasks and put all tasks under a single button push, making it a single step to accomplish several tasks at once. A good example might be the Normalizing script, which allows users to select a single or multiple audio events and normalize all of them at one button selection. Another excellent example of scripting is the Aspect Ratio script, which will take images of all aspect ratios and apply the proper Pan/Crop aspect to the images or video so that they match the aspect ratio of the entire video project. This alone can save hundreds or thousands of individual keystrokes, which results in saving tremendous amounts of time. If a single script shaves a few minutes from a single project, over the course of a year this can result in the savings of hundreds of hours. As an example of a purchased script-based tool, Ultimate S from VASST will:

  • Match Aspect Ratio of all video, graphics, or stills to the project aspect ratio regardless of source aspect ratio
  • Place said matched images on a marker so that the images can match cut points or beat points in music
  • Pan/Crop/Zoom, add motion to stills, graphics, or video with user-specified targets
  • Automatically insert specified or random transitions to every image
  • Grab files from Timeline, Bin, or Windows Explorer location
  • ....all with the selection of one button. Imagine being able to process 9,999 video clips or still images that fast! This is just one small example of what can be done with scripting inside Sony Vegas software.

Scripts come in a couple flavors; there are free scripts that are downloadable from a variety of sources, and there are assembled scripting tools that are for-purchase.

Scripts are not difficult to create if you have an understanding of Visual Basic, Javascript, or tools associated with this sort of code work. There are literally hundreds of scripts available for Sony Vegas, and there are dozens of script writers that can author custom scripts for a specific workflow need or functionality. Here, you'll find lots of free scripting options for Sony Vegas. However, you might find that your quite satisfied with the dozens of free or purchased scripts that have been created by a number of authors, rather than diving into the learning curve of Visual Basic or Javascript.


The scripts that may be downloaded from various websites are often packaged as .txt files for purposes of avoiding challenges with various browsers, email clients, or download restrictions, because scripts, as .js files, can be used for harmful or malicious purposes if you don't know the author or contents of the script. This tends to confuse some users of scripts, as they don't know exactly how to manage scripts if they're found in .txt format. Have no fear, dealing with these .txt files is easier than you might think. Before using scripts in Sony Vegas, you'll need the latest version of Microsoft's .Net application, which should have been installed prior to installing Sony Vegas. You can also download the .Net software from the Microsoft website.

Installing a Script to Vegas:

To use scripts that are stored on the web as .txt files, do the following:

1. Download the script in its .txt (text) format.
2. Right click the file and choose "Open With" and designate Microsoft Notepad as the application to open the script.
3. In Notepad, the text will open up and you'll be able to read the contents. Be sure that the contents are related to Sony Vegas, and you'll usually see the words "Sony Vegas" somewhere in the first few lines of the script text.
4. In Notepad, browse to File>Save As, and save the .txt file as a .js file, rather than a .txt file format. Save this file in your C:Program FilesSonyVegas6.0 (or Vegas 5.0) Script Menu folder. This will allow Sony Vegas to see the scripting information, and it will then be visible in Sony Vegas, and available for your use. You can also save the file to the desktop or other location, and then copy/paste the .js file to the Sony Vegas Script Menu folder

Downloading Scripts
When you download a script, it is usually either a .zip file, a .js file, or a .txt file. If you open the unzipped file, the .js file, or the .txt file, you'll see something like the simple script for removing all timecode,  found below:

/**
* This script will remove all effects of a particular type from items
* in the project's media pool.
*
* Revision Date: Jan. 30, 2003
**/
import System.Windows.Forms;
import Sony.Vegas;

// This is the full name of the plug-in associated with the effects
// you want to remove.
var plugInName = "Sony Timecode";

try {
var mediaEnum = new Enumerator(Vegas.Project.MediaPool);
while (!mediaEnum.atEnd()) {
var media = mediaEnum.item();
var effectsEnum = new Enumerator(media.Effects);
while (!effectsEnum.atEnd()) {
var effect = effectsEnum.item();
if (plugInName == effect.PlugIn.Name) {
media.Effects.Remove(effect);
}
effectsEnum.moveNext();
}
mediaEnum.moveNext();
}
} catch (e) {
MessageBox.Show(e);
}

In this folder, there are both free and purchased scripts. the free scripts are single scripts that are not executable files, but rather .js files that Vegas simply sees as part of the Tools>Script options.

If you wish, you can copy/paste the script text seen above, opening it in Notepad, and saving it off as described above. In fact, in the Sony Vegas forums, you'll often find custom scripts posted as part of a thread, and you'll want to copy/paste that text information to Notepad so you can save it for later use in Sony Vegas. 

Page: 1 2 Next Page


Related Sites: Digital Producer ,   Digital Video Editing ,   Audio Video Producer ,   BN - Broadcast Newsroom ,   Corporate Media News ,   Digital Post Production ,   DV Format ,   Presentation Master ,   Oceania ,   Vegas ,   BN - NAB ,   BN - IBC ,   BN - Software ,   BN - Sony
Related Newsletter: DMN Newsletter ,   Timeline Newsletter ,   KNews Newsletter ,   Digital Media Net ,   DMNForums ,   Tutorial Finder
To Comment on This Article, Click HERE

Most Recent Reader Comments:
  • How to Use Scripts in Sony Vegas Software by DMN Editorial at Jul. 07, 2005 8:01 pm gmt (Rec'd 4)

    Click Here To Read All Posts
    Must be Registered to Respond (Free Registration!!!, CLICK HERE)

  • DMO TEXT LINKS
    (Click here to place a textlink on this site)

    Vegas Pro 8 + Free Vegas Seminar Series
    Master classes for cutting-edge video production
    A $100 value free with purchase
    CLICK HERE!!!

    Keep your camera rolling with Sony Mobile Storage for XDCAM EX Camcorders.
    Offload SxS memory cards onto 240GB HDD removable cartridges and accelerate your workflow on the go.
    Click Here!!!

    AV-HS450 16+ Input HD/SD Switcher w/ dual screen MultiViewer
    This 16+ input switcher is the best value in its class.
    Its exclusive dual screen MultiViewer lets you view up to 20 windows on just two displays.
    CLICK HERE!!!


    video editing books
    Making Documentary Films and Videos
    By , start from $ 11.96
    Making Documentary Films and Reality Videos
    By , start from $ 2.99
    Really, Really, Really Easy Step-by-Step Guide to Creating & Editing Digital Videos Using Your Computer
    By , start from $ 5.75
    Video Editing and Post-Production
    By , start from $ 3.00
    Nonlinear
    By , start from $ 9.41
    Video Field Production And Editing
    By , start from $ 75.80
    HOT THREADS on DMN Forums
     Rss  Add to Google Reader or
Homepage    Add to My AOL  Add to Excite MIX  Subscribe in
NewsGator Online 
    Real-Time - what users are saying - Right Now!
        • Re: Reverse Mode in Vegas 9 • gspencer
        • Re: The volume envelope stretching challenge! • Eddie MacArthur
    Dexim P-Flip Power Play Dock for iPhone/iPod touch
    polymer battery all in one neat device. Plug the P-Flip into your computer to charge its battery, then plug your iPhone into the P-Flip, and it charges the iPhone battery. Read More
    Apple Intros iPad
    After years of hype, Apple, Inc. today introduced the iPad, a portable computing device that looks like a big iPhone. Introduced today by Apple CEO Steve Jobs, the iPad features a touchscreen keypad, wireless capability, the capability to run all iPhone applications, all in a form factor that fits in between an iPhone and a MacBook. With the iPad, you can play movies, load maps, view photos, update your calendar, basically do the same things as on an iPhone, and more. Read More
    HDTV Buyer's Guidelines
    When it comes to choosing between Plasma and LCD, it's important to shop in the mindset that one high-def TV is not necessarily better than another - rather, it's a question of which one is right for you. That said, it can be a tough call to make when all that meets the eye are sleek screens and vibrant pictures - are Plasmas and LCDs really that different? Read More
    Tritton AX 180 universal gaming headset
    The Tritton AX 180 universal gaming headset is designed to work with the three major gaming platforms (Wii, xBox 360, and Sony PlayStation 3, via analog inputs), but also with both Macintosh and Windows based computers. Read More
    @ Copyright, 2010 Digital Media Online, All Rights Reserved