Wayne Waag
Forum Replies Created
-
I think this is what you are looking for. Name of the script is Adjustvolume.js
/**
* This script will reduce the volume on a music track whenever there are clips
* on a narrative track.
* Written By: Edward Troxel - Vegas Tips, Tricks, & Scripts
* Modified By: David Arendt - multiple successive tracks now working
**/import System;
import System.IO;
import System.Object;
import System.Windows.Forms;
import Sony.Vegas;try {
// Set the defaults
var FadeWhen = 2; // 1 = all before/after, 2 = Centered on start/end
var FadeMS : Double = 2000; //500 = 1/2 second - Time is MilliSeconds
var LoudVol = 1; //1 = 0db, 2 = 6db, 1.5 = 3.5db, 1.75 = 4.8db
var SoftVol = 0.25; //0 = -inf, .5 = -6db, .25 = -12dbif (FadeWhen == 2) {
FadeMS = FadeMS / 2;
}var FadeTime = new Timecode(FadeMS);
// Find the two audio tracks by name
var VoiceTrack = FindTrack("Narrative");
if (null == VoiceTrack)
throw "no selected track";var MusicTrack = FindTrack("Music");
if (null == MusicTrack)
throw "no selected track";// Find the volume envelope on the music track - add if needed
var VolEnv = FindEnvelope(MusicTrack, EnvelopeType.Volume);
if (null == VolEnv) {
VolEnv = new Envelope(EnvelopeType.Volume);
MusicTrack.Envelopes.Add(VolEnv);
}// Go thru the events on the narrative track finding in/out points
var eventEnum = new Enumerator(VoiceTrack.Events);
while (!eventEnum.atEnd()) {
var evnt : TrackEvent = TrackEvent(eventEnum.item());
var evntStart : Timecode = evnt.Start;
var evntLen : Timecode = evnt.Length;// begin modification by David Arendt
eventEnum.moveNext();
var nextEvnt : TrackEvent;
var nextEvntStart : Timecode;
var nextEvntLen : Timecode;
while (!eventEnum.atEnd())
{
nextEvnt = TrackEvent(eventEnum.item());
nextEvntStart = nextEvnt.Start;
nextEvntLen = nextEvnt.Length;
if (nextEvntStart > evntStart + evntLen + FadeTime + FadeTime)
break;
evntLen = nextEvntStart - evntStart + nextEvntLen;
eventEnum.moveNext();
}
// end modification by David ArendtVolEnv.Points.Add(new EnvelopePoint(evntStart - FadeTime, LoudVol));
if (FadeWhen == 2) {
VolEnv.Points.Add(new EnvelopePoint(evntStart + FadeTime, SoftVol));
} else {
VolEnv.Points.Add(new EnvelopePoint(evntStart, SoftVol));
}if (FadeWhen == 2) {
VolEnv.Points.Add(new EnvelopePoint(evntStart + evntLen - FadeTime, SoftVol));
} else {
VolEnv.Points.Add(new EnvelopePoint(evntStart + evntLen, SoftVol));
}
VolEnv.Points.Add(new EnvelopePoint(evntStart + evntLen + FadeTime, LoudVol));}
} catch (e) {
MessageBox.Show(e);
}function FindTrack(WhichTrack) : Track {
var trackEnum = new Enumerator(Vegas.Project.Tracks);
var PrevTrack : Track = Track(trackEnum.item());
while (!trackEnum.atEnd()) {
var track : Track = Track(trackEnum.item());
if (WhichTrack == "Current") {
if (track.Selected) {
return track;
}
}
if (WhichTrack == "Previous") {
if (track.Selected) {
return PrevTrack;
}
}
if (track.Name == WhichTrack) {
return track;
}
trackEnum.moveNext();
}
return null;
}function FindEnvelope(track : Track, etype : EnvelopeType) : Envelope {
var envEnum : Enumerator = new Enumerator(track.Envelopes);
while (!envEnum.atEnd()) {
var env : Envelope = envEnum.item();
if (env.Type == etype) {
return env;
}
envEnum.moveNext();
}
return null;
}Have not tried it, so I don’t know if it works. Just copy and save it with Notepad with a .js extension. Good luck.
wwaag
-
Johnny,
Correct me if I’m wrong, but I thought you were concerned about archiving project files for clients such as weddings. While I concur with comments about multiple backups using different media and that nothing lasts forever, archiving for clients is not the same as archiving your daughter growing up and saving it for future generations. It would seem that after a certain period of time, 1 or 2 years or whatever period of time is in your contract, you could simply erase them, free up disk space and move on unless there was something of particular interest to you–not the client. Just an opinion.
wwaag
-
Again, if it freezes and you see the little dots next to the frame number, it indicates that your file is corrupted. I’ve had lots of avi files do this in the past. Start with your MP4 file–see if that works in Vegas. If not, then you need to find another way of converting the MP4 to an avi before importing. There are lots of freeware options to do this.
wwaag
-
Have you tried importing your Galaxy mp4 files directly into Vegas?
wwaag
-
Apparently, Vegas does not like your source footage, but for anyone to help with an answer, you need to give some detail. E.g. frame size, frame rate, codec, etc. The easiest was is to take a screenshot from Mediainfo (freeware) that gives such info and post it. Without such basic info, you’re not going to get much help.
wwaag
-
This might be a candidate for an overnight render, but at least it gives you the control you want. I don’t know why video renders from Photoshop are so slow. During a test render, I discovered it was using only a single core with CPU usage pegged at 25%.
wwaag
-
Since you’re familiar with Lightroom do this. Open your video in Photoshop. You will need V6 or later (not sure about V6, but CC works). Convert your video clip to a Smart Object. You can then apply a lens correction filter the same as in LR. Export video and you’re done. The render is pretty slow, but it does work.
wwaag
-
Suggest you have a look at this video on different approaches for rendering for Youtube. https://www.youtube.com/watch?v=rWMX5lSvEgY I used Video4Youtube some years ago and found the quality to be pretty poor. Today, rendering to Handbrake seems to be preferred by many (including me). There is also a “one-click” Vegas to Handbrake method that I use all the time, although I don’t know if it supports V9. https://www.vegasvideo.de/vegas-2-handbrake-en.
wwaag
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.
-
I usually use Vegasaur because you can take multiple snapshots, but if you don’t have that here’s what I suggest. Make sure your preview is set to Best/Full. Then select a frame, and click the “Copy Snapshot to Clipboard” icon in the video preview window. Open Photoshop. Create New file (Ctrl-N). The window will open with the dimensions of the image you have copied–in your case 1920 x 1080. Then simply Paste (Ctrl-V) and make whatever changes you want.
wwaag
-
@ Casey
I use MKV’s all the time as a delivery format, mostly due to chapter support. No need to transcode. Easiest thing to do is simply remux your MKV using tsMuxer GUI 2.6.12. Simply add your MKV file, select which audio and video tracks you want, and then remux to either a TS or M2TS file. You could demux into elementary streams, but Vegas will probably not read those either (at least AC3). You might try a sample TS and M2TS file and see which one works best in Vegas. Just tried an M2TS and it worked fine.
wwaag