Copy link to clipboard
Copied
Hello,
I'm trying to edit an exported title file from PPro. The editing is working but when I import the file back into PPro, PPro crashes.
I've tried writing the file as UTF8 and UTF16. Both crash PPro. Any ideas?
thanks,
Kelly
Here's my code:
##########################################
var tapeType = "<TRString>TAPE TYPE</TRString>";
var theFile = File("/Users/ops.kanderson/Desktop/OnAir Slate.prtl");
theFile.open ("r");
var theText = theFile.read();
theFile.close();
theText = theText.replace (tapeType, "<TRString>GENERIC MASTER</TRString>");
var outFileName = 'kellySlateText1' + '.prtl';
var completeOutputPath = "/Users/ops.kanderson/Desktop/" + outFileName;
var outFile = new File(completeOutputPath);
if (outFile){
outFile.encoding = "UTF8"; OR outFile.encoding = "UTF16";
outFile.open("w", "TEXT", "????");
outFile.write(theText);
outFile.close();
}
##########################################
There are no specs; it's not a documented or supported format.
Best approach to automagically updating titles, today = do the titles in AE, and send AE ExtendScript from a PPro panel (yep, it's possible) to make those changes.
Getting/setting the text from PPro's titles is high on the API request list.
Copy link to clipboard
Copied
What encoding does [your favorite text editor] say the .prtl is written with, BEFORE your changes?
Copy link to clipboard
Copied
In my research, TextEdit says the file is UTF-16. Textwrangler and BBEdit say UTF-16 Little Endian. The Mac terminal says UTF-16 Little Endian. So I changed my code to be UTF16LE and the file still crashes PPro.
if (outFile){
outFile.encoding = "UTF16LE";
outFile.open("w", "TEXT", "????");
outFile.write(theText);
outFile.close();
}
Copy link to clipboard
Copied
I'm still working on this issue.
I still cannot export a .prtl then edit the file in a text editor and re-import the file into PPro without PPro crashing.
Are there any known specs for a .prtl file?
Is anyone working with this same workflow?
thanks,
Kelly
Copy link to clipboard
Copied
There are no specs; it's not a documented or supported format.
Best approach to automagically updating titles, today = do the titles in AE, and send AE ExtendScript from a PPro panel (yep, it's possible) to make those changes.
Getting/setting the text from PPro's titles is high on the API request list.
Copy link to clipboard
Copied
Despite the PRTL claiming to be UTF-16, I think it's actually encoded as UTF-8.
I managed to modify a PRTL in TextWrangler and import into Premiere without it crashing by:
Copy-pasting the XML data into an empty document. TextWrangler auto-detects it as UTF-16. I manually change it to UTF-8 (but do not touch the XML declaration <?xml version="1.0" encoding="UTF-16" ?>).
When I save this as a PRTL, TextWrangler warns me about "Document encoding mismatch." but I save it anyway.
Premiere imports the PRTL without crashing.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now