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

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.8K

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

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 ,
Sep 16, 2021 Sep 16, 2021

Copy link to clipboard

Copied

LATEST

It appears that enc.encode() is not available in AME 2020 and 2021.

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