DV Info Net

DV Info Net (https://www.dvinfo.net/forum/)
-   What Happens in Vegas... (https://www.dvinfo.net/forum/what-happens-vegas/)
-   -   Rendering Multiple Clips (https://www.dvinfo.net/forum/what-happens-vegas/434330-rendering-multiple-clips.html)

Jeff Dillon September 24th, 2009 11:25 AM

Rendering Multiple Clips
 
I have a single project, about an hour and a half long, with about 30 chapter markers. I want to render each region separately to make them web ready, as <region name>.wmv (or the appropriate format). Sounds like a good job for scripting? I'm a C# developer at Microsoft, but to be honest, I haven't looked at Vegas scripting yet, maybe it's time! Does Excalibur or similar already have this built in, by chance?

Jeff

Edward Troxel September 24th, 2009 11:36 AM

Tools - scripting - Batch Render

Mike Kujbida September 24th, 2009 11:38 AM

It's already built into Vegas Pro 8.
Tools - Scripting - Batch Render.
The option to render regions comes up when you run the script.

Jeff Dillon September 24th, 2009 11:57 AM

Ah, got it. I just learned the difference between a Marker, and a Region. I have chapter markers placed, not regions. So, any script to create regions based on markers??

Edward Troxel September 24th, 2009 12:02 PM

Excalibur can convert the markers to regions for you.

Mike Kujbida September 24th, 2009 12:26 PM

If you don't have Excalibur and can't find a script to do this, double-click between each set of markers in the area just above the timeline and press R to create a region.

Mike Kujbida September 24th, 2009 12:34 PM

I knew I had one lying around on my hard drive somewhere :-)
Thanks to John Meyer for this script.

Copy everything below and save it as MarkersToRegions.js



/**
* This script will convert markers to regions.
* The original markers are left intact.
*
* The script ignores all markers beyond the last event.
*
* By John Meyer 12/8/2003
*
**/

import System;
import System.IO;
import System.Windows.Forms;
import Sony.Vegas;

var MyRegion : Region;
var PrevMarker : Marker;
var RegionStart : Timecode;
var RegionEnd : Timecode;

try {

var markerEnum = new Enumerator(Vegas.Project.Markers); // Start going through all the markers
PrevMarker = markerEnum.item(); // Remember first marker

while (!markerEnum.atEnd()) { // Keep going until last marker

markerEnum.moveNext(); // Get next marker

if (markerEnum.atEnd()) { // If no more markers (we're almost finished),
RegionEnd = Vegas.Project.Length; // get timecode at end of project
}

else {
RegionEnd = markerEnum.item().Position; // Get timecode for current marker
}


RegionStart = PrevMarker.Position; // Regions starts at previous marker.
var RegionName = PrevMarker.Label; // Name the region using previous marker's name.

// The RegionExist function checks if a region already exists at this point.
if (!RegionExist(RegionStart.ToMilliseconds(),RegionEnd.ToMilliseconds() ) ) {
MyRegion = new Region(RegionStart,RegionEnd - RegionStart,RegionName);
Vegas.Project.Regions.Add(MyRegion); // Add the new region
}

if (markerEnum.atEnd()) break; // If out of markers, quit.

// If last marker is equal to or beyond the end of the project, stop here.
if ( Vegas.Project.Length.ToMilliseconds() <= markerEnum.item().Position.ToMilliseconds() ) {
break;
}

else {
PrevMarker = markerEnum.item(); // Remember this marker for next loop.
}

}

} catch (e) {
MessageBox.Show(e);
}


function RegionExist(dStart,dLength) : boolean {

var fmarkerEnum = new Enumerator(Vegas.Project.Regions);

while (!fmarkerEnum.atEnd()) {
var fRegion = fmarkerEnum.item();
var fRegionLength = fRegion.Length.ToMilliseconds();
var fRegionStart = fRegion.Position.ToMilliseconds();

if ( (dLength == fRegionLength) && (dStart == fRegionStart) ) {
return 1;
}
fmarkerEnum.moveNext();
}
return 0;
}

John Rofrano September 27th, 2009 08:48 AM

Quote:

Originally Posted by Jeff Dillon (Post 1392845)
Does Excalibur or similar already have this built in, by chance?

I see Edward already answered for Excalibur but VASST Ultimate S Pro can not only convert the markers to regions but it can also do the batch rendering without the need to do the conversion at all. The batch renderer in Ultimate S Pro will render between Markers (as well as within Regions).

~jr


All times are GMT -6. The time now is 05:47 PM.

DV Info Net -- Real Names, Real People, Real Info!
1998-2024 The Digital Video Information Network