Forum Replies Created

Page 1936 of 1940
  • John Rofrano

    June 24, 2008 at 4:40 pm in reply to: scripting bug

    Hi Dave,

    You can get the source media from the active take on the event (i.e., trackEvent.ActiveTake.MediaPath). As I said in my previous post, a subclip is a subset of the original clip therefore it should be limited to a single piece of media.

    What I would have the program do is require the user to select the video track that will be used to make subclips from regions. Your code should find the selected video track with something like:

    private VideoTrack FindSelectedVideoTrack(Vegas vegas)
    {
        foreach (Track track in vegas.Project.Tracks)
        {
            if (track.IsVideo() && track.Selected)
            {
                return (VideoTrack)track;
            }
        }
        return null;
    }

    Then iterate through the regions looking for events that are under them. I like to use a utility function to find an event at a specific position for this like the method below:

    private TrackEvent FindEventAt(IList eventList, Timecode position)
    {
        foreach (TrackEvent trackEvent in eventList)
        {
            // find the event that spans the position
            if (trackEvent.Start <= position && trackEvent.End >= position)
            {
                return trackEvent;
            }
        }
        return null;
    }

    This makes the iteration easier. Now you can use a loop like this to process the events:

    // get the selected video track
    VideoTrack videoTrack = FindSelectedVideoTrack(myVegas);

    // iterative through the regions looking for events to process
    foreach (Sony.Vegas.Region region in vegas.Project.Regions)
    {
        // find the event at the region position
        TrackEvent trackEvent = FindEventAt(videoTrack.Events, region.Position);

        // get the path to the media
        string mediaPath = trackEvent.ActiveTake.MediaPath;

        // create the subclip and add it to the bin
        Subclip subclip = new Subclip(mediaPath, region.Position, region.Length, false, region.Label);
        if (subclip != null && subclip.IsValid())
        {
            InOrderBin.Add(subclip);
        }
    }

    Of course you’d want to add some error checks in that loop like checking that the event that is returned by FindEventAt() is not null, check that the trackEvent.End is greater or equal to the region.End and checking that trackEvent.ActiveTake is not null before you try and get the MediaPath from it.

    But you get the idea. I can give you a running piece of code that does what you want with all of the error checking if you’d like but I know that some programmers love the thrill of getting it to work themselves so I don’t want to spoil your fun (unless it’s no fun for you in which case, just ask and I’ll post the working code) 😉

    I’d like to point out that VASST Ultimate S Pro has the ability to create subclips from regions already (I am the developer if you don’t know who I am) but I realize you are doing something special with the clip naming here so you need a special script. Let me know if you have any questions.

    ~jr

    https://www.johnrofrano.com/

  • John Rofrano

    June 23, 2008 at 3:05 pm in reply to: Firewire Card Questions

    I believe the Canopus ADVC110 only supports FW400 (not FW800) so any old FW400 card should do. Some say to get a card with the Texas Instruments (TI) chipset as they are a bit better than others but I’ve used expensive FW cards and cheap FW cards and haven’t found any difference. The speed of the card will not affect playback. Any choppiness will be from your computer CPU not being able to feed the stream fast enough and not because of bandwidth on the FW interface.

    It should be pointed out that the Canopus ADVC110 only outputs DV over firewire so connecting it to an HDTV will not give you HD output (if that is what you were trying to do)

    ~jr

    https://www.johnrofrano.com/

  • John Rofrano

    June 23, 2008 at 2:57 pm in reply to: Making masks bigger/smaller

    Create the mask on a separate track and use Pan/Crop or Track Motion to resize it accordingly. The easiest way to accomplish this would be to use the Mask tool in Pan/Crop to make the original mask over the event with the character. Then save that as a preset and remove it from the event. Now create a new event out of Solid White Generated Media on a new track above and apply the mask shape to that event. You may have to change the mask type to negative because I assume you want to create a hole. Then change the compositing mode of the upper (mask) track to Multiply (Mask). This should create a mask that you can now resize.

    ~jr

    https://www.johnrofrano.com/

  • John Rofrano

    June 23, 2008 at 2:42 pm in reply to: scripting bug

    This code doesn’t do what you think it is doing (or what you want it to do). The first parameter on the call to SubClip() is the name of the media file. Your brother is passing in the name of the Project file so it is making subclips of your entire project not just the media on the timeline. Also, the Vegas Script API will allow you to make subclips across media files when in reality this isn’t possible (a subclip by definition is smaller than the media and cannot be composed of multiple media). So the code has to guard against this happening. Creating a subclip like this would definitely cause an exception in Vegas. There are other optimizations he could make like once you find the media bin you want there is no reason to continue to look but the code still does. This is not a big deal since there probably won’t be many bins anyway but just adding a “break;” after you find the bin with short-circuit the search.

    Tell your brother to use the name of the media file you are trying to make a subclip from not the name of the project and it should work as expected. He also might want to add checks to make sure he doesn’t create a subclip from a region that spans timeline events (and thus media files) unless you know that you would never create one like that.

    ~jr

    https://www.johnrofrano.com/

  • John Rofrano

    June 20, 2008 at 3:02 am in reply to: Replacing mpeg in DVD architect

    > Where is the Load Chapters button?

    Sorry it’s called Load Markers. When you double-click on the link to go into the MPG media, it’s the 9th button from the left on top of the track. It looks like a folder icon with a marker icon over it.

    ~jr

    https://www.johnrofrano.com/

  • John Rofrano

    June 19, 2008 at 2:51 pm in reply to: Replacing mpeg in DVD architect

    You may just have to press the Load Chapters button to load the updated marker file assuming you generated a new marker file when you rendered. I don’t believe it refreshes automatically.

    ~jr

    https://www.johnrofrano.com/

  • John Rofrano

    June 17, 2008 at 2:45 pm in reply to: ac3 issue in vegas 8a

    How are you importing into Vegas? I don’t have one of these cameras but I beleive you should be using File | Import | Hard Disk Recording Unit. You should also upgrade to Vegas Pro 8.0b which is the latest level. There might be a bug in 8.0a that is fixed in 8.0b.

    ~jr

    https://www.johnrofrano.com/

  • John Rofrano

    June 17, 2008 at 2:41 pm in reply to: Vegas Pro 8

    You must add a volume envelope to the audio track and then you can add keyframes. Select the audio track and press Shift+V to add a volume envelope. Double-click the envelope to add a keyframe.

    ~jr

    https://www.johnrofrano.com/

  • John Rofrano

    June 15, 2008 at 2:05 am in reply to: RED 4.2 can’t read my DV AVI files

    Peter,

    I never did hear from support and I’ve been so buried in work that I didn’t have time to debug this until now but I did find the cause. I got an email from someone with exactly the same problem! This lead me to believe that it wasn’t just a quirk about my PC so I investigated it further and here’s what I found:

    Boris RED can’t read DV AVI files with Nero 8 installed! I proved this by creating a new Windiows XP image in a VMWare virtual machine. I install the Boris RED trial and viewed a DV AVI file just fine. Then I installed Nero 8 and Boris RED could no longer read the DV AVI file. RED and Nero were the ONLY software on the box (brand new XP install). I uninstalled Nero 8 and RED could read DV AVI files again. I believe this proves the cause and affect between Nero and Boris.

    Apparently Nero inserts it’s own AVI Splitter in place of the one that comes with Windows and that is the source of the problem.

    Normally the video path is:

    AVI File –> AVI Splitter –> DV Video Decoder –> Boris RED
    Where the AVI Splitter = C:\WINDOWS\system32\quartz.dll

    With Nero 8 installed the video path is:

    AVI File –> Nero MP4 Splitter –> DV Video Decoder –> Boris RED
    Where the Nero MP4 Splitter = C:\Program Files\Common Files\Nero\DSFilter\NeMP4Splitter.ax

    Tell your developers to install Nero 8 trial on their test machine and figure out why it causes Boris RED not to read DV AVI files. Remember, every other NLE and video software on my PC has no problem with this so it seems to be a Boris issue not a Nero issue. It would be nice to know if you can recreate this in the test lab and if you can provide a fix.

    Thanks,

    ~jr

    https://www.johnrofrano.com/

  • John Rofrano

    June 14, 2008 at 4:17 pm in reply to: 8 mm PAL to AVI

    > I have an ADS Pyro A/V link that I haven’t used for a year or so, but it doesn’t have NTSC/PAL switch.

    Sure it does. Look at the DIP switches in the back and refer to your manual. I have a Pyro A/V Link and switch 1 is Up=PAL Down=NTSC. What you could do is loan him your Pyro A/V Link with switch 1 in the UP position (set to PAL). Then he would plug the analog output of his camera into the A/V Link and the firewire out of the A/V Link into his Mac and use his editing program to capture it to Quicktime DV.

    Of course you can still do this for him but as we said earlier, you will get a DV AVI file and then have to re-render it to Quicktime for him unless he has something to handle AVI files on a Mac.

    My suggestion of him doing it with your A/V Link is probably the most error free way since the file will be produced by his editing software and will be in the correct format with no re-encoding.

    ~jr

    https://www.johnrofrano.com/

Page 1936 of 1940

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