5 Replies Latest reply on Dec 15, 2016 1:27 PM by Jerome Raim

    Editing a Title (.prtl) file

    Kelly Anderson

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

      }

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

        • 1. Re: Editing a Title (.prtl) file
          Bruce Bullis Adobe Employee

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

          • 2. Re: Editing a Title (.prtl) file
            Kelly Anderson Level 1

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

            }

            • 3. Re: Editing a Title (.prtl) file
              Kelly Anderson Level 1

              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

              • 4. Re: Editing a Title (.prtl) file
                Bruce Bullis Adobe Employee

                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.

                • 5. Re: Editing a Title (.prtl) file
                  Jerome Raim Level 1

                  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.