Multifade script conversion

Jey wrote on 4/27/2004, 4:30 AM
While working on a slideshow video with the Multifade script (thank you Roger for that one!!!), I was wondering if it would be possible to create such a script that changes the aspect ratio for each selected event (i.e. from 'square' to 'DV widescreen').
Or perhaps a script for changing some of the properties for all selected events at once.

Thanks.

Comments

JohnnyRoy wrote on 4/27/2004, 7:11 PM
I have a script that I placed on the Sundance Media Group site under my name called "ChangeMediaPoolAspectRatio" that will change the aspect ration of everything in the media pool to match the projects settings. So you could just set the project to DV Widescreen and run this script and all the media will have the project aspect ratio. You can modify it to do selected events on the timeline quite easily. (or I can modify it for you if you're not familiar with scripting. Just let me know)

~jr
Jey wrote on 4/28/2004, 12:51 AM
Thanks JohnnyRoy. I'm aware of your script on the Sundance site, but I don't want to change the aspectratio of all my media files. Just on the events I have selected in the timeline. Could you modify the script for me? I'm not familiar with scripting.

Thanks in advance.

Jey
DVDeviations wrote on 8/18/2004, 9:33 PM
I am looking for this "multifade script" to use for a slide show of JPG images.

Could someone please direct me in the right direction?

Thanks,
Colleen
jetdv wrote on 8/19/2004, 6:54 AM
What do you mean by "multi-fade"? Excalibur will easily add fade in and/or fade ot to all selected events. It can also change the duration of each image and overlap them to create crossfades. I have a complete writeup on how to create slide-shows in my newsletters.
johnmeyer wrote on 8/19/2004, 10:47 AM
Jey,

Here is a script adapted from JohnnyRoy's that is close to what you want.

Please note, however, that Vegas does not let you change the Aspect Ratio for events that use the same media. For instance, if you put an AVI file on the timeline, split it, and then change the aspect ratio for one of the resulting events, the aspect ratio for the other event gets changed as well.

I am not aware of any way to get around this.

/**
* This script changes pixel aspect ratio and fieldorder for all media
* in the mediapool.
*
* August 11, 2004
**/

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

try {

var mediaEnum = new Enumerator(Vegas.Project.MediaPool);
while (!mediaEnum.atEnd()) {
var media = mediaEnum.item();
// only add the effect if the media object has a video stream.
if (media.HasVideo()) {
var stream : VideoStream = media.Streams[0];
stream.PixelAspectRatio = 0.909090909091;
stream.FieldOrder = VideoFieldOrder.LowerFieldFirst;
/**
* The following is commented out. It lets you see what attributes
* are assigned to each piece of media in the mediapool

MessageBox.Show(stream.Width, "Attributes");
MessageBox.Show(stream.Height, "Attributes");
MessageBox.Show(stream.FrameRate, "Attributes");
MessageBox.Show(stream.FieldOrder, "Attributes");
MessageBox.Show(stream.PixelAspectRatio, "Attributes");
MessageBox.Show(stream.ColorDepth, "Attributes");
MessageBox.Show(stream.AlphaChannel, "Attributes");
MessageBox.Show(stream.AverageDataRate, "Attributes");
MessageBox.Show(stream.Format, "Attributes");
MessageBox.Show(stream.BackgroundColor, "Attributes");
**/
}
mediaEnum.moveNext();
}
}
catch (e){
}