1

I've been trying to figure this out for the past day or two with minimal results. Essentially what I want to do is send my selected comps in After Effects to Adobe Media Encoder via script, and using information about them (substrings of their comp name, width, etc - all of which I already have known and figured out), and specify the appropriate AME preset based on the conditions met. The current two methods that I've found won't work for what I'm trying to do:

https://www.youtube.com/watch?v=K8_KWS3Gs80

https://blogs.adobe.com/creativecloud/new-changed-after-effects-cc-2014/?segment=dva

Both of these options more or less rely on the output module/render queue, (with the first option allowing sending it to AME without specifying preset) which, at least to my knowledge, won't allow h.264 file-types anymore (unless you can somehow trick render queue with a created set of settings prior to pushing queue to AME?).

Another option that I've found involves using BridgeTalk to bypass the output module/render queue and go directly to AME...BUT, that primarily involves specifying a file (rather than the currently selected comps), and requires ONLY having a single comp (to be rendered) at the root level of the project: https://community.adobe.com/t5/after-effects/app-project-renderqueue-queueiname-true/td-p/10551189?page=1

Now as far as code goes, here's the relevant, non-working portion of code:

function render_comps(){
    var mySelectedItems = [];
     for (var i = 1; i <= app.project.numItems; i++){
       if (app.project.item(i).selected)
      mySelectedItems[mySelectedItems.length] = app.project.item(i);
     }
     for (var i = 0; i < mySelectedItems.length; i++){
       var mySelection = mySelectedItems[i];
//~                     front = app.getFrontend();
//~                     front.addItemToBatch(mySelection);
//~                     enc = eHost.createEncoderForFormat("H.264");
//~                     flag = enc.loadPreset("HD 1080i 25");                    
                    //app.getFrontend().addItemToBatch(mySelection);
                    var bt = new BridgeTalk();
                    bt.appName = "ame";
                    bt.target = "ame";
                    //var message = "alert('Hello')";
                    //bt.body = message;
                    bt.body="app.getFrontend().addCompToBatch(mySelection)";
                    bt.send();
     }
            }

Which encapsulates a number of different attempts and things that I've tried.

I've spent about 4-5 hours trying to scour the internet and various resources but so far have come up short. Thanks in advance for the help!

Helixdnb
  • 11
  • 3
  • 1
    I'd be looking at scripting AME, then calling that script from AE. I don't think Adobe officially support scripting AME, but it could be possible, see [Is Adobe Media Encoder scriptable with ExtendScript?](https://stackoverflow.com/a/48907412) – stib Apr 05 '20 at 02:25

0 Answers0