9Go and 1,4Go clips: best way to splice into normal clips?

FuTz wrote on 5/29/2003, 8:25 PM
I recently got a little problem that led me to have no choice but get these long clips (cam had no clock so VidCap's clips detection wouldn't work).
Now that I'm stuck with those, what would be the most efficient way to split everything into normal clips, ie where I actually *cut* when recording?
I remember seeing somebody using the Regions function for a similar purpose but is that the most efficient/simple way to go since using the Trimmer won't allow me to rename or simply *remake* clips? And I went in Help section and this Regions option seems... well... is it the only option for my problem?
Do I have to split clips on timeline and render each one? (say it ain't so!)
Maybe a script using markers or split points?

Thanks in advance for suggestions :)

P.S.: yes, you can laugh... feels like having a piece of scotch tape on each finger and trying to get rid of those!

Comments

kameronj wrote on 5/29/2003, 9:32 PM
There are a ton of different ways you can go about this - if you want to do it outside of Vegas...download one of about a billion file splitters that are available for Freeware or Shareware.

I'm playing with one now called "Easy Video Splitter". You can tell it where to split your files, split it by time, or split it by number of files you want to end up with.

Check it out.
jetdv wrote on 5/29/2003, 10:58 PM
I have just written a script that will render between marker points. See this link: http://www.sonicfoundry.com/forums/ShowMessage.asp?MessageID=186499&Replies=9&Page=1

If it does not get posted in the morning, post your e-mail address and I will send it to you.
FuTz wrote on 5/30/2003, 7:43 AM

Kameronj: currently trying the app. Works very well. Minor bug though: if I just pass my pointer over the "play from start" icon, it goes there (start point) without me actually *clicking* the icon. But I figure out if I reboot (I just installed without rebooting since it asked me if I wanted to launch the app right now) it will fix by itself... Overall it's very OK for me and I just need it for a few hours so I won't need to buy the app (7 days trial). Thanks for the tip!

Jetdv: will I be able to splice as many clips I want since Markers only go from 1 to 10 ?
jetdv wrote on 5/30/2003, 9:00 AM
Numbered markers only go from 1 to 10. However, you can put in as many markers as you desire. Put in 199 markers, you'll get 200 clips!
kameronj wrote on 5/30/2003, 9:39 AM
Kewlness. Glad I could offer it.

Kam
FuTz wrote on 5/30/2003, 9:49 AM
Jetdv: great! and the new clips will be automatically renumbered (thus avoiding to name each and every one)?
jetdv wrote on 5/30/2003, 9:53 AM
Yes, they will be numbered 1, 2, 3, 4, ...

(At this point, the will NOT be numbered 01,02,03 so you will get 1, 10, 11, 2,....)
FuTz wrote on 5/30/2003, 9:55 AM
Way to go. No big deal renaming 9 files and just put a "0" before the numbers...
I'm getting the script! :D
FuTz wrote on 5/30/2003, 9:58 AM
Oops... still not there to download. I'll try again this afternoon (NYC time)...
I'm eager to finally try using a script in V4...
jetdv wrote on 5/30/2003, 10:05 AM
Since it seems to be taking longer than normal for Kathlyn to post the script....

Here it is. Just copy and paste it into Notepad and save it as

RenderOnMarkers.js



/**
* This script will render between markers
*
* Written By: Edward Troxel
* www.jetdv.com/tts
* Modified: 05-29-2003
**/

import System;
import System.Text;
import System.IO;
import System.Windows.Forms;
import System.Object;
import SonicFoundry.Vegas;

// here are some default variables for the GUI.
//Path names must use "\\" to indicate a standard path "\"
//so, defaultBasePath refers to D:\renders
var defaultBasePath = "D:\\vmedia\\";

// set this to true if you want to allow files to be overwritten
var overwriteExistingFiles = false;

