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

Adobe Media Encoder Scripting: Run from Commandline

Engaged ,
Jan 25, 2019 Jan 25, 2019

Copy link to clipboard

Copied

I am fully aware that Adobe does not "officially" support Media Encoder scripting through ExtendScript in the way they do for most of the other applications.  But it is possible:

https://stackoverflow.com/questions/2170163/is-adobe-media-encoder-scriptable-with-extendscript

However, it only seems that the script can be run by opening up the ExtendScript Toolkit and manually clicking the green arrow which causes the script to run.

f4NOS.png

Naturally, this is far from ideal.  For other Adobe applications, such as After Effects, the script can be run from command line in the following fashion:

    "C:\Program Files\Adobe\Adobe After Effects CC 2018\Support Files\afterfx.exe" -r  "script/path/here.jsx"

(See here for a reference: Run .jsx File From Command Line Windows )

However, when trying the same thing for Adobe Media Encoder (replacing it with the appropriate path), no such luck.  Although the Media Encoder window becomes active, the script does not run.

Another thought was to put `#target ame` at the beginning of the script and then try running it with ExtendScript directly.  When doing so, you get this window:

Fovvs.png

Unfortunately, clicking "Yes" does absolutely nothing.

The goal here is to be able to run my .jsx script for Media Encoder in some kind of automated fashion, without having to open ExtendScript and manually click on the green arrow each time.  Surely there's some way to do this, but apart from the methods I've tried above which don't work, I cannot think of anything.  What exactly is clicking that little green arrow doing, and is there any way to emulate that click from command line?  I'm willing to try anything to enable me to run this script completely automated.

Any ideas?!?

For reference, I am using Adobe Media Encoder CC 2017 and Windows 10 build 14393.

Views

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

correct answers 1 Correct answer

New Here , Jan 27, 2019 Jan 27, 2019

For Media Encode the command  is --console es.executeScript "script/path/here.jsx"

Votes

Translate

Translate
New Here ,
Jan 27, 2019 Jan 27, 2019

Copy link to clipboard

Copied

For Media Encode the command  is --console es.executeScript "script/path/here.jsx"

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 ,
Jan 27, 2019 Jan 27, 2019

Copy link to clipboard

Copied

Genius!  I was unable to find this information anywhere, but it worked perfectly!  Thank you so much.

Just for extra clarification, here's what I tried in command prompt (CMD) on Windows and it worked:

"C:\Program Files\Adobe\Adobe Media Encoder CC 2017\Adobe Media Encoder.exe" --console es.executeScript "D:\Projects\encode_all_mxfs.jsx"

I'm just curious; how did you figure this out?  I haven't been able to find this information anywhere online.

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
New Here ,
Feb 25, 2019 Feb 25, 2019

Copy link to clipboard

Copied

I also tried that way but it produces nothing.

"C:\Program Files\Adobe\Adobe Media Encoder CC 2017\Adobe Media Encoder.exe" --console es.executeScript "F:\AME Script Test\test.jsx"

The script works with ExtendScript Toolkit but nothing happen with command prompt method. I just see OS get focus on AME and that's all. I tried with the more simple script "alert("hello");" for no result.

AME CC 2017 / Windows 7

Does anybody have an idea ?

By the way, where did you find documentation about functions and methods provided by AME in ESTK ?

Fow now i'm stuck with associating batch file and format preset.

Import file to batch list OK, get info from file OK, set format OK, set format on file NO.

The only information i found is :

front = app.getFrontend();

front.addItemToBatch(sourcefile);

enc = eHost.createEncoderForFormat("H.264");

flag = enc.loadPreset("HD 1080i 25");

enc.encode(sourcefile, targetfile)

but ESTK told me "encode is not a function" . . .

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
New Here ,
May 25, 2021 May 25, 2021

Copy link to clipboard

Copied

Did you ever find a solution to this? I am having the same issue as you. The script works fine in ExtendScript Toolkit, but the command prompt will focus on AME and then stop.

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
New Here ,
Jun 24, 2022 Jun 24, 2022

Copy link to clipboard

Copied

LATEST

any news on this?

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
New Here ,
Oct 09, 2020 Oct 09, 2020

Copy link to clipboard

Copied

Hi Chadobewan, where Can I find a documentation or help about executing the javascript from command line?

There is a way to run media encoder in background?

 

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