How to batch render and stretch in Sony Vegas 11 Pro

batch render 300x195 How to batch render and stretch in Sony Vegas 11 Pro

Selecting batch render in Sony Vegas Pro

If you have prepared regions in a video which you wish to output as individual files Sony Vegas Pro has a simple script called “Batch Render” that will do the dirty work for you. However it won’t stretch to fill video for you and if this is a requirement then you need to change the script.

Research reveals Vegas Pro versions before 9 would handle stretching to avoid letterboxing too. However the default installation no longer does. This is how you do it:-

  1. Locate the script directory (usually C:\Program Files\Sony\Vegas Pro 11.0\Script Menu)
  2. Make a copy of “Batch Render.cs” and call it “Batch Render Stretch.cs”
  3. Open the new file in a text editor and find the two lines that begin “args.OutputFile =”. You will find them around line 97 and 106.
  4. Create a new line below them and add “args.StretchToFill = true;” (without the quotes (see below)
  5. Save your changes, refresh the script listing in Vegas and use the new script to render files as before but use this new script instead
  6. After your changes the code should look something like this:-

    if (RenderMode.Regions == renderMode) {
    	int regionIndex = 0;
    	foreach (Sony.Vegas.Region region in myVegas.Project.Regions) {
    		String regionFilename = String.Format("{0}[{1}]{2}",
    				filename,
    				regionIndex.ToString(),
    				renderItem.Extension);
    		RenderArgs args = new RenderArgs();
    		args.OutputFile = regionFilename;
    		args.StretchToFill = true;  // <------------ Add this line
    		args.RenderTemplate = renderItem.Template;
    		args.Start = region.Position;
    		args.Length = region.Length;
    		renders.Add(args);
    		regionIndex++;
    	}
    } else {
    	filename += renderItem.Extension;
    	RenderArgs args = new RenderArgs();
    	args.OutputFile = filename;
    	args.StretchToFill = true;  // <------------ Add this line
    	args.RenderTemplate = renderItem.Template;
    	args.UseSelection = (renderMode == RenderMode.Selection);
    	renders.Add(args);
    }

    If programming’s not your thing you can download a copy of the script ready-made by clicking here.

    If you’re interested in programming Vegas this is a good starter video:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>