Changing pixel aspect ratio of all clips

Jessariah67 wrote on 12/3/2007, 7:26 PM
Hey all,

I've got a backup file that I've loaded in and when I saved with trimmed media, it set all the 16:9 clips to 4:3. There are hundreds of clips in this project. Is there a script that will set all clips to pixel aspect ratio of 1.2?

Thanks.

KH

Comments

Grazie wrote on 12/3/2007, 10:36 PM
Won't : Copy > Paste Event Attributes do it?

Grazie
jetdv wrote on 12/4/2007, 7:22 AM
Something like this?


//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;
}
}
}
}
Jessariah67 wrote on 12/4/2007, 6:20 PM
Grazie - that would work if the clips didn't have other various effects / envelopes on them already...I just want to make that ONE change on everything.

Ed - thanks for the script. I'll give it a try.

KH
Jessariah67 wrote on 12/5/2007, 1:16 PM
I get this error message:

Microsoft.Vsa.VsaException: UnknownError (0x801330FF): System.NullReferenceException: Object reference not set to an instance of an object.
at Sony.Vegas.VideoStream.set_PixelAspectRatio(Double value)
at JScript 0.Global Code() in Sony.Vegas://Script/__ScriptText__:line 8
at Sony.Vegas._Startup.Startup()
at Microsoft.Vsa.BaseVsaEngine.Run()