-
batch render file naming question
Posted by Steven J casey on January 11, 2007 at 5:50 pmI have a track of voiceovers that I need to split up to synchronize with a Breeze presentation. I have regions marked for the divisions of each page of the script and want to batch render into separate files with the region names becoming the file names. I’m missing a step somewhere because the file names end up really long (i.e. sdWave (Microsoft)_Default Template[1].wav) What I want is just 01.wav, 02.wav, etc. As usual, this is probably an easy answer but I’m missing it somehow. Any help is appreciated.
tia,
stevenEdward Troxel replied 18 years, 6 months ago 3 Members · 7 Replies -
7 Replies
-
Edward Troxel
January 11, 2007 at 7:27 pm -
Steven J casey
January 11, 2007 at 8:58 pmAny details on doing that? It seems to me that the dialog box would simply have the option of naming the file in accordance with the region label.
-
Edward Troxel
January 11, 2007 at 9:55 pmYou’ll either have to physically change that script or use some other script that works the way you want. There are MANY batch rendering scripts out there.
Assuming you’re looking at the batch script that came with Vegas, you’ll need to find this area:
String regionFilename = String.Format(“{0}[{1}]{2}”,
filename,
regionIndex.ToString(),
renderItem.Renderer.FileExtension.Substring(1));The easiest way would be to just change that to read something like:
String regionFilename = String.Format(“{1}{2}”,
regionIndex.ToString(),
renderItem.Renderer.FileExtension.Substring(1));If you want it to be named for the names of the regions, change it to:
String regionFilename = String.Format(“{1}{2}”,
region.Label,
renderItem.Renderer.FileExtension.Substring(1)); -
Flyingaudio
October 29, 2007 at 11:48 amI am using Vegas 7 and tried the two modifications to “Batch Render” listed above, but the script always errors out. I created two copies and modified them. I went through my changes several time to confirm. I simply need the Region Name for the filename. What am I missing?
-
Edward Troxel
October 29, 2007 at 2:24 pm -
Flyingaudio
October 29, 2007 at 11:26 pmThe changes I made to the included “Batch Render.cc” are included below:
foreach (Sony.Vegas.Region region in myVegas.Project.Regions) {
// need to strip off the extension’s leading “*”
String regionFilename = String.Format(“{1}{2}”,
region.Label,
renderItem.Renderer.FileExtension.Substring(1));
// Render the regionThe following error occurs after I execute the script and choose a format and pick a location.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at EntryPoint.DoBatchRender(ArrayList selectedTemplates, String basePath, RenderMode renderMode)
at EntryPoint.FromVegas(Vegas vegas)
— End of inner exception stack trace —
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sony.Vegas.ScriptHost.ScriptManager.Run(Assembly asm, String className, String methodName)
at Sony.Vegas.ScriptHost.CodeDomScriptManager.Run()
at Sony.Vegas.ScriptHost.RunScript(Boolean fCompileOnly) -
Edward Troxel
October 30, 2007 at 3:53 pm
Reply to this Discussion! Login or Sign Up
