Comments

baysidebas wrote on 1/2/2008, 10:52 AM
I'm not going to address the script question, but if you insert markers at the cursor on the timeline [press M], you can render the video in one action with the markers being treated as chapter markers in DVDA. Just make sure that in the render as dialog you have "Save project markers in media file" checked.
johnmeyer wrote on 1/2/2008, 10:55 AM
Here's one of Ed's scripts. I use it all the time.

/**
* This script will add markers between all events on the selected track
*
* Written By: Edward Troxel
* www.jetdv.com/tts
* 04/02/2003
**/

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


try {
var zeroMark : Timecode = new Timecode(0);
var myMarker : Marker;

//Find the selected event
var track = FindSelectedTrack();
if (null == track)
throw "no selected track";

var eventEnum = new Enumerator(track.Events);
while (!eventEnum.atEnd()) {
var evnt : TrackEvent = TrackEvent(eventEnum.item());

if (evnt.Start >= zeroMark) {
//Put a marker at the start point
if ( !MarkerExist(evnt.Start.ToMilliseconds()) ) {
myMarker = new Marker(evnt.Start);
Vegas.Project.Markers.Add(myMarker);
}
}

eventEnum.moveNext();
}



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


function FindSelectedTrack() : Track {
var trackEnum = new Enumerator(Vegas.Project.Tracks);
while (!trackEnum.atEnd()) {
var track : Track = Track(trackEnum.item());
if (track.Selected) {
return track;
}
trackEnum.moveNext();
}
return null;
}



// Function to check if there is a marker at timecode passed to this function
// Timecode (dStart) must be in milliseconds
function MarkerExist (dStart) : boolean {

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

while (!fmarkerEnum.atEnd()) {
var fMyMarker = fmarkerEnum.item();
var fMarkerStart = fMyMarker.Position.ToMilliseconds();
if ( dStart == fMarkerStart ) {
return 1;
}

fmarkerEnum.moveNext();

} // End while fmarkerEnum

return 0;
}
JohnnyRoy wrote on 1/2/2008, 11:35 AM
Hi Patrick, I believe you already have Ultimate S2 which does this from the Markers tab. Just use Place Markets at Events under Create Markers. You can even supply a base name for the chapters and US2 will add sequential numbers for you.

~jr
p@mast3rs wrote on 1/2/2008, 11:38 AM
Awesome guys. Just what I was looking for. I wonder if these chapters will work for H.264 AVC encoded files and better yet, if there are any players that will recognize chapter markers in these encoded files. Either way, much thanks.