Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Editing a Title (.prtl) file

Explorer ,
Sep 27, 2016 Sep 27, 2016

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();

}

##########################################

TOPICS
SDK
1.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Dec 12, 2016 Dec 12, 2016

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.

Translate
Adobe Employee ,
Sep 28, 2016 Sep 28, 2016

What encoding does [your favorite text editor] say the .prtl is written with, BEFORE your changes?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 28, 2016 Sep 28, 2016

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();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 12, 2016 Dec 12, 2016

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 12, 2016 Dec 12, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 15, 2016 Dec 15, 2016
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines