I suspect Excalibur or Ultimate S will probably already do what you're wanting to do. Or you could download a free snapshot script and modify it for your purposes.
can you help me modify this script to name snaphot on actual region at cursor position?
im not able do this :(
/*******************************************
* This script will save a snapshot from the timeline
*
* Written By: Edward Troxel - partially modified from the script by Joe Satcher
* www.jetdv.com
*******************************************/
// Where should the file be saved?
var destdir = "C:\\";
// What is the file name?
var destname = "MyPic";
// Save the current settings
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;
try {
var imageFileName = destdir + destname + ".png";
// Set for the best quality.
Vegas.Project.Preview.RenderQuality = VideoRenderQuality.Best;
Vegas.Project.Preview.FullSize = true;
Vegas.Project.Video.FieldOrder = VideoFieldOrder.ProgressiveScan;
Vegas.Project.Video.DeinterlaceMethod = VideoDeinterlaceMethod.InterpolateFields;
// Show the script's dialog box.
var dialog = new SaveFileDialog();
dialog.Filter = "PNG File (*.png)|*.png|JPEG File (*.jpg)|*.jpg";
dialog.CheckPathExists = true;
dialog.AddExtension = true;
if (Directory.Exists(destdir)) {
dialog.InitialDirectory = destdir;
}
dialog.DefaultExt = Path.GetExtension(imageFileName);
dialog.FileName = Path.GetFileNameWithoutExtension(imageFileName);
// if the OK button was pressed...
if (dialog.ShowDialog() == DialogResult.OK) {
// Get the basis for output image file names
imageFileName = Path.GetFullPath(dialog.FileName);
// Get the output image file name extension
var imageFileNameExt = Path.GetExtension(imageFileName);
var imageFormat = ImageFileFormat.PNG;
if (0 == String.Compare(imageFileNameExt, ".jpg", true)) {
imageFormat = ImageFileFormat.JPEG;
}
// save a snapshot.
if (Vegas.SaveSnapshot(imageFileName, imageFormat, Vegas.Cursor) == RenderStatus.Complete) {
Vegas.UpdateUI();
}
}
} catch (e) {
MessageBox.Show(e);
}
// 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;
// Snapshot at markers
// by Gilles Pialat
// 07/25/2008
using System;
using System.IO;
using System.Text;
using System.Drawing;
using System.Reflection;
using System.Diagnostics;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Sony.Vegas;
Rosebud, one thing I would add would be changing the preview mode to "Best (Full)" automatically in the script. You might also want to change the interlacing mode to Progressive automatically as well. At the end of the script, it should - obviously - reset them back to where the user originally had them set.
Ok, new version with Edward suggestion.
(personally, I prefer to set those options manually).
// Snapshot at markers
// by Gilles Pialat
// 07/25/2008
using System;
using System.IO;
using System.Text;
using System.Drawing;
using System.Reflection;
using System.Diagnostics;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Sony.Vegas;
thank you very much , but i have little problem
i have few regions (named) and each include one marker.
need make snapshot at marker(now work pretty nice) and name it after region .
try this one (your markers must to be in a region) :
// Snapshot at markers (Special version for PK77)
// by Gilles Pialat
// 07/28/2008
using System;
using System.IO;
using System.Text;
using System.Drawing;
using System.Reflection;
using System.Diagnostics;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using Sony.Vegas;