7 Replies Latest reply on Apr 11, 2017 2:31 AM by Brounzer

    Problem with Media Encoder watch folder and AE @ company

    Brounzer Level 1

      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

        • 1. Re: Problem with Media Encoder watch folder and AE @ company
          Horshack Level 4

          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).

          • 2. Re: Problem with Media Encoder watch folder and AE @ company
            Brounzer Level 1

            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.

            • 3. Re: Problem with Media Encoder watch folder and AE @ company
              Horshack Level 4

              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.

              • 4. Re: Problem with Media Encoder watch folder and AE @ company
                Brounzer Level 1

                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.

                • 5. Re: Problem with Media Encoder watch folder and AE @ company
                  Horshack Level 4

                  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:

                  1. Save current project with original filename (to make sure all changes are reflected)
                  2. Does the equivalent of a "Save As", using a unique/temporary filename based on the user name + date/time
                  3. Triggers the "Collect Files" dialog to allow your users/editors to perform their usual 'Collect Files' function
                  4. Re-opens the project with the original filename

                   

                  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);

                   

                  }

                  • 6. Re: Problem with Media Encoder watch folder and AE @ company
                    Brounzer Level 1

                    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.

                    • 7. Re: Problem with Media Encoder watch folder and AE @ company
                      Brounzer Level 1

                      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);

                       

                      }