Vegas Script For Field Order? at

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,858
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 [SCVU]
JETDV Scripts/Excalibur/Newsletters
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...

Professional Video
(800) 833-4801
Portland, OR

Omega Broadcast
(512) 251-7778
Austin, TX

(973) 335-4460
Mountain Lakes, NJ

Abel Cine Tech
(888) 700-4416
N.Y. NY & L.A. CA

(800) 238-8480
Glendale, CA

Precision Camera
(800) 677-1023
Austin, TX

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 07:53 PM.

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