![]() |
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 |
Tools - scripting - Batch Render
|
It's already built into Vegas Pro 8.
Tools - Scripting - Batch Render. The option to render regions comes up when you run the script. |
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??
|
Excalibur can convert the markers to regions for you.
|
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.
|
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; } |
Quote:
~jr |
All times are GMT -6. The time now is 02:44 AM. |
DV Info Net -- Real Names, Real People, Real Info!
1998-2025 The Digital Video Information Network