-->

Is Adobe Media Encoder scriptable with ExtendScrip

2020-06-16 04:19发布

问题:

Is Adobe Media Encoder (AME) Scriptable? I've heard people mention it was "officially scriptable" but I can't find any reference to its scriptable object set.

Has anyone had any experience scripting AME?

回答1:

Adobe media encoder is 'officially' not scriptable but we can use extend script API for scripting AME. Below functions are available through extend script

1.Adding a file to batch

Encode progress

host = App.GetEncoderHost (); 

enc = EHost.CreateEncoderForFormat ( "QuickTime");

flag = Enc.LoadPreset ( "HD 1080i 29.97, H.264, AAC 48 kHz"); 
an if (flag) { 
f = enc.encodeEncodeProgress 
= function (progress) { 
$ .writeln (progress); 
} 
eHost. enc.encode ("/ Users / test / Desktop / 00000.MTS", "/Users/test/Desktop/0.mov"); 
} else { 
alert ("The preset could not be loaded "); 
} 

encode end

ehost = App.GetEncoderHost (); 
enc = EHost.CreateEncoderForFormat ( "QuickTime"); 
flag = Enc.LoadPreset ( "HD 1080i 29.97, H.264, AAC 48 kHz"); 
an if (flag) { 
f = enc.onEncodeFinished 
= function (success) { 
if (success) { 
alert ("Successfully encoding has ended "); 
} Else { 
Alert (" failed to encode "); 
} 
} 
EHost.RunBatch (); 
} Else { 
Alert (" preset could not be read "); 
} 

2.Start batch

eHost = app.getEncoderHost (); 

eHost.runBatch (); 

3.Stop batch

eHost = app.getEncoderHost ();

eHost.stopBatch (); 

4.Pause batch

eHost = app.getEncoderHost (); 

eHost.pauseBatch ();

5.Getting preset formats

EHost = App.GetEncoderHost (); 

List = EHost.GetFormatList (); 

6.getting presets

eHost = app.getEncoderHost (); 

enc = eHost.createEncoderForFormat ("QuickTime"); 

list = enc.getPresetList (); 

and many more...

The closest bits of info I've found are: http://www.openspc2.org/book/MediaEncoderCC/

The latter resource is actually good, if you can read japanese, or at least use the Chrome built-in translate function, then you can see it has resources such as this one:

http://www.openspc2.org/book/MediaEncoderCC/easy/encodeHost/009/index.html

We can perform almost all basic functionalities through script.



回答2:

I had a similar question about Soundbooth.. I haven't tried scripting Adobe Media Encoder though, it doesn't show up in the list of applications I could potentially connect to and script with the ExtendScript Toolkit.

I did find this article that might come in handy if you're on a Windows. I guess using something similar written in AppleScript could do the job on a OSX. I haven't tried it, but this Sikuli thing looks nice, maybe it could help with the job.

Adobe Media Encoder doesn't seem to be scriptable. I was wondering, for batch converting, could you use ffmpeg ? There seem to be a few scripts out there for that, if you google for ffmpeg batch flv.

HTH, George



回答3:

The official stance at the moment is "no", but if you open the Adobe Extend Script Toolkit, and set the target app to Media Encoder, you will see in the Data Browser that a few objects and methods are already exposed in the app object, like app.getFrontend(), app.getEncoderHost() etc. There is no official documentation though, and no support, so you are free to experiment with them at your own risk.

You can use the ExtendScript reflection interface like this:

a = app.getFrontend()
a.reflect.properties
a.reflect.methods
a.reflect.find("addItemToBatch").description

But as far as I can see, no meaningful information can be found this way beyond list of methods and properties.

More about the ExtendScript reflect interface can be found in the JavaScript Tools Guide CC document.



回答4:

Doesn't seem to be. There're some reference to it being somewhat scriptable via using FCP XML yet it's not "scriptable" in its accepted form.



回答5:

I got here after it came second in the duckduckgo results for "extendscript adobe media encoder". First was a post on the Adobe forums where an adobe staffer wrote:

Scripting in Adobe Media Encoder is not a supported feature.

and, just to give the finger to anyone seeking to develop solutions for adobe users using adobe's platform:

Also, this is a user-to-user forum, not an official channel for support from Adobe personnel.

I think the answer is "Adobe says no"