Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums VEGAS Pro Script to restore deleted audio to video event — vegas pro 13

  • Script to restore deleted audio to video event — vegas pro 13

    Posted by Lars Hansen on March 22, 2017 at 8:08 pm

    Looking at a few old forums there appears to be a script called “RecreateAudioEvents.js” that restores deleted audio associated with a video event.

    Does anyone know where I might get a copy of such a script and if it works in SVP 13?

    Thanks!

    https://vimeo.com/longdcycler

    Lars Hansen replied 9 years, 1 month ago 4 Members · 4 Replies
  • 4 Replies
  • László Kovács

    March 22, 2017 at 8:37 pm

    I know for sure Vegasaur has this functionality.
    So if you don’t find that script, it may worth to give Vegasaur a try.

    Best regards

    László Kovács

  • Paul Berk

    March 23, 2017 at 4:36 am

    László .. that script in Vegasaur must be for the original camera audio for a particular video clip .. easy enough to find and match to a video event but I can’t see this working for ‘wild sound” .. I think the OP is talking about sound from his H6 Zoom, not the camera.

  • Graham Bernard

    March 23, 2017 at 5:33 am

    I use the Mighty Excalibur by Edward Troxel. The A/V restore Icon sits loud and proud on my Toolbar.

    OK, just went down Memory Lane with some Google searching. I found the script on the Calderwood site. I haven’t used the script nor can I vouch for it in any way!:

    =========

    /*
    * (re)create audio parts on seperate audio track for all selected video events
    */

    import System.Windows.Forms;
    import Sony.Vegas;

    try {
    // create new target audio track
    var targetTrack = new AudioTrack(-1,”Missing Audio”);
    Vegas.Project.Tracks.Add(targetTrack);
    // step through all selected video events:
    for (var track in Vegas.Project.Tracks) {
    for (var evnt in track.Events) {
    if (!evnt.Selected || evnt.MediaType != MediaType.Video) continue;
    // create a fitting audio event and add to target audio track:
    var audioEvent = new AudioEvent(evnt.Start,evnt.Length);
    targetTrack.Events.Add(audioEvent);
    // step through all events of selected video event
    for (var tke in evnt.Takes)
    {
    // find first audio stream in this takes media
    var aviFile = new Media(tke.MediaPath);
    for (var stream in aviFile.Streams)
    {
    if (stream.MediaType != MediaType.Audio) continue;
    // create new take out of this audio stream
    var newTake = new Take(stream,tke.IsActive);
    // add it to target audio event (must be done before anything else!!)
    audioEvent.Takes.Add(newTake);
    // fit offset to video event
    newTake.Offset = tke.Offset;
    break; // we assume there’s only one audio part in any avi file
    }
    }
    audioEvent.Selected = true;
    }
    }
    } catch (e) {MessageBox.Show(e);}

    ==============

    This needs to be reworked for the new owners of VP. Here’s that Calderwood site: https://s92274348.onlinehome.us/vegas.html

    * Grazie

    Video Content Creator and Potter
    PC 7 64-bit 16gb * Intel® Core™i7-2600k Quad Core 3.40GHz * 2GB NVIDIA GEFORCE GTX 560 Ti
    Cameras: Canon XF300 + PowerShot SX50HS Bridge

  • Lars Hansen

    March 25, 2017 at 7:13 pm

    Thankyou kindly Grazie! This appears to be the ticket!

    I’ve downloaded the collection of scripts via the site you referenced and what a list! I assume that some of these are outdated/redundant now?… That said, there are quite a few scripts there I have moved into my Vegas script folder as they’re great short cuts to completing more time consuming tasks (e.g “Normalize”, which normalizes audio for an entire track!).

    I have tested the “Recreate Audio Events” from the collection (which is the script I assume you pasted above) and it appears do exactly what I want.

    For those who want to learn a little more about installing and using scripts here’s a good video by Scott Eggleston: https://www.youtube.com/watch?v=krySUGsudsI

    Cheers! LDC

    https://vimeo.com/longdcycler

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

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