• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is there a non-gui mode for after effects?

Explorer ,
Mar 08, 2012 Mar 08, 2012

Copy link to clipboard

Copied

What I am trying to do is access information through scripting such as files that have been imported into the project. Is there any way to open up after effects in a non-gui mode the way nuke can be opened in terminal mode?

TOPICS
Scripting

Views

6.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 04, 2012 Sep 04, 2012

Copy link to clipboard

Copied

I would like to know this too.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 07, 2012 Sep 07, 2012

Copy link to clipboard

Copied

In windows, you can call AE from the command line like so:

afterfx -noui

The -noui switch tells the afterfx executable to stop the GUI from launching with it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

The -noui argument seems to work in OSX as well.  I'm having difficulty getting AE to launch/run a script via the command line though (on OSX)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

I haven't done much automation with AE on OSX.  I recall reading somewhere that AppleScript may be the answer to starting it on OSX.  If you find out more about launching AE via command line in OSX, please post back.  I'd also like to know.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

I suspect Apple script will be required as well.  I am able to drop a .scpt file onto the AE.app in the Finder, it launches & executes the script.  Let me see if I can dig up a command line way to make this happen in conjunction with the -noui argument.  My current workaround is to add the script to the AE scripts startup folder, launch AE with the -noui argument, then delete script.  This is of course very hacky so I would prefer something more straight forward.

I'll post back the results!

-Andy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

Just so its written somewhere out on the intertubes, since I had a great deal of difficulty tracking this down:

#this command will launch AE in Render Engine mode, w/o a ui

open -n -a 'Adobe After Effects CS5.5.app' --args -re -noui

#this command will launch AE in Render Engine mode, with a ui

open -n -a 'Adobe After Effects CS5.5.app' --args -re

#this command will launch AE in normal/interactive mode, w/o a ui

open -n -a 'Adobe After Effects CS5.5.app' --args -noui

#this launches AE w/o a UI, but the script never runs

open -n -a 'Adobe After Effects CS5.5.app' --args -noui -s 'alert(1)'

#this launches AE with a UI, but the script never runs

open -n -a 'Adobe After Effects CS5.5.app' --args -s 'alert(1)'

#this launches AE with a UI, but does not execute the script (scripts contents is alert("hello world!");)

open -n -a 'Adobe After Effects CS5.5.app' --args -r /path/to/script/helloWorld.jsx

I got the -r and -s arguments from this doc, page 5:

http://blogs.adobe.com/toddkopriva/files/2012/06/After-Effects-CS6-Scripting-Guide.pdf

Too bad, I would really like to use the -s and -r arguments, on OSX.

This also does not work:

open -n -a 'Adobe After Effects CS5.5.app' --args /path/to/script/helloWorld.jsx

I get an error from After Effects that says "After Effects error: Can't import file "helloWorld.jsx": unsupported filetype or extension. ( 0 :: 1 )"

I was incorrect earlier saying that dragging a .scpt file will launch it on AE... I think I had a sinapse misfire or something.

Dropping a .jsx file onto AE from the finder results in the same error.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

Okay, got this working.

Here is the content for the applescript:

set theFile to "/path/to/script/helloWorld.jsx"

open for access theFile

set fileContents to (read theFile)

close access theFile

tell application "Adobe After Effects CS5.5"

  DoScript fileContents

end tell

And here is how you launch it from the command line:

osascript  /path/to/apple/script/ae_55_runJsx.scpt

If AE is not up and running, the apple script will cause it to launch.

If you launch AE using the -noui argument, then run the osascript, the script does run (I get the hello world! popup from AE):

open -n -a 'Adobe After Effects CS5.5.app' --args -noui

osascript /path/to/apple/script/ae_55_runJsx.scpt

Hope this helps others in the future.

Does this feel incredibly convoluted to anyone else?

I've written plenty of compiled code in my days, and I never found it challenging to add/parse command line arguments.

Is there a specific reason the -r and -s input arguments do not work with After Effects on OSX?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 03, 2012 Oct 03, 2012

Copy link to clipboard

Copied

I agree it's convoluted, but I definitely appreciate you posting your solution.  It's very useful information and should probably be documented by Adobe's AE team.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 14, 2013 May 14, 2013

Copy link to clipboard

Copied

Thank you for posting this solution. You saved me tearing all my hair out after following the examples on page 6 of the scripting guide (CS6) and them not working. Plabt, please update the second example (running a jsx file via AppleScript) to work as described above. The current example doesn't work:

set theFile to choose file

tell application "Adobe After Effects CS6"

     DoScript theFile

end tell

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 14, 2013 May 14, 2013

Copy link to clipboard

Copied

No problemo.

After posting this info, I figured out that it is possible to modify the commandLineRenderer.jsx script (check the scripts/startup/ folder for it).  My custom version has an extra input argument which I pass a jsx script to.  The jsx file contents are read, then evaluated.  This basically allows for using After Effects as a generalized image processing tool. (or prores 4444 movie maker.)  I'm not going to post the code since the commandLineRenderer.jsx file is Adobe's property.  One major limitation to this, if you try to save out an .aep file in the process, it will be corrupt.  I think this is a sort of copy protection or something on Adobe's part so people don't buy just one copy of AE and try to use it multiple times.  Make a copy of the commandLineRenderer.jsx file before messing with it!   This is working with CS 5.5, I havent tried it with 6.0 yet but I assume it will work fine.  Also, no matter how hard I try, I can't get it to run 'silently' in this way... IE: it always makes the "ding" sound when a comp completes rendering.

One note about launching AE via the AppleScript, it isn't always successful.  If you try to load a large AEP file, with lots of source media or whatever, AE will be in a state where it doesn't receive the JSX contents that the AppleScript sent it.  I ended up going the route I described w/ modifying the command line renderer, so I never needed to solve this.  Perhaps an sleep event or some sort of communication back to the AppleScript would be useful to ensure success.

Best of luck!

Message was edited by: Andyways, typos, grammer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 19, 2014 Aug 19, 2014

Copy link to clipboard

Copied

Well after much googling, it turns out that the documentation in the AE Scripting Guide is incorrect for running a script file on OSX.  The PDF for CS3 and CS6 document the following in Applescript:

set theFile to choose file

tell application "Adobe After Effects CS3"

     DoScript theFile

end tell

As Christian Lett points out, this example does not work.  However, after finding this little tie bit on the inter webs over at Stack Overflow, this actually does work:

set theFile to choose file

tell application "Adobe After Effects CS3"

     DoScriptFile theFile

end tell


So the difference is that you must use `DoScriptFile` rather than simply `DoScript`.  I think this will get around the limitation that Andyways mentions about large AEP files not being able to execute the script properly.

Hope that helps!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 25, 2023 Nov 25, 2023

Copy link to clipboard

Copied

LATEST

I've been using LuminousRender for Mac ...  works great 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines