Copy link to clipboard
Copied
Hey folks,
I have this issue with RENDER PRESET when rendering from script:
app.encoder.encodeSequence(sequence, outputPath, presetPath, workArea, removeUponCompletion);
The presetPath for .epr file is correct,
and even when I want to use ProRes, h264 mp4, AVCHD or whichever,
it somehow always take the first preset from Encoder list which is an .aac preset.
- How do I know the .epr file path is correct?
When I brake it - the Encoder doesn't even open - there is no error thou.
- I use Visual Studio Code 1.73.1, Premiere Pro 24.1.0 (build 85), AME 24.1.1 (build 2)
- The same thing happens when I use app.encoder.encodeFile() and app.encoder.encodeProjectItem().
- The same thing happens when I run Encoder first via app.encoder.launchEncoder() and then try to render.
- Also I found that the last extension part of my outputPath is useless too, it doesn't matter if I write ".mp4" or ".mov" or whatever, it doesn't use anything after the dot, just uses .aac.
I attached a screenshot of my queue
Did I make some rookie mistake or is this a bug? Any workarounds?
Sadly without it, the whole automation process is pretty useless 😮
Thanks for any help guys!
I doubt that will help; the script is "working", insofar as it's adding a job to the queue, so installation doesn't seem like the problem.
I propose radical simplification of the params and folders you're trying to use, to simplify (and eliminate potential points of failure):
var seq = app.project.activeSequence;
if (seq){
var presetPath = "/Users/Rafal/Desktop/any_old_.epr";
var outputPath = "/Users/Rafal/Desktop/test_output_filename";
var result = app.project.encodeSequence(seq,
...
Copy link to clipboard
Copied
Hi Rafál,
I've confirmed that app.encoder.encodeSequence() is working correctly in PPro 24.1, and does use the .epr file passed in.
The extension you're providing for your output path will be overridden by the actual extension, specified in the .epr file. PProPanel shows how to get the output extension of a given .epr file.
>How do I know the .epr file path is correct?
You're providing the .epr file, so you know the path to it, right?
Copy link to clipboard
Copied
Hi Bruce!
Thank you for your super fast reply!
Yes, I tried with few .epr files exported from AME,
and I tried with some build-in presets in root AME folder, like:
C:/Program Files/Adobe/Adobe Media Encoder 2024/MediaIO/systempresets/3F3F3F3F_4D6F6F56/Apple ProRes 422 LT.epr
Sadly neither works.
I though maybe I have wrong path, so I just edited, let's say:
../project/folder/preset.epr
to
../project/folder/presettttt.epr
The first one opened AME and used .aac,
the second one didn't even open AME, nothing happened --
-- that's why I wrote that I think the path is correct and the problem might be somewhere else.
Yes, I saw github panel samples and learn few interesting things from there, it's an awesome source 🙂
Can I attach you my .epr file so that you can confirm it works for you?
Sorry if that's too much to ask, I just wonder maybe it's some xml bug?
If yes, here's the link
Copy link to clipboard
Copied
Your .epr file works fine here. 🙂
var result = app.encoder.encodeSequence( app.project.activeSequence,
'/Users/bbb/Desktop/example',
'/Users/bbb/Desktop/4k_mp4_h264_100mbps.epr',
app.encoder.ENCODE_ENTIRE,
1);
Please post your encodeSequence() call, with full parameters...???
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Complicated! 🙂
I notice you have a non-escaped space in Masters_FolderPath ("1 Masters"). That won't help.
Copy link to clipboard
Copied
I see few redundant lines and different preset names in my last post,
sorry about that, I was just shrinking the larger code,
but I just tried only this short beat on already opened project with a sequence, tracks and file:
Copy link to clipboard
Copied
Since you established that PPro ignores your provided output extension anyway, do you see different behavior if you don't append ".mp4" onto the output path?
I'm grasping at straws here; this call is used by literally dozens (hundreds?) of broadcasters and enterprises every day, so I'm pretty confident it can work. 🙂
Copy link to clipboard
Copied
The way I see it, it goes sth like this:
1. so this dude want to render something, let's see...
2. okay I know which sequence we're talking about
3. ok, I know what output file he wants,
4. ok, I see the .epr preset, all good
5. from in to out, do not destroy after, all clear
6. opening AME...
7. ok, sequence added to the Queue
8. Wait, something's not right, I have a problem within this .epr thing, don't know what to do, let's set up the first default preset I got in my list and hope he's not gonna see 😄
Copy link to clipboard
Copied
I deleted ".mp4" part and the output is still the same (.aac)
Hm, maybe I will reinstall my AME 24.1.1 or try it on different PC?
Copy link to clipboard
Copied
I doubt that will help; the script is "working", insofar as it's adding a job to the queue, so installation doesn't seem like the problem.
I propose radical simplification of the params and folders you're trying to use, to simplify (and eliminate potential points of failure):
var seq = app.project.activeSequence;
if (seq){
var presetPath = "/Users/Rafal/Desktop/any_old_.epr";
var outputPath = "/Users/Rafal/Desktop/test_output_filename";
var result = app.project.encodeSequence(seq,
outputPath,
presetPath,
app.encoder.ENCODE_ENTIRE,
1);
}
[If you're on Windows, replace "/Users/Rafal/Desktop" with "C:\\\\Users\\Rafal\\Desktop"...]
Copy link to clipboard
Copied
Hell yeah it's finally working!
Your last sentence made wonders!
I've changed:
C:/Users/Rafal/Desktop...
into
C:\\Users\\Rafal\\Desktop...
Sooo...
outputPath = C:/Users/Rafal/Desktop...
presetPath = C:\\Users\\Rafal\\Desktop...
Suuuper weird but hey, it is working now!!!
Massive THANKS for your express help Bruce, you are trully a LEGEND! :fire:
Have a lovely weekend!
Copy link to clipboard
Copied
Glad that helped!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more