Forum Replies Created

Page 4 of 16
  • The first thing you should try is setting the preview window to Best(Full). It will slow down the script but it might force Vegas to decode frames properly. If this is still the test project try re-encoding the video in something other than x264 and see if you get the same 440 frames missing again.

  • This revised script will skip any frames that do not retrieve a valid snap shot. Obviously if you end up getting too many missed frames the script is not much worth.

    7106_parseboxchanges.cs.zip

  • I am also using Windows 7. We may have come across an example of why Vegas 11 crashed so much (and was reviled by many.) In the same project, doing the same things, something that should exist during play back does not. Internally variables are just disappearing.

    Find the line in the script

    Bitmap bitmap = (Bitmap)Clipboard.GetImage();

    Add this line after

    if (bitmap == null) { MessageBox.Show(“No image to analyze at ” + now); break; }

    Tell me if you get a pop-up message. Does the error occur at a different place each time you run the script?

  • Here is an example of running your test project. I just threw the pngs at the end. The script looks for the first event on each of the overlay tracks so it is not completely necessary to have them at the beginning as you can see (although it causes a slight hiccup at the end that was easily taken care of.)

    Parse Boxes example

    Tell me if you have done anything differently. The script should not behave any differently in Vegas 11. Well… I am 99% sure that it would not.

  • Is this in the test project you sent me that it stopped halfway or your full project?

  • That is odd that the script failed on the files you sent me. I ran it multiple times successfully.
    The error is probably because you have to have video event on the main video track selected… and only that selected.

    As far identifying the tracks….

    Programming deals with zero index arrays… in short…

    Tracks[0] = Track 1
    Tracks[1] = Track 2, etc. So if you need to change the tracks use the Display Number of the track minus 1.

    So to recap. Change the vegas.Project.Tracks[ ] to Display Index minus 1 for overlay tracks you need. Make sure the first event on the overlay tracks is the proper png event. Make sure the video event on the “main video” is selected. You can split up that video if you like and only select a portion of it. It will run through only selected events.

    If the “main video” in your actual project is actually a composite of several video tracks that have not been rendered out yet then there will be the problem of the Solo line in the script since it will only be accessing a portion of the complete video. Take out the two maintrack.Solo lines and manually Solo the tracks that need to be processed before you start the script.

  • The script only adds events to the tracks. It will not begin rendering. It creates the events by copying the first event of each track so technically the event can be anywhere on the track as long as it is the only event when the script starts. Since rendering does not begin it is easiest to put it at the beginning. You can delete the initial reference frames after the script is done. In fact you can make any changes you need to after the script is done.

  • Matt Carlson

    February 4, 2014 at 9:03 am in reply to: Select event with out moving Playhead

    Hold down CTRL when you are selecting and the cursor will not move.

  • It is done. Here is the script…

    7092_parseboxchanges.cs.zip

    There are a few things to mention.

    1) The overlay tracks need to be set up with one frame of the appropriate png like this:

    2) If you have no event(s) selected or anything other than the main video track event(s) selected it will not work correctly.

    3) Since this is a workaround and relatively not even possible with Vegas scripting the quality and speed of the parsing is solely dependent on the video preview quality setting. Without getting too deep in to an explanation set the video preview to Preview(Half) for the best speed results. Any other setting will cause severe speed problems or a lack of color targeting which will have the end result be useless.

    4) Speed… the video you sent to me was x264. Vegas takes a LOOOOOONG time to decode x264 frames. I re-rendered the test.avi to a standard AVC 10k bitrate and the script took half as long to complete.

    So if your original file is x264 and 45 minutes long it will take about 5 hours to parse.
    If your original is something other than x264 it will take about 2 hours and 15 minutes to finish.

    5) Since this is a script and not open to input once it starts it can’t be canceled. I would suggest breaking up video in to manageable pieces just to be safe.

    So as long as everything is set up and selected correctly the script will solo the base video track just to make sure it is only parsing pixels of the right video. Once it starts go read a book, eat a pizza, experience the love of a good woman, or write an email to Sony telling them to give the scripting environment better access to video frame information. In two hours or five everything will be golden.

  • Matt Carlson

    February 3, 2014 at 8:58 pm in reply to: PAN/CROP all the clips in the timeline

    You are welcome. I am sure the Paste Attributes feature will come in handy sometime in the future especially since you do a lot of complicated things to your timeline events.

    If you want to dive further in to what you can do with Black Tools (for example the macro section is why I built it in the first place. No more need to ask “Is there a scrip for this?”) send me questions or feedback to

    blackstingproductions@gmail.com

Page 4 of 16

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