Nick Leigh
Forum Replies Created
-
Ok so I tried your solution and set the current time to 0 and I was still getting the same error. Here is what I am doing:
videoComp.time = 0;
videoComp.workAreaDuration = 1;
videoComp.ramPreviewTest("",0.33,"");
videoComp.workAreaDuration = settings.compLength;
app.executeCommand(app.findMenuCommandId("Trim Comp to Work Area"));
Is there a way to simply set the comp duration of length?
CS5 Production Suite
-
Hey Bryan,
So if you go here you can see what i’ve done for my hockey games. Here are the couple I have done so far, League Videos.
If this is what you are looking for I can upload the scripts I use to do it and tell you the process to do so.
Nick
CS5 Production Suite
-
Hey Bryan,
I would like to help you if I can. I have improved my scripts a bit since posting this one. Can you tell me a little abou the process you are using and what you would like to have as a final output.
Nick
CS5 Production Suite
-
Ok thanks for the info on the output size.
Can I import my mts file that is 1440 x 1080(1.33) into a project that is 1920 x 1080(1) or is that going to mess with my pixels in my video. Again this is so my overlay image looks crisp rather than strecthed as it does in the 1440(1.33) project. The image is 1920 pixels wide and has a PAR of 1. Thanks for your time.
Nick
CS5 Production Suite
-
Well it is a hockey game that is about 50 mins long. I am going to need to compress it so it will be able to play on hte internet through our website but I will also be putting it on to DVD’s for those players that are still living the dream and want to make their wives or moms watch them play.
Nick
CS5 Production Suite
-
Hey Todd,
Thank you for that resource. Looking through all of them I can’t find where someone controls the volume of the audio layer. Basically what I want to do it create an expression that will use values from a null layer to know what volume a specfic layer shoudl be at. So I guess what I am asking is what is the code I need to adjust the volume.
I thought it was something like:
thisComp.layer(“Audio Layer”).audio.audioLevels
but it is giving me anything. So how do I access the audio level at any given time? Thanks
Nick
CS5 Production Suite
-
Hey Dan,
So it was an order issue with how I was putting the layers in because the expression was referencing a layer that hadn’t been created yet. Thanks for all your help.
Nick
CS5 Production Suite
-
Dan,
That was only a piece of the script. I need to do the same thing to 3 different layers. So the middle of my script looks like this:
// add the text layers needed for the scoreboard
// clock
var theTime = myComp.layers.addText("10:00");
theTime.position.setValue([1554,124]);
myTime = theTime.property("ADBE Text Properties").property("ADBE Text Document");
var myTimeDoc = myTime.value;
myTimeDoc.font = "Square721BT-BoldExtended";
myTimeDoc.fontSize = 38;
myTimeDoc.fillColor = [1,1,1];
myTimeDoc.justification = ParagraphJustification.CENTER_JUSTIFY;
myTime.setValue(myTimeDoc);
theTime.name = "Score Clock";
// get clock expression file
var ceFile = new File("/C/Program Files/Adobe/Adobe After Effects CS4/Support Files/Scripts/Expressions/clockExp.js");
if (ceFile != null)
{
ceFile.open('r');
var ceFileText = ceFile.read();
theTime.text.sourceText.expression = ceFileText;
}// home score
var homeScore = myComp.layers.addText("0");
homeScore.position.setValue([818,124]);
myHomeS = homeScore.property("ADBE Text Properties").property("ADBE Text Document");
var myhsDoc = myHomeS.value;
myhsDoc.font = "Square721BT-BoldExtended";
myhsDoc.fontSize = 38;
myhsDoc.fillColor = [1,1,1];
myhsDoc.justification = ParagraphJustification.CENTER_JUSTIFY;
myHomeS.setValue(myhsDoc);
homeScore.name = "Home Score";
// get score expression file
var hsFile = new File("/C/Program Files/Adobe/Adobe After Effects CS4/Support Files/Scripts/Expressions/HomeScoreExp.js");
if (hsFile != null)
{
hsFile.open('r');
var hsFileText = hsFile.read();
homeScore.text.sourceText.expression = hsFileText;
}// away score
var awayScore = myComp.layers.addText("0");
awayScore.position.setValue([1230,124]);
myAwayS = awayScore.property("ADBE Text Properties").property("ADBE Text Document");
var myasDoc = myAwayS.value;
myasDoc.font = "Square721BT-BoldExtended";
myasDoc.fontSize = 38;
myasDoc.fillColor = [1,1,1];
myasDoc.justification = ParagraphJustification.CENTER_JUSTIFY;
myasDoc.text = "0";
myAwayS.setValue(myasDoc);
awayScore.name = "Away Score";
// get score expression file
var asFile = new File("/C/Program Files/Adobe/Adobe After Effects CS4/Support Files/Scripts/Expressions/AwayScoreExp.js");
if (asFile != null)
{
asFile.open('r');
var asFileText = asFile.read();
awayScore.text.sourceText.expression = asFileText;
}
And the script exits right away loading the first file. Am I doing something wrong?
CS5 Production Suite
-
Dan,
Yes that worked for me know as it is now putting the file contents in the sourceText but now my script ends as soon as that happens. It’s almost like it has a return or exit. It works perfect up to this point and then exits the script for some reason.
var homeScore = myComp.layers.addText("0");
homeScore.position.setValue([818,124]);
myHomeS = homeScore.property("ADBE Text Properties").property("ADBE Text Document");
var myhsDoc = myHomeS.value;
myhsDoc.font = "Square721BT-BoldExtended";
myhsDoc.fontSize = 38;
myhsDoc.fillColor = [1,1,1];
myhsDoc.justification = ParagraphJustification.CENTER_JUSTIFY;
myHomeS.setValue(myhsDoc);
homeScore.name = "Home Score";
// get score expression file
var hsFile = new File("/C/Program Files/Adobe/Adobe After Effects CS4/Support Files/Scripts/Expressions/HomeScoreExp.js");
if (hsFile != null)
{
hsFile.open('r');
var hsFileText = hsFile.read();
homeScore.text.sourceText.expression = hsFileText;
}And if I comment out the expression part the script runs out properly. Anyone know why that might be? Thanks
Nick
CS5 Production Suite
-
Hey Dan,
So I have done some reading and looking around at other posts and still can’t get my script to read in the file contents. I tried using read() but I get an error. This is what I have so far:
var hsFile = new File("/C/Program Files/Adobe/Adobe After Effects CS4/Support Files/Scripts/scoringexpression.js");
if (hsFile != null)
{
var hsFileText = hsFile.open('r');
if (hsFileText)
{
var hsExpression = eval(hsFileText);
homeScore.text.sourceText.expression = hsExpression;
}
else{
homeScore.text.sourceText.expression = '6';
}
}
Just have the 6 there so I know if it succeeded or failed.I also posted the expression code I am trying to put in the sourceText for the text layer below.
Thanks again for any help.
if (time > 0)
{
count = 0;
c = thisComp.layer("Game Markers");
n = c.marker.nearestKey(time).index;
if (c.marker.key(n).time > time) {n--;}// loop thru
for (i = n; i > 0; i--)
{
if (c.marker.key(i).comment == 3)
{
count++;
}
}
}
else
{
count = 0;
}away = count;
CS5 Production Suite