Premiere pro failed to export H256 by using exportAsMediaDirect function
i am using Premiere Pro v25.3.0, i tried to encode an project to H256 format with following code, but the return of exportAsMediaDirect always is Error: -1 and there was not encoding happened, please help!!!! Can it be a bug from Adobe?
followings are i have tried or found:
- if used the Premiere pro exporter GUI (File->Export->Media...) and imported the same preset file (export_1080p_H265.epr) , encoding was successful
- Tried to create and save a new H256 preset file from Premiere Pro v25.3.0, the code still not worked
- the code was working for H264 preset file
var out_put_path = "C:\\Temp\\adobe_premiere\\out_put.mp4";
//var preset_path = "C:\\Temp\\adobe_premiere\\export_1080p_H264.epr";
var preset_path = "C:\\Temp\\adobe_premiere\\export_1080p_H265.epr";
seq = app.project.activeSequence;
if (!seq)
{
alert("No active sequence found. Please open a sequence in the project.");
}
var result = seq.exportAsMediaDirect(out_put_path, preset_path, 0)
$.writeln("Exported result: " + result); // output: Exported result: Error: -1
