Time spacing between video clips

robert-weitkamp wrote on 9/19/2025, 9:13 AM

Is there any way, when you are dropping multiple clips on the time line, to have there be time spacing between clips rather than have them be directly adjacent? I always have to do this manually. I use the spacing to know where my last edit is on the overall project. Clips spaced apart haven't been edited yet and a contiguous timeline means they have. This is especially useful in large projects.

Comments

Gid wrote on 9/19/2025, 11:13 AM

@robert-weitkamp Try this script.

Add the media to the timeline, create a region longer than the events, select both the video & audio tracks by clicking on one track header, then holding down Ctrl click the other track header or Ctrl+A to select all,,,, then click this script, it will space the events out leaving a gap in between each.

Vegas Pro 18 - 22
Vegas Pro/Post 19
Boris Continuum & Sapphire, 
Silhouette Standalone + Plugin, 
Mocha Pro Standalone + Plugin, 
Boris Optics,
NewBlue TotalFX
Desktop PC Microsoft Windows 10 Pro - 64-Bit
ASUS PRO WS WRX80E-SAGE SE WIFI AMD Motherboard
AMD Ryzen Threadripper PRO 3975WX 3.5GHz 32 Core
Corsair iCUE H150i RGB PRO XT 360mm All-in-One Liquid CPU Cooler
RAM 256GB ( 8x Micron 32GB (1x 32GB) 2666MHz DDR4 RAM )
2x Western Digital Black SN850 2TB M.2-2280 SSD, 7000MB/s Read, 5100MB/s Write
(programs on one, project files on the other)
Graphics MSI GeForce RTX 3090 SUPRIM X 24GB OC GPU
ASUS ROG Thor 1200W Semi-Modular 80+ Platinum PSU 
Fractal Design Define 7 XL Dark TG Case with 3 Fans
Dell SE3223Q 31.5 Inch 4K UHD (3840x2160) Monitor, 60Hz, & an Acer 24" monitor.

At the moment my filming is done with a Samsung Galaxy S23 Ultra 5G & a GoPro Hero11 Black

I've been a Joiner/Carpenter for 40yrs, apprentice trained time served, I don't have an apprentice of my own so to share my knowledge I put videos on YouTube.

YouTube videos - https://www.youtube.com/c/Gidjoiner

 

robert-weitkamp wrote on 9/19/2025, 11:50 AM

Thank you very much. Where do I find this script?

Gid wrote on 9/19/2025, 12:05 PM

@robert-weitkamp It's in the picture

Tools - Scripting - EvenlySpaceEvents_within_region.

I thin it's a native Vegas script as I can't remember adding it but here it is if it's not there.

/**

 *     Program: EvenlySpaceEvents.cs

 * Description: This script will evenly space all the events on the selected track within

 *              the timeline selection.

 *      Author: John Rofrano

 *   Copyright: (c) 2009 Sundance Media Group / VASST

 * 

 * Revision Date: July 24, 2009

 **/



using System;

using System.Collections;

using System.Windows.Forms;

using ScriptPortal.Vegas;



class EntryPoint

{

    public void FromVegas(Vegas vegas)

    {

        try

        {

            Timecode selectionLength = vegas.Transport.LoopRegionLength;

            Timecode selectionStart = vegas.Transport.LoopRegionStart;



            // make sure a loop selection is made

            if (selectionLength.ToMilliseconds() == 0)

            {

                throw new ApplicationException("You must create a loop region on the timeline.");

            }



            foreach (Track track in vegas.Project.Tracks)

            {

                // only process selected tracks

                if (!track.Selected) continue;



                // make sure there are at least two events to space

                if (track.Events.Count < 2)

                {

                    string errorMessage =  "You must have at least two or more events on the selected track to space.";

                    MessageBox.Show(errorMessage, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                    continue;   // skip this track

                }



                // calculate the combined events length

                Timecode totalEventTime = Timecode.FromMilliseconds(0);

                foreach (TrackEvent trackEvent in track.Events)

                {

                    totalEventTime += trackEvent.Length;

                }



                // warn if the events won't fit in the selection

                if (totalEventTime > selectionLength)

                {

                    string errorMessage = String.Format("You cannot fit {0} of events into a {1} selection.", totalEventTime, selectionLength);

                    MessageBox.Show(errorMessage, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                    continue;   // skip this track

                }



                // calculate the event gap

                Timecode emptySpace = selectionLength - totalEventTime;

                int gapCount = track.Events.Count - 1;    // there is one less gap than events

                Timecode eventGap = Timecode.FromMilliseconds(emptySpace.ToMilliseconds() / gapCount);



                // space the events evenly

                ArrayList eventList = new ArrayList(track.Events);

                Timecode nextPosition = selectionStart;

                foreach (TrackEvent trackEvent in eventList)

                {

                    trackEvent.Start = nextPosition;

                    nextPosition = trackEvent.End + eventGap;

                }

            }

        }

        catch (Exception e)

        {

            MessageBox.Show(e.Message, "Evenly Space Events - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

        }

    }

}

 

Vegas Pro 18 - 22
Vegas Pro/Post 19
Boris Continuum & Sapphire, 
Silhouette Standalone + Plugin, 
Mocha Pro Standalone + Plugin, 
Boris Optics,
NewBlue TotalFX
Desktop PC Microsoft Windows 10 Pro - 64-Bit
ASUS PRO WS WRX80E-SAGE SE WIFI AMD Motherboard
AMD Ryzen Threadripper PRO 3975WX 3.5GHz 32 Core
Corsair iCUE H150i RGB PRO XT 360mm All-in-One Liquid CPU Cooler
RAM 256GB ( 8x Micron 32GB (1x 32GB) 2666MHz DDR4 RAM )
2x Western Digital Black SN850 2TB M.2-2280 SSD, 7000MB/s Read, 5100MB/s Write
(programs on one, project files on the other)
Graphics MSI GeForce RTX 3090 SUPRIM X 24GB OC GPU
ASUS ROG Thor 1200W Semi-Modular 80+ Platinum PSU 
Fractal Design Define 7 XL Dark TG Case with 3 Fans
Dell SE3223Q 31.5 Inch 4K UHD (3840x2160) Monitor, 60Hz, & an Acer 24" monitor.

At the moment my filming is done with a Samsung Galaxy S23 Ultra 5G & a GoPro Hero11 Black

I've been a Joiner/Carpenter for 40yrs, apprentice trained time served, I don't have an apprentice of my own so to share my knowledge I put videos on YouTube.

YouTube videos - https://www.youtube.com/c/Gidjoiner