Comments

jetdv wrote on 3/26/2004, 1:28 PM
I can give you a workaround:

Add the videos to the timeline
Use the marker wizard in Excalibur to place markers at the beginning of each event
Use the storyboard wizard in Neon to create a series of images based on those marker locations.
ollle wrote on 3/26/2004, 1:41 PM
Thanks, but this is too much work. This has to be automatic. Thanks anyway.

so long
oli
Jsnkc wrote on 3/26/2004, 2:26 PM
I don't think you will find anything, basically becasue it's a video file and it has no idea what frame of each video you want to capture. I usually just drag all the clips on the timeline, select the frame I want and then capture the still image of it.
BillyBoy wrote on 3/26/2004, 10:12 PM
If you can live with the first frame, (assumes you have Windows XP) put every movie in one folder, go to Windows Explorer, change view setting to thumbnail. Windows will open a page full of movies all at once. Then you can use any screen capture application to make a page, something like a contact sheet. Crude, but almost automatic and fast.
ollle wrote on 3/26/2004, 10:44 PM
HHmmm, ACDSee 6.0 makes something similar to this (and to that what i want): it makes 4 screenshots from a video at different times and combine them in one thumbnail. But it is very buggy (not all videos in a folder are processed) and the thumbnails are too small.
Take a look at:
http://www.punkvideos.de/ebay/snap.jpg
so long
oli
BillyBoy wrote on 3/27/2004, 7:47 AM
ACDSee isn't buggy. I've used it for years. You can easily change the size, number of thumnails and make contact sheets printing them out. If some don't open, they were probably made with some weird CODEC.

While I use something else for videos, just for laughs I just opened a folder with a 100 Vegas generated vids in it and ACDSEE generated thumbnails for them all without problem.

Maybe you got a bad install?

It seems you have your thumbnails WAY TOO BIG. Mine are 100x75 and I get 10 across in a row with no problem.
JohnnyRoy wrote on 3/27/2004, 9:22 AM
What exactly are you expecting a screenshot to be? The first frame of each video? Frames at 10 second intervals from each video? And is what format that you want the screenshots to be in? JPG, PNG, BMP? If you could be more specific, I could probably write you a Vegas script that can do this.

~jr
ollle wrote on 3/27/2004, 1:53 PM
Hi JR!
Would be cool. I need 4 frames from each video. Not for the first frame, but what about 4 frames in equal distance. When the video ist 40 minutes long, a screenshot at 5, 15, 25 and 35 minutes or something about that. The file format doesn't matter. Tif, jpeg, anything.
Can a Vegas-script combine these 4 frames to one picture? Can't imagine that...

so long
oli
ollle wrote on 3/27/2004, 1:55 PM
No weird codec, they have all the same format: avi, DivX 5.1.1. The thumbnails have to be bigger than the biggest possible in ACDSee.

so long
oli
JohnnyRoy wrote on 3/28/2004, 7:52 AM
Here is a script that will do what you want. Just drag all of your video files into the timeline without any overlaps. Then run this script and it will take 4 pictures from each file. It assumes each file is one long event so don’t split the clips.

