Putting Videos on the timeline at correct TC at DVinfo.net
DV Info Net

Go Back   DV Info Net > Windows / PC Post Production Solutions > What Happens in Vegas...
Register FAQ Today's Posts Buyer's Guides

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

Reply
 
Thread Tools Search this Thread
Old March 20th, 2010, 11:34 AM   #1
Trustee
 
Join Date: Jul 2007
Location: Novato, CA
Posts: 1,774
Putting Videos on the timeline at correct TC

Is there a way to automate putting videos on a timeline at the correct TC? I'm looking for something similar to the way Vegas can import a Broadcast Wave File where it puts it at the TC of the starting point if the BWF.

Thanks,
Garrett
Garrett Low is offline   Reply With Quote
Old March 20th, 2010, 05:55 PM   #2
Sponsor: JET DV
 
Join Date: Dec 2001
Location: Southern Illinois
Posts: 7,953
Here's a script I wrote you should try out. Just take the script text, paste it into notepad, and save it as "MoveClipToTimestamp.cs". Then go to Tools - Scripting in Vegas and run it:

Code:
/**
 * This script will move events to start at their timecode.
 * 
 * Written By: Edward Troxel
 * Modified: 07-04-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)
		{
    			Media media = vegas.Project.MediaPool.Find(evnt.ActiveTake.MediaPath);
			if (null == media) 
			{
				MessageBox.Show("missing media");
				throw new ArgumentException("missing media");
			}

			evnt.Start = media.TimecodeIn;
		}
	}

    }


    
}
Edward Troxel is offline   Reply With Quote
Old March 21st, 2010, 11:56 AM   #3
Trustee
 
Join Date: Jul 2007
Location: Novato, CA
Posts: 1,774
Hi Ed,

Thanks for the script. It works great. I'm not sure if it's because I have so many clips but it take me running it a few time before all of the clips get moved to the correct TC.

In the end it put all of them in the correct place though.

Thanks again,
Garrett
Garrett Low is offline   Reply With Quote
Old March 21st, 2010, 12:50 PM   #4
Sponsor: JET DV
 
Join Date: Dec 2001
Location: Southern Illinois
Posts: 7,953
It may be that it's placing events after other events on the track so that the ones it's missing come BEFORE the new location of the event being processed. So I can see how that might happen. It could be written in a more complicated method to avoid that but it's probably just as easy to run it multiple times. Glad to hear it properly works for you (even if after running multiple times).
Edward Troxel is offline   Reply
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...


 



All times are GMT -6. The time now is 02:05 PM.


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