Media Encoder automation system with using ExtendScript

New Here ,
Sep 16, 2017 Sep 16, 2017

Copy link to clipboard

Copied

Hi

I develop Media Encoder automation system with using ExtendScript.

I have a question:

When I run my source code, AME 2017 was succeed but AME 2017.1 was failed.

I checked exception.

Exception message is :

"enc.encode is not a function."

following my source code

  var id = // preset id;

   var encHost = app.getEncoderHost();

   var enc = encHost.createEncoderForFormat(args.format);

   var preset = enc.loadPreset(args.pid);

   if(preset){

   var src = // source path

   var dst = // dst path

          enc.encode(src, dst);

      }

   enc.onEncodeFinished = function(success){

  }

   encHost.runBatch();

   return {message:"Info from AME: Transcode has started."}.toSource();

  }else{

   throw "Preset was not found.";

  }


Do you have any solutions?

Views

1.1K

Likes

translate

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 18, 2017 Oct 18, 2017

Copy link to clipboard

Copied

Hi,

var fileName=//source;

var format="H.264";//preset format

var epr=//preset path;

var output=//output

var fe = app.getFrontend();

var addResult = fe.addFileToBatch(fileName,format,epr,output);

Thanks and Regards,

Anoop

Likes

translate

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