Copy link to clipboard
Copied
Hi there,
Using media encoder 2022.
I have test.jsx script contains alert("Hello");
I have batch script run.bat which contains below.
"C:\Program Files\Adobe\Adobe Premiere Pro 2022\Adobe Premiere Pro.exe" --console es.processFile "test.jsx"
When executed.
Media encoder shows error and doesn't execute.
But, tried the same from console of media encoder with below command.
es.processFile "test.jsx"
It works fine and alert pops up.
Tried other commands in bat file es.executeScript , es.process , --executescript.
None seems to work.
How to solve this? Did anyone solve this?
I verified. It is working. You need to make sure that the file at the provided (absolute) path exists and the script does not have syntactic errors.
See here for more details:
https://ame-scripting.docsforadobe.dev/
We are running all our daily automated tests using this on MacARM, MacIntel, Windows 10 and Windows 11. What are your system specs? And which version of AME are you using? Can you try newer versions such as Beta?
Please create a small sample that only contains one line:
alert("hello World!");
Put that on the desktop. And run it from the command line, like above.
If that doesn't work, send me the script and all detailed steps that you performed, including the command line command you executed.
Copy link to clipboard
Copied
You need to provide the full absolute path to the script.
Copy link to clipboard
Copied
For AME 2022 - this is not working below ? (command line send script to AME)
"You can also launch scripts from the command line on Mac and Windows, like this"
<fullPathToAMEbinary> --console es.processFile <fullPathToScript>
Is this known?
Copy link to clipboard
Copied
I verified. It is working. You need to make sure that the file at the provided (absolute) path exists and the script does not have syntactic errors.
See here for more details:
https://ame-scripting.docsforadobe.dev/
Copy link to clipboard
Copied
Hey there, if you don't mind having a look?
Files verified and checked location of .exe and the jsx file.
The code in the .jsx checked too (run from vscode and creates the mp4 output fine);
AME is just activated and nothing happens. I tried on latest AME too 23+ and same lack of response from AME. Apologies if it's a simple error but I can't see an issue. Paths are in quotes too.
Run on cmd.exe
"C:\Program Files\Adobe\Adobe Media Encoder 2022\Adobe Media Encoder.exe" --console es.processFile "C:\Program Files\Adobe\Adobe After Effects 2022\Support Files\Scripts\ame.jsx"
Contents of ame.jsx
// make sure to replace "\\" by "/" on Mac with a valid path
var source = "D:\\Promo.mov";
var preset = "C:\\Users\\Alan Eddie\\Documents\\Adobe\\Adobe Media Encoder\\22.0\\Presets\\MP4_Best_Youtube.epr";
var destination ="D:\\Renders\\"
var frontend = app.getFrontend();
var encoderWrapper = frontend.addFileToBatch(
source,
"H.264",
preset,
destination
);
Copy link to clipboard
Copied
Why are you storing your script in the app support files? There might be access rights issues involved.
Copy link to clipboard
Copied
I thought of that... Same issue wherever the .Jsx is placed. May I ask about the platform and version that the verification was completed on?
Thank you
Alan
Copy link to clipboard
Copied
We are running all our daily automated tests using this on MacARM, MacIntel, Windows 10 and Windows 11. What are your system specs? And which version of AME are you using? Can you try newer versions such as Beta?
Please create a small sample that only contains one line:
alert("hello World!");
Put that on the desktop. And run it from the command line, like above.
If that doesn't work, send me the script and all detailed steps that you performed, including the command line command you executed.
Copy link to clipboard
Copied
Thanks a lot for your help...
1.Tested on 23.2 and 22.0
2.file/folder permissions tested on home machine (full admin) and work machine(user account)
3.Windows 10 machines Version 10.0.19044 Build 19044
4.Like some others have posted, Media Encoder activates and becomes hilighted but then nothing. Sending scripts from vscode works fine. I need this to automate and link into other software.
5.I don't have access to Beta, as the versions are restricted in the CC account via my workplace. 22.3 is the most up to date that I can install.
Run on cmd:
"C:\Program Files\Adobe\Adobe Media Encoder 2023\Adobe Media Encoder.exe" --console es.processFile "D:\test.jsx"
Contents of test.jsx
alert("hello world");
Copy link to clipboard
Copied
I see you are having a similar conversation on another thread with another user. There must be some conflict with software or a setting or something. Verified not working on 2 machines.
AME can read the file using the console.
// This works.
es.processFile "D:\ame.jsx"
//This does not work:
[path to media encoder.exe] --console es.processFile "D:\ame.jsx"
Copy link to clipboard
Copied
This sounds really weird. Let's try to get down to teh issue.
So on which operating systems and AME versions did you see scripts not being executed from the command line? Do you have any non-standard configurations on your machine?
Copy link to clipboard
Copied
Tested on 2 different machines, work and home, both Windows 10. Tested AME 2018, 22.0, 22.5.
Just running it in cmd.exe and double checked all the paths etc. AME would load and hilight so it is in a sense activating the software but refusing to execute the .jsx.
Don't know where to start with configuration ? What should I be looking for ? I don't know what would interfere with the command flags not working on Adobe Media Encoder.exe.
Copy link to clipboard
Copied
Please copypaste the messages from the command window that AME produces.
We still cannot reproduce the issue. Here are some more ideas:
* Is an instance of AME already running? It shouldn't because you need to launch AME with the script (contrary to Visual Studio Code + ExtendScript debugger).
* Did you try the newest Beta that has some changes to script engine?
* Did you try to delete the user documents AME folder (i.e. preferences, debug database etc.)? You can copy the files to another place, just in case.
Copy link to clipboard
Copied
Hey there,
Deleted AME prefs folder = negative.
I don't have access to Beta(work restricted creative Cloud account).
Trying when AME is closed to start with = negative.
Here is what appears in the console...
<37776> <AMEApp> <1> Entering RunEventLoop
<35680 (dvascripting::Engine)> <exception> <4> Caught exception!
{
context: "dvacore::threads::`anonymous-namespace'::ThreadedWorkQueue::WorkerMain"
description: "filesupport::commondirs::CurrentUserDir"
file_extension: ".849c9593-d756-4e56-8d6e-42412f2a707b"
result_code: "-127598562"
timestamp: "2023-02-28T10:07:46.0Z"
type: "dvacore::filesupport::file_open_exception"
zstring: "$$$/dvacore/filesupport/FileOpenFailed"
}
Callstack:
[
dvacore::config::dva_exception::dva_exception ( @ 0) (dvacore.dll+0x000000000008B30C)
dvacore::filesupport::file_exception::file_exception ( @ 0) (dvacore.dll+0x00000000001072D1)
dvacore::filesupport::file_open_exception::file_open_exception ( @ 0) (dvacore.dll+0x00000000001073C5)
dvacore::filesupport::IPlatformByteStream::IPlatformByteStream ( @ 0) (dvacore.dll+0x0000000000119BFF)
dvascripting::extendscript::SetAppWillTerminate ( @ 0) (dvascriptingES.DLL+0x000000000002982C)
dvascripting::extendscript::SetAppWillTerminate ( @ 0) (dvascriptingES.DLL+0x0000000000028654)
dvascripting::ScriptContext::WillTerminate ( @ 0) (dvascripting.dll+0x00000000000E14EC)
dvascripting::utils::EvalScriptFile ( @ 0) (dvascripting.dll+0x00000000000EA3AE)
dvascripting::utils::GetEventRootTargetObject ( @ 0) (dvascripting.dll+0x00000000000EB7F2)
dvascripting::threads::CallFunctionOnUIThread_Syncronous ( @ 0) (dvascripting.dll+0x0000000000107879)
]
<39348> <EACL> <5> Connecting local hub to remote hub, requestID: "5e989cee-2e39-467a-9d56-20bbf9bcfb1d", server: "https://cc-api-teamprojects.adobe.io:443", serverType: 2, user: "alan.eddie@rte.ie", machineID: "e5b1d598-4736-44bf-8c57-093c1c45b242"
<28584> <EACL.CloudProjectsLogin> <5> Finished sending new access token to LocalHub, result: 0, requestID: "dvanet-5e989cee-2e39-467a-9d56-20bbf9bcfb1d-d1df5d31-4c28-4d4b-a61b-ab49901bc940-5", duration: 0.20699999999999999, httpStatusCode: 200, httpLibCode: 0, payload: "[{\"authorized\":true,\"connected\":true,\"forbidden\":{\"error_code\":\"\",\"message\":\"\"},\"lastAuthorizationStatusCode\":200,\"serverURL\":\"https://cc-api-teamprojects.adobe.io:443\",\"serverVersion\":\"2016.83.0.1189\"}]"
Copy link to clipboard
Copied
Is this on Windows or Mac?
Copy link to clipboard
Copied
On a pc,
So got it to work perhaps after deleting the prefs folder ?
"D:\OneDrive - RTÉ\test.jsx" //this doesn't work - no permissions issues, maybe special character.
"D:\test.jsx" // this works.
Copy link to clipboard
Copied
Can you try putting in a special character like the "É" in the file name in the scenario that worked? E.g. "testÉ.jsx".
Copy link to clipboard
Copied
Yes...
D:\testÉ.jsx //doesn't work
D:\test.jsx // does work
Copy link to clipboard
Copied
Wow. Thanks for verifying. That looks like a bug.
Copy link to clipboard
Copied
Thanks for looking into it! Appreciate the time - I can now do my rendering via a hotkey, rather than 12 clicks and navigate etc.
Copy link to clipboard
Copied
I am happy that it now works for you.