Forum Replies Created

Page 1 of 3
  • Randal Petryshyn

    March 26, 2014 at 5:21 am in reply to: Looking for a script

    Well I really do appreciate your efforts and willingness to help. I hope there is something I can do for you at some point. You are a kind soul.

    Thanks
    Randal

  • Randal Petryshyn

    March 26, 2014 at 1:43 am in reply to: Looking for a script

    It worked very well! I really appreciate the help. Can I paypal you a case of beer?

    Thanks
    Randal

  • Randal Petryshyn

    March 25, 2014 at 9:04 pm in reply to: Looking for a script

    You got it Matt! Close the gaps, and remove the markers. If you could delete the audio stream completely it would be great!

    Thanks
    Randal

  • Randal Petryshyn

    March 25, 2014 at 8:46 pm in reply to: Looking for a script

    Hi Matt. We are getting ever so close!
    Can we remove all the empty frames as well?

  • Randal Petryshyn

    March 25, 2014 at 4:32 pm in reply to: Looking for a script

    Hi Matt
    Did I bugger something up?
    Thanks
    Randal

    using System;
    using Sony.Vegas;
    using System.Collections.Generic;
    using System.Windows.Forms;
    using System.Drawing;

    class EntryPoint
    {
    //Change this to true if you want to default to all tracks
    const bool ALLTRACKS = false;

    //Change this to false if you want to split audio tracks as well
    const bool VIDEOONLY = true;

    //This is the length of frames you want each event to keep
    const int FRAMELENGTHTORETAIN = 1;

    public void FromVegas(Vegas vegas)
    {
    DeselectAllEvents(vegas);
    List TracksUsed = SplitFrameAtMarkers(vegas);
    DeleteAllButSelected(TracksUsed);
    }

    private List SplitFrameAtMarkers(Vegas vegas)
    {

    List TracksToUse = GetTracksToModify(ALLTRACKS, vegas);
    foreach (Marker m in vegas.Project.Markers)
    {
    List EventsAtMarker = GetEventsAtPosition(m.Position, TracksToUse);
    foreach(TrackEvent ev in EventsAtMarker)
    {
    ev.Split(m.Position - ev.Start);
    TrackEvent backhalf = GetNewlySplitEvent(ev);
    backhalf.Split(Timecode.FromFrames((FRAMELENGTHTORETAIN));
    backhalf.Selected = true;
    }
    }
    return TracksToUse;
    }

    //Get the tracks to modify by choosing selected tracks
    //or all of them if ALLTRACKS is true.
    //If there are no tracks selected the default will be the first track only.
    private List GetTracksToModify(bool ALLTRACKS, Vegas vegas)
    {
    List tracks = new List();
    foreach(Track t in vegas.Project.Tracks)
    {
    if (VIDEOONLY && !t.IsVideo()) continue;
    if (t.Selected || ALLTRACKS) tracks.Add(t);
    }
    if (tracks.Count == 0) tracks.Add(vegas.Project.Tracks[0]);

    return tracks;
    }

    private List GetEventsAtPosition(Timecode position,List tracks)
    {
    List events = new List();
    foreach(Track t in tracks)
    {
    foreach(TrackEvent ev in t.Events)
    {
    if (ev.Start <= position && ev.End >= position)
    events.Add(ev);
    }
    }
    return events;
    }

    private TrackEvent GetNewlySplitEvent(TrackEvent firsthalf)
    {
    return firsthalf.Track.Events[firsthalf.Index + 1];
    }

    private void DeselectAllEvents(Vegas vegas)
    {
    foreach(Track t in vegas.Project.Tracks)
    {
    foreach(TrackEvent ev in t.Events)
    {
    ev.Selected = false;
    }
    }
    }

    private void DeleteAllButSelected(List modifiedtracks)
    {
    List toremove = new List();
    foreach (Track t in modifiedtracks)
    {
    foreach (TrackEvent ev in t.Events)
    {
    if (!ev.Selected) toremove.Add(ev);
    }
    }
    foreach (TrackEvent ev in toremove)
    {
    ev.Track.Events.Remove(ev);
    }
    }

    }

  • Randal Petryshyn

    March 25, 2014 at 2:16 am in reply to: Looking for a script

    Hi Matt
    I really appreciate to spending time on this. The script saved only the frame at the first marker (as seen below). I have found a script that saves the first frame at each event if that would help you. Its all gobboly goop to me.
    Thanks
    Randal

  • Randal Petryshyn

    March 24, 2014 at 6:37 pm in reply to: Looking for a script

    Hi Edward. I only want the marked frames to remain on the timeline. Several thousand. What would you charge me to right one up?

    Thanks
    Randal

  • Randal Petryshyn

    March 24, 2014 at 4:57 pm in reply to: Looking for a script

    who would be available to whip up such a script? 🙂

    Thanks
    Randal

  • Randal Petryshyn

    March 23, 2014 at 6:36 pm in reply to: How to pull down in vegas 12?

    John. Is there a way to save only frames that are markered and remove the rest?
    (should I start a new thread for this?)
    Thanks
    Randal

  • Randal Petryshyn

    March 23, 2014 at 5:12 am in reply to: How to pull down in vegas 12?

    Hi John
    I shoot at 60fps. I run a script to pick out the good frames and gives me back 18fps. I time stretch the frames to equal the 24fps. Then I render out to 24p. When I time stretch, it actually gives me 60fps from the good 18 frames. It must interpolate accordingly, as it looks great. It just seems ackward. It would be better to just specify within Vegas to do so…

Page 1 of 3

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