The script uses the media name from the events as the base name for the image files and appends a sequence number to them. It places the images in the same directory as the original media. This will allow you to correlate which images are from which video files.
/** 
* Program: MultiSnapshot.js
* Description: This script will take snapshots of the timeline at regular intervals.
* It borrows heavily from the Sonic Foundry RenderImageSequence script.
* It uses the media names as the base names of the images + a sequence number
* and places them in the same directory as the original media.
* Author: Johnny (Roy) Rofrano john_rofrano at hotmail dot com
*
* Date: March 27, 2004
**/
import System.IO;
import System.Text;
import System.Windows.Forms;
import SonicFoundry.Vegas;
// This is how many snapshots will be taken per event
// Change this number to take more or less shots
var snapshotsPerEvent = 4;
// Uncoment the line below for the image format you require
//var imageFormat = ImageFileFormat.PNG;
var imageFormat = ImageFileFormat.JPEG;
// First save off the preview & project settings that will be set by
// the script so they can be restored when the renders are complete.
var originalPreviewRenderQuality = Vegas.Project.Preview.RenderQuality;
var originalPreviewFillSize = Vegas.Project.Preview.FullSize;
var originalFieldOrder = Vegas.Project.Video.FieldOrder;
var originalProjectDeinterlaceMethod = Vegas.Project.Video.DeinterlaceMethod;
var originalCursor = Vegas.Cursor;
// There is a bug in Vegas.SaveSnapshot that causes it to take the wrong picture
// this flag will fix it in the code. It only needs to be fixed once.
var bugFixForSnapshot : boolean = false;
try
{
var track = FindSelectedVideoTrack();
if (null == track)
{
throw "You must select a video track to get event names from";
}
    // compute the number of digits required to uniquely name each
// file and the corresponding format string.
var renderCountDigits = snapshotsPerEvent.ToString().length;
var imageIndexFormatString = "{0:D" + renderCountDigits + "}";
    // step through all video events on the selected track
for (var evnt in track.Events)
{
// get the base filename from the event surce file
var eventSource = evnt.ActiveTake.MediaPath;
var baseImageFileName = Path.GetDirectoryName(eventSource);
baseImageFileName += Path.DirectorySeparatorChar;
baseImageFileName += Path.GetFileNameWithoutExtension(eventSource);

// calculate how far apart the images need to be
var snapInterval : Timecode = new Timecode(double(evnt.Length.ToMilliseconds() / snapshotsPerEvent));
// This offset is so we don't start on the first frame
var offSet : Timecode = new Timecode(double(snapInterval.ToMilliseconds() / 2));
// start half way to the first interval from the beginning of the event
var cursorPosition : Timecode = evnt.Start + offSet;
        // This is a workaround for a bug in Vegas.SaveSnapshot
// You must update the cursor before changing the quality
// only need to do this once
if (!bugFixForSnapshot)
{
Vegas.Cursor = cursorPosition;
Vegas.UpdateUI();

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

// Set the flag so we don't bother to do this again
bugFixForSnapshot = true;
}
        // Loop through all snapshots to take
for (var i = 0; i < snapshotsPerEvent; i++)
{
// compose the file name
var filename : StringBuilder = new StringBuilder(baseImageFileName);
filename.Append("-");
filename.Append(String.Format(imageIndexFormatString, i));
// Append the correct extension for the image format
if (imageFormat == ImageFileFormat.JPEG)
{
filename.Append(".jpg");
}
else
{
filename.Append(".png");
}

// save a snapshot. The SaveSnapshot method returns a
// member of the RenderStatus enumeration. If the user
// hits the escape key, quits the app, or anything else
// goes wrong, exit the loop.
var renderStatus = Vegas.SaveSnapshot(filename.ToString(), imageFormat, cursorPosition);
if (RenderStatus.Complete != renderStatus)
{
break;
}

// increment the cursor position
cursorPosition += snapInterval;
}
}
}
catch (errorMsg)
{
MessageBox.Show(errorMsg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
// restore the project and preview settings
Vegas.Project.Preview.RenderQuality = originalPreviewRenderQuality;
Vegas.Project.Preview.FullSize = originalPreviewFillSize;
Vegas.Project.Video.FieldOrder = originalFieldOrder;
Vegas.Project.Video.DeinterlaceMethod = originalProjectDeinterlaceMethod;
Vegas.Cursor = originalCursor;
/*
* This function returns the first selected video track
* or null if no bideo track is selected
*/
function FindSelectedVideoTrack() : Track
{
var trackEnum = new Enumerator(Vegas.Project.Tracks);
while (!trackEnum.atEnd())
{
var track : Track = Track(trackEnum.item());
if (track.Selected && track.IsVideo())
{
return track;
}
trackEnum.moveNext();
}
return null;
}
/** End of Program **/
Hope this helps.

~jr
ollle wrote on 3/28/2004, 8:45 PM
Hi JR!
Wow! Thank you very much. I wil test it in the evening (have to work now).

Greetings
oli
ollle wrote on 3/29/2004, 6:55 AM
JR!
I tried your script (thanks again) and it worked very good. There's only one problem (surely not your fault): My ready made videos are in DivX and so Vegas can't read them (i still can't believe this).

so long
oli
JohnnyRoy wrote on 3/29/2004, 7:42 AM
Oli,

Yea, I understand Vegas and DivX have problems. (no that ones not my fault) ;-) I'm glad the script worked.

~jr