-
Not working – Region text to be the file name in a batch render
Posted by Craig Scime on January 19, 2008 at 8:43 pmI have been spending hours and racking my brain, trying to get the region text, and only the region text to show as the file name for a batch render, for each rendered file.
I have read all the posts here and on sony’s site about this, but nothing sugested works. I am running vegas 7 and every time I try modifing the scripts i am only left with errors.
Beleive me I have wasted way to much time on this, but if I can get it to work it would really be great as I edit 15 samll clips for my client regularly and put a differt title in each region, then batch render all the clips.
Also if their is a program that will do this too I would consider that too, but if it is easy as a script, or if you have the script, I would love to share it.
thanks Craig
Daniel Payne replied 15 years, 2 months ago 6 Members · 18 Replies -
18 Replies
-
Edward Troxel
January 19, 2008 at 11:41 pmIf you’re rendering regions, you should see a line of code like this:
String regionFilename = String.Format(“{0}[{1}]{2}”,
filename,
regionIndex.ToString(),
renderItem.Extension);At this point, you should get a filename which begins with a base filename plus the region number. Instead, you want to combine the PATH of the filename plus the NAME of the region which could be done like this:
String regionFilename = String.Format(“{0}\\{1}{2}”,
Path.GetDirectory(filename),
region.Label,
renderItem.Extension);The above will take the path of the base filename, add the necessary backslash, and then add the label of the region name. See if this works for you.
-
Craig Scime
January 21, 2008 at 11:29 pmThanks ed for trying to help but I am still not have any luck. I went into the program files in vegas, then script menu, made a copy of the batch render file (so I would not ruin the working file), then I copied the text as you had, but as soon as I click on file under scripting in vegas i get an error this is what I have, I have even kept it lined up like it was under the “, (can’t show exactly below due to space:
// need to strip off the extension’s leading “*”
String regionFilename = String.Format(“{0}[{1}]{2}”,
Path.GetDirectory(filename),
region.Label,
renderItem.Extension);
// Render the regionWHat am I doing wrong??????
-
Edward Troxel
January 22, 2008 at 2:49 pm -
Craig Scime
January 22, 2008 at 4:46 pmthank you ed for you time and patience, however i am still not having any luck, and I thought I was very good with this stuff. I am getting this error:
C:\Program Files\Sony\Vegas 7.0\Script Menu\Copy of Batch Render.cs(93) : ‘System.IO.Path’ does not contain a definition for ‘GetDirectory’C:\Program Files\Sony\Vegas 7.0\Script Menu\Copy of Batch Render.cs(95) : ‘EntryPoint.RenderItem’ does not contain a definition for ‘Extension’
…and here is what i have in the script
String regionFilename = String.Format(“{0}\\{1}{2}”,
Path.GetDirectory(filename),
region.Label,
renderItem.Extension); -
Craig Scime
January 22, 2008 at 5:38 pmI must be a retard, ugh.
Down to one error:C:\Program Files\Sony\Vegas 7.0\Script Menu\Copy of Batch Render.cs(95) : ‘EntryPoint.RenderItem’ does not contain a definition for ‘Extension’
this is what I currently have:
String regionFilename = String.Format(“{0}\\{1}{2}”,
Path.GetDirectoryName(filename),
region.Label,
renderItem.Extension); -
Edward Troxel
January 22, 2008 at 6:14 pm[craig scime] “MenuCopy of Batch Render.cs(95) : ‘EntryPoint.RenderItem’ does not contain a definition for ‘Extension'”
WHAT is on line 96? In the original file, it is this:
status = DoRender(regionFilename, renderItem, region.Position, region.Length);
What is on YOUR line 96? It seems to be you might possibly have a capital “R” instead of a lowercase “r” on one of your “renderItem” variables?
-
Craig Scime
January 22, 2008 at 6:39 pmString regionFilename = String.Format(“{0}\\{1}{2}”,
Path.GetDirectoryName(filename),
region.Label,
renderItem.Extension);
// Render the region
status = DoRender(regionFilename, renderItem, region.Position, region.Length);
if (RenderStatus.Canceled == status) break;
regionIndex++; -
Craig Scime
January 22, 2008 at 6:45 pmhi ed thank again… do you have the script or know where one is posted that works and does what I need it to do?
-
Edward Troxel
January 22, 2008 at 7:21 pmHere it is:
https://www.jetdv.com/scripts/BatchRender-Regions.cs
It contains exactly the changes I gave you above. Just run it, pick the output type you want, pick a default folder (just leave the “untitled” file name – it will be ignored) and you’ll end up with a bunch of files in that folder – one named for each region name.
Reply to this Discussion! Login or Sign Up
