Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums VEGAS Pro Music Video – Script to Move a clip on the Timeline to it’s particular Timecode Position / add from Trimmer at TC-position

  • Music Video – Script to Move a clip on the Timeline to it’s particular Timecode Position / add from Trimmer at TC-position

    Posted by Dominik Blöchl on October 23, 2013 at 10:43 pm

    Hi there,

    I have MOV files with embedded TC-Track to align with music (for a music video).

    MOVE ON THE TIMELINE
    I would love to select a clip on the timeline and have it moved to the right TC-position via script.

    ADD FROM THE TRIMMER
    Even better (or additionally) it would be excellent to have a clip inserted onto the timeline from the trimmer window (after trimming it) at the respective TC-position.

    There is a script by Gilles Pialat which adds clips from the media pool at the right TC-position. Problem is: I’d like to sift through all the clips easily and then have them appear on the timeline without going through the media-pool or finding it there again.

    Any ideas?

    Matt Carlson replied 12 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Matt Carlson

    October 24, 2013 at 6:47 am

    I think there may be some problems in getting what you need but I will try to help out.

    What version of Vegas are you using? Read this post to find out if running a script with MOV embedded timecodes is even possible with your version.
    Sony Forum Post

    Vegas scripting does not have access to the trimmer data so writing a script for your second request “ADD FROM THE TRIMMER” is not possible, although with extension programming any event added to the timeline (which includes those added by the trimmer) can be acted upon any way you want.

    How you are “sifting easily” through your events or clips (just to make clear an “event” is a timeline object and a “clip” is a media pool object) if you are not using the media pool?

    Without knowing the answers yet the above questions this script in the proper version of Vegas will move any selected event(s) on the timeline to it’s media timecode position.

    using System;
    using Sony.Vegas;

    public class EntryPoint
    {
    public void FromVegas(Vegas vegas)
    {
    foreach (Track theTrack in vegas.Project.Tracks)
    {
    foreach (TrackEvent ev in theTrack.Events)
    {
    if (!ev.Selected) continue;

    Timecode position = ev.ActiveTake.Media.TimecodeIn + ev.ActiveTake.Offset;
    ev.Start = position;

    if (ev.Group != null)
    {
    foreach (TrackEvent groupevent in ev.Group)
    {
    groupevent.Start = position;
    }
    }
    }
    }
    }

  • Dominik Blöchl

    October 25, 2013 at 12:23 am

    Dear Matt,

    the script works absolutely perfect (just add another { at the end)!
    Thank you so much. This made a long journey finally come to an end where I’ve got a work flow which is pretty much perfect to me.

    I use LTCconvert (FCP Aux TC Reader) by https://www.videotoolshed.com to scan for an audio timecode track etc.

    All the best mate and thanks again for your super-swift reply!

    Dominik
    https://www.fruitbowl.net

  • Matt Carlson

    October 25, 2013 at 3:17 am

    Glad I could help and I am glad my missing bracket did not deter you from getting on with your work :).

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy