Vegas Script For Field Order? at
DV Info Net

Go Back   DV Info Net > Windows / PC Post Production Solutions > What Happens in Vegas...

What Happens in Vegas...
...stays in Vegas! This PC-based editing app is a safe bet with these tips.

Thread Tools Search this Thread
Old April 1st, 2007, 04:08 PM   #1
Regular Crew
Join Date: Feb 2005
Location: Sofia Bulgaria
Posts: 147
Vegas Script For Field Order?

Hi there,
I am looking for a script to change the field order of all footages on the timeline (footage - properties - field order), i.e. from lower to progressive.
Plamen Petrov is offline   Reply With Quote
Old April 1st, 2007, 09:58 PM   #2
Sponsor: JET DV
Join Date: Dec 2001
Location: Southern Illinois
Posts: 7,952
Try this one. Save the following as ChangeFieldOrder.cs

 * This script will set the field order
 * Written By: Edward Troxel
 * Modified: 04-01-2007

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;

public class EntryPoint
    Vegas myVegas;
    public void FromVegas(Vegas vegas)
        myVegas = vegas;

	foreach (Track track in myVegas.Project.Tracks)
		foreach(TrackEvent evnt in track.Events)
			VideoFieldOrder FType = VideoFieldOrder.ProgressiveScan;
			// VideoFieldOrder.UpperFieldFirst;
			// VideoFieldOrder.ProgressiveScan;
			// VideoFieldOrder.Unknown;
			MediaStream mediaStream = GetActiveMediaStream (evnt, myVegas);
			VideoStream videoStream = mediaStream as VideoStream;
			videoStream.FieldOrder = FType;


	public MediaStream GetActiveMediaStream (TrackEvent trackEvent, Vegas vegas) 
			if (!(trackEvent.ActiveTake.IsValid())) 
				throw new ArgumentException("empty or invalid take");

    			Media media = vegas.Project.MediaPool.Find(trackEvent.ActiveTake.MediaPath);
			if (null == media) 
				MessageBox.Show("missing media");
				throw new ArgumentException("missing media");
			MediaStream mediaStream = media.Streams.GetItemByMediaType(MediaType.Video, 

			return mediaStream;
		catch (Exception e) 
			MessageBox.Show("{0}", e.Message);
			return null;


Excalibur will also easily do this particular task if you don't want to mess with the above.
Edward Troxel is offline   Reply

DV Info Net refers all where-to-buy and where-to-rent questions exclusively to these trusted full line dealers and rental houses...

B&H Photo Video
(866) 521-7381
New York, NY USA

Scan Computers Int. Ltd.
+44 0871-472-4747
Bolton, Lancashire UK

DV Info Net also encourages you to support local businesses and buy from an authorized dealer in your neighborhood.
  You are here: DV Info Net > Windows / PC Post Production Solutions > What Happens in Vegas...

Thread Tools Search this Thread
Search this Thread:

Advanced Search


All times are GMT -6. The time now is 11:40 PM.

DV Info Net -- Real Names, Real People, Real Info!
1998-2021 The Digital Video Information Network