Auto save still images

Bethany wrote on 5/7/2003, 2:52 PM
I'm working on a project where I have laid down 100+ markers marking the stills I want to save out so I can then move them around and work with each independently to create a stop motion effect. Is there a way to select something like "Save all markers"? The names of the .jpg's or .png's are irrelevant. If this feature isn't available, I don't know of a way to do this other than to save each individually which will take me hours. Any suggestions?

Comments

jetdv wrote on 5/7/2003, 3:13 PM
You will have to write a script but it is doable.
mikkie wrote on 5/7/2003, 3:25 PM
It's a bit cludgy, but view menu -> view edit details. Not sure how well it works in VV4b, but in the past I've copied this list of markers and pasted it into notepad to work with.
Bethany wrote on 5/7/2003, 3:33 PM
Jetdv, I haven't the faintest about writing scripts, so I'm afraid that won't do me any good. Thanks for the suggestion though.

Mikkie, are you just keeping track of the timecode in Edit Details, or are you actually saving out individual .png's that way? I need to be able to save out stills so I can import them into Photoshop and muck them up a bit before bringing them back into Vegas.

FuTz wrote on 5/7/2003, 3:45 PM
Bethany: just check out at the sonic foundry site cause I know there's already some scripts there (somewhere). They were done with/for the launch of Vegas 4 and concerning how to use it if you find one that seems to work for you, just have a look at the "light V4 manual" (http://www.sonicfoundry.com/products/vegas4.pdf) and there you'll find the method how to use scripts; if my rememberance is good, it's not as complicated as it seems to run a script).
You can also try the Script Forum: http://www.sonicfoundry.com/forums/ShowTopics.asp?ForumID=21
jetdv wrote on 5/7/2003, 3:51 PM
Here is a script that will do what you want. It just took a little time to write it. Just copy everything between the lines, paste it into notepad, and save it as "ThumbnailAtMarker.js". You can run the script by choosing Tools, Scripting, Run Script... and picking the file you just saved. It will save as Pic####.jpg for each marker (the first marker will be pic0001.jpg, the second pic0002.jpg....)

If necessary, the .NET Framework will have to be installed. It can be downloaded from Microsoft.

Script starts here
------------------------------

/**
* This script will create a thumbnail at each marker on the selected track
* They will be placed in the "StoragePath" subdirectory and stored in JPEG format.
* The base name of the thumbnail is "PIC" followed by a number.
*
* Written By: Edward Troxel
* www.jetdv.com/tts
* Modified: 05-07-2003
**/


import System.Windows.Forms;
import SonicFoundry.Vegas;
import System.IO;
import Microsoft.Win32;



try {
// The first thing this script does is save off the preview & project
// settings that will be set later. This is so they can be restored
// after the script is complete.
var origPreviewRenderQuality = Vegas.Project.Preview.RenderQuality;
var origPreviewFillSize = Vegas.Project.Preview.FullSize;
var origFieldOrder = Vegas.Project.Video.FieldOrder;
var origProjectDeinterlaceMethod = Vegas.Project.Video.DeinterlaceMethod;
var currentTime = Vegas.Cursor;


//Enter the path here - below represents D:\VMedia. NOTE: \\ = \ when entering path names!
var StoragePath = "D:\\VMedia"
var i = 1;
var currMark;

var track = FindSelectedTrack();
if (null == track)
throw "no selected track";

// Set the preview quality and size.
Vegas.Project.Preview.RenderQuality = VideoRenderQuality.Best;
Vegas.Project.Preview.FullSize = true;

// Set the field order and deinterlace method
Vegas.Project.Video.FieldOrder = VideoFieldOrder.ProgressiveScan;
Vegas.Project.Video.DeinterlaceMethod = VideoDeinterlaceMethod.InterpolateFields;

//Go through the list of Markers
var mrkEnum = new Enumerator(Vegas.Project.Markers);
while (!mrkEnum.atEnd()) {

currMark = Marker(mrkEnum.item()).Position;

var nameadder = i.toString();
if (i < 1000) {
nameadder = "0" + i.toString();
}
if (i < 100) {
nameadder = "00" + i.toString();
}
if (i < 10) {
nameadder = "000" + i.toString();
}

var FullFileName = Path.Combine(StoragePath, "Pic" + nameadder + ".jpg")

// save a snapshot. The SaveSnapshot method returns a
// member of the RenderStatus enumeration. If the user
// hits the escape key or quits the app, exit the loop.
if (Vegas.SaveSnapshot(FullFileName, ImageFileFormat.JPEG, currMark) == RenderStatus.Complete) {
Vegas.UpdateUI();
}

i++;
mrkEnum.moveNext();
}


// restore the project and preview settings
Vegas.Project.Preview.RenderQuality = origPreviewRenderQuality;
Vegas.Project.Preview.FullSize = origPreviewFillSize;
Vegas.Project.Video.FieldOrder = origFieldOrder;
Vegas.Project.Video.DeinterlaceMethod = origProjectDeinterlaceMethod;
Vegas.Cursor = currentTime;

Vegas.SaveProject("D:\\STest.veg");

} 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;
}




--------------------------------------------
Script is over
Bethany wrote on 5/7/2003, 4:58 PM
Wow!! Thank you soooo much! You rock!!