Copy link to clipboard
Copied
Hi,
In our company we produce and render a lot of video material using AE.
To achieve this, we have a big render machine that has AME installed and watch folders set (machine with almost 200GB of RAM). Employees produce compositions in After Effects, save the project with dependencies to a specific folder, and the render machine will pick it up. The compositions are not placed in sub-folders in the project so ensure that AME 'sees' them.
The problem we are having is that, each time an employee adds a composition in their After Effects file, AME does not render this new composition.
For example:
1. Create project with:
Comp 1, Comp 2, Comp 3
2. Save to watch folder
3. AME renders:
Comp 1, Comp 2, Comp 3
4. Employee now creates an additional composition, project now looks like:
Comp 1, Comp 2, Comp 3, Comp 4
5. Save to watch folder
6. AME still renders:
Comp 1, Comp 2, Comp 3.
Only when restarting AME, will it immediately pick up a new render with comp 4 included.
We need to send someone over to the render room now every time a composition is added to the project.
Or someone needs to connect by Remote Desktop to close and open AME, which is a really tedious task as compositions are added a lot.
Now, I have learned on the forums this may be by software design: that Media Encoder loads a version of the AE Project into memory and keeps it in memory regardless of whether the source changes. This prevents corruption for when the AE file is overwritten while Media Encoder is rendering.
However, how can I ensure AME will actually check the watch folder for changes? Also in terms of updating and fetching new compositions from the AE project?
We're using the latest CC versions, all updated on Windows 10 machines.
Other than this, no problems with AME.
Thanks in advance
I wrote a script to automate the process for your editors. This gave me a good excuse to write my first AE script
The script will perform the following steps:
Copy link to clipboard
Copied
Have you considered a simple workaround such as saving the project with a unique filename every time you save it to the watch folder? Like appending a number to the end and incrementing it every time you save? (myproj_1, myproj_2, etc...). This seems like a reasonable workaround since the project you're saving to the watch folder is only a copy anyway (that get moves to the 'source' folder after rendering).
Copy link to clipboard
Copied
This does not work for us.
We use File -> Dependencies -> Collect Files
We are not using 'save a copy'.
We do this as of recommendation by Adobe for multi-machine watch folder rendering:
This ensures that all assets in the project are copied with it, so that AME is not missing any media during render.
When we do this, we cannot create a new file name or change the version number.
Copy link to clipboard
Copied
How about using 'Save a copy' locally to rename the project prior to collecting the files onto your network share. Again, not the cleanest solution but still preferable to using sneaknet / Remote Desktop to restart ME.
Copy link to clipboard
Copied
Alright, I see what you mean.
This is not necessarily a solution but a workaround. We will need to inform all our editors to do this..
I'll try this out tomorrow and let you know if having a new project solves this issue.
Copy link to clipboard
Copied
I wrote a script to automate the process for your editors. This gave me a good excuse to write my first AE script
The script will perform the following steps:
The uniquely-generated project will remain on the disk after the script completes - I don't believe Javascript/ExtendScript allows files to be deleted (security precaution).
Copy and paste the script below and save it as "CollectFilesWithUniqueProjName.jsx" to your computer.
You can execute this script by performing File -> Scripts -> Run Script File. A better and easier way is to save a copy to your AE scripts folder (typically C:\Program Files\Adobe\Adobe After Effects CC 2017\Support Files\Scripts). After first copying it you'll need to restart AE once since it only loads the script list at startup. It'll then be available via a single click of File -> Scripts -> (Select the script in the list of scripts).
Here's the script. I've only tested it under the Windows version of AE:
/*
CollectFilesWithUniqueProjName.jsx
Author: Horshack, 04/10/17
Saves current project as unique temporary filename, then brings up
'Collect Files' dialog to allow user to save the project+files under unique
name, then re-opens original project.
This is a workaround to the Adobe Media Encoder "watch folder" issue of not
picking up new compositions in the project file.
Reference: https://forums.adobe.com/thread/2301289
*/
{
/*
* generate unique (temporary) filename for project based on current project name + current user + current date/time
*/
var currentDateTime = new Date();
var currentDateTimeStr = "" + (currentDateTime.getMonth()+1) + currentDateTime.getDate() + currentDateTime.getFullYear() + "_" + currentDateTime.getHours() + currentDateTime.getMinutes() + currentDateTime.getSeconds();
var origFile = app.project.file;
var origFullFileName = origFile.toString();
var newFileName = origFullFileName.substr(0, origFullFileName.lastIndexOf(".")) + "_" + system.userName + "_" + currentDateTimeStr + ".aep";
writeLn("Temporary filename: " + newFileName);
/*
* first, save current project to make sure any outstanding changes are reflected in original project file
*/
app.project.save();
/*
* now save project again under unique (temporary) filename
*/
var newFile = new File(newFileName);
app.project.save(newFile);
/*
* trigger 'Collect Files' dialog to allow user to save project under unique/temp filename
*/
app.executeCommand(app.findMenuCommandId("Collect Files..."));
/*
* all done - re-open original project
*/
app.open(origFile);
}
Copy link to clipboard
Copied
This is great, thanks for taking this amazing effort.
I have just installed the script as you explained and it works.
It indeed overcomes the issue of picking up new compositions / AME not refreshing the project file.
We will experiment a little more with this script.
Perhaps we can also rework the script to, upon executing, automatically delete the old AE project files that were temporarily saved for this script to work. But not sure whether a javascript file can access the Windows file system in that fashion.
Again, thanks for this solution. Hope others can benefit from it as well.
Copy link to clipboard
Copied
Was actually pretty straightforward.
The temporary project created for this (that you create by means of current date and time) is simply removed by adding the line below.
However, make sure that you enable the checkbox that AE Scripts can access the File system (AE -> Preferences -> General)
//trigger 'Collect Files' dialog to allow user to save project under unique/temp filename
app.executeCommand(app.findMenuCommandId("Collect Files..."));
//Delete the temporary project, we don't need it anymore
newFileName.remove();
//all done - re-open original project
app.open(origFile);
}