Skip to main content
Participant
July 28, 2023
Question

Unable to export when using 'Sequence.exportAsMediaDirect()'. response: 'Error: Unknown Error'

  • July 28, 2023
  • 3 replies
  • 600 views

Hey, 

I'm trying to export a sequence automaticly to a .mp4-file with 'Sequence.exportAsMediaDirect()'-method. But I get 'Error: Unknown Error' as response. I don't get more explanation from the error, so I don't know where to search for the solution. From the debugger I get the response: 'Eval Result [premierepro-23.0 (NewWorld)]: Undefined'. The code I use is the following: 

 

var seq = app.project.activeSequence;
var Export_Media_Pad = "C:/Users/Gebruiker/Desktop/Test_Auto_Export_PremPro/ProductVideo_Export_extendScript.mp4";
var Export_Preset_File = "C:/Program Files/Adobe/Adobe Premiere Pro 2023/Settings/IngestPresets/Transcode/Match Source - H.264 High Bitrate.epr";
var result = seq.exportAsMediaDirect(Export_Media_Pad, Export_Preset_File, 0);
$.writeln(result);
 
Premiere Pro version: 23.5.0 (Build S6)
My operating system: Windows 10.0.19045
System Info:
CPU: AMD Ryzen 5 3600X
GPU: Radeon RX 570 Series
RAM: 32 GB
 
In the attachment you can find the project I am trying to export toe .mp4 file. 
 
 
This topic has been closed for replies.

3 replies

Inspiring
November 15, 2023

Hi, many thanks. Does it mean if not save the project before export it fails with an error? Or does changing language from js to python solve your problem?

Participant
November 14, 2023

Hey, 

 

This problem occurred months ago for me, and it was one of the many error messages I had to resolve while writing my program 😄 Eventually, I wrote it in Python (the main code is in Python), and the piece of code that works looks like this. Hope this helps:

 

    Export_Preset_File = r"C:\Program Files\Adobe\Adobe Premiere Pro 2023\Settings\IngestPresets\Transcode\Match Source - H.264 High Bitrate.epr"
    project.save()
    try:
        sequence.exportAsMediaDirect(
            output_map, Export_Preset_File, pymiere.objects.app.encoder.ENCODE_IN_TO_OUT)
    except Exception as e:
        Print_Error_Functie("FOUT:", str(e))
    else:
        print (f"Export succesvol naar:   {output_map}")
 
Inspiring
November 14, 2023

Hi, I'm experiencing the same issue on Windows.
However, it works fine on Mac with Premiere Pro version 23.0.0.

@Pieter-Jan295492363up6 , how did you manage to resolve it?
In short, when using exportAsMediaDirect on Mac, it works, but on Windows, I encounter an Unknown error.