try {

var mrkEnum = new Enumerator(Vegas.Project.Markers);

var zeroMark = new Timecode(0);
var PrevMark = zeroMark;
var currMark = zeroMark;
var SubClipNum = 1;
var renderStart : Timecode;
var totalLength = Vegas.Project.Length;
var renderLength : Timecode;

var renderer = FindRenderer(/Video for Windows/);
if (null == renderer)
throw "failed to find renderer";

var template = FindRenderTemplate(renderer, /NTSC DV/);
if (null == template)
throw "failed to find template";


//Go through the list of Markers
while (!mrkEnum.atEnd()) {
currMark = Marker(mrkEnum.item()).Position;

renderStart = PrevMark;
renderLength = currMark - PrevMark;
DoRender(defaultBasePath + "test" + SubClipNum + ".AVI", renderer, template, renderStart, renderLength);

PrevMark = currMark
SubClipNum++;
mrkEnum.moveNext();
}

// Do the final clip
renderStart = PrevMark;
renderLength = totalLength - PrevMark;
DoRender(defaultBasePath + "test" + SubClipNum + ".AVI", renderer, template, renderStart, renderLength);

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


// perform the render. The Render method returns a member of the
// RenderStatus enumeration. If it is anything other than OK, exit
// the loops. This will throw an error message string if the render
// does not complete successfully.
function DoRender(fileName, rndr, rndrTemplate, start, length) {
// make sure the file does not already exist
if (!overwriteExistingFiles && File.Exists(fileName)) {
throw "File already exists: " + fileName;
}

// perform the render. The Render method returns
// a member of the RenderStatus enumeration. If
// it is anything other than OK, exit the loops.
var status = Vegas.Render(fileName, rndrTemplate, start, length);

// if the render completed successfully, just return
if (status == RenderStatus.Complete)
return;

// if the user canceled, throw out a special message that won't be
// displayed.
if (status == RenderStatus.Canceled) {
var cancelMsg = new String("User canceled");
cancelMsg.skipMessageBox = true;
throw cancelMsg;
}

// if the render failed, throw out a detailed error message.
var msg : StringBuilder = new StringBuilder("Render failed:\n");
msg.Append("\n file name: ");
msg.Append(fileName);
msg.Append("\n Renderer: ");
msg.Append(rndr.FileTypeName);
msg.Append("\n Template: ");
msg.Append(rndrTemplate.Name);
msg.Append("\n Start Time: ");
msg.Append(start.ToString());
msg.Append("\n Length: ");
msg.Append(length.ToString());
throw msg;
}



function FindRenderer(rendererRegExp : RegExp) : Renderer {
var rendererEnum : Enumerator = new Enumerator(Vegas.Renderers);
while (!rendererEnum.atEnd()) {
var renderer : Renderer = Renderer(rendererEnum.item());
if (null != renderer.FileTypeName.match(rendererRegExp)) {
return renderer;
}
rendererEnum.moveNext();
}
return null;
}

function FindRenderTemplate(renderer : Renderer, templateRegExp : RegExp) : RenderTemplate {
var templateEnum : Enumerator = new Enumerator(renderer.Templates);
while (!templateEnum.atEnd()) {
var renderTemplate : RenderTemplate = RenderTemplate(templateEnum.item());
if (null != renderTemplate.Name.match(templateRegExp)) {
return renderTemplate;
}
templateEnum.moveNext();
}
return null;
}

FuTz wrote on 5/30/2003, 10:09 AM
Copy-pasted it in notepad.
Thanks a LOT Edward!!!
FuTz wrote on 5/30/2003, 2:31 PM
Ok now.
I put the clip on the timeline with all the markers.
Then I go: Tools/Scripting/Run Script... then find "RenderOnMarkers.js" then Open but nothing happens... ?:/
Do I miss something?
jetdv wrote on 5/30/2003, 3:13 PM
You may have to modify the script. Do you have a "D:\VMedia" directory? If not, change the script to point where you want the clips stored. It does work as posted on my computer (however, it is not very smart about knowing WHERE to put the clips). You may need to do some slight editing of the script.
FuTz wrote on 5/30/2003, 3:31 PM

You mean: on the 17th line of the script, I must enter the name of the folder where I want my files to be recorded after the job is done instead of "D: VMedia " ?
jetdv wrote on 5/30/2003, 3:40 PM
Yes. And remember to use TWO slashes to indicate ONE slash in the directory name.

You can also change: DoRender(defaultBasePath + "test" + SubClipNum + ".AVI", renderer, template, renderStart, renderLength);
if you don't want the files named "test"

Also, change: FindRenderTemplate(renderer, /NTSC DV/);
if you are not NTSC.
jetdv wrote on 5/30/2003, 3:51 PM
The script appears to be posted on creativecow now.
FuTz wrote on 5/30/2003, 5:46 PM
Good!
I'll try it and if it doesn't work will go at the Cow
Thanks again.
FuTz wrote on 5/30/2003, 6:05 PM
Mmm... message: "Invalid render length"
jetdv wrote on 5/30/2003, 9:21 PM
Was your first marker at the very beginning or last marker at the very end? If yes, delete that marker. This is a quickie script without a lot of error checking. The first file rendered is from the beginning to the FIRST marker. The last file rendered is from the LAST marker to the end.
FuTz wrote on 5/31/2003, 10:46 AM
Once again, I think you're right on; I DID put markers this way... gonna check it up...
FuTz wrote on 6/1/2003, 9:41 AM

Works like a charm! Thanks !! :)