Comments

robwood wrote on 5/2/2011, 10:24 AM
PIXEL ASPECT RATIO CHANGE, ALL CLIPS (feb 25 2010)
following text & script are from a posting by Edward Troxel which can be found at
http://www.dvinfo.net/forum/what-happens-vegas/473568-pixel-aspect-ratio-change-all-clips.html

---

Excalibur and Ultimate S can both easily do this.

Copy the following text into a text file and save it as PixelAspect.js. This one currently sets them to 1.21 so change the value to whatever value you need, select the events, and then run this script:

//PixelAspect.js
import Sony.Vegas;

for (var currentTrack : Track in Vegas.Project.Tracks) {
if (currentTrack.IsVideo() == true) {
for (var currentEvent : VideoEvent in currentTrack.Events) {
if (currentEvent.Selected == true) {
VideoStream(new Media(currentEvent.ActiveTake.MediaPath).Streams.GetItemByMediaType(currentEvent.MediaType, currentEvent.ActiveTake.StreamIndex)).PixelAspectRatio = 1.21;
}
}
}
}



---

(from Rob)
CAVEAT: this is a re-post of hopefully helpful info, but haven't used it myself so not writing from experience.
rmack350 wrote on 5/2/2011, 10:32 AM
Thanks Rob,

I also found a script on the DVFilm site here:
http://dvfilm.com/raylight/raylightTutorial5.htm

The link is at the bottom of the page. This one changes the media in the pool. Your script example changes it on a track. Both are useful, of course.

Rob

---------------------------------------------------------------
/**
* This script sets the Pixel Aspect Ratio all media with a video
* stream to the desired value. The value must be edited below.
* The file extension of this file needs to be changed from .txt to .js
* and then drag it into the appropriate script folder, for example
* C:/Program Files/Sony/Vegas 7.0/Script Menu
*
* c.2006 DVFilm
*
**/
import Sony.Vegas;

// Set the following variable to the Pixel Aspect Ratio you wish to
// have all video streams use.

var targetPAR = .9091;


var mediaEnum = new Enumerator(Vegas.Project.MediaPool);
while (!mediaEnum.atEnd()) {
var media = mediaEnum.item();
if (media.HasVideo())
{
var videoStream = media.Streams.GetItemByMediaType(MediaType.Video, 0);
videoStream.PixelAspectRatio = targetPAR;
}
mediaEnum.moveNext();
}