Adobe Premiere CC PRTL files structure

if you try to work with subtitles in larger scale (eg. translating dialogues of feature-lenghted film) in adobe premiere cc, you run into problems for sure. it can import subtitles from final cut pro XML timeline, but doesn't accept all the font settings from Title Generators, among most important border size and font tracking. there is no option for bulk font style change for all the subtitles. therefore you must hack around by using adobe premiere's own title format PRTL and generate them yourselves. following brief remarks are result of my exploration of the format during writing of my script to convert srt to prtl, since there is no official documentation. PRTL ==== * single subtitle slate per file * utf-16 encoded XML. // you can convert it to more convenient utf-8 by: // iconv -f utf-16 -t utf8 filename.prtl > output.prtl // (change header utf setting to utf-8 respectively in text editor) * since the file is single line, you can make it more readable by: xmllint --format filename.prtl > output.prtl more readable and no change in data contents, right? should do the same, right? adobe programmers don't think so and if you try to debug, why imported titles don't have any color, this is a clue. eeek! so again: xmllint --noblanks filename-edited.prtl > output.prtl xmllint is your friend for debugging xml, in cases, you had a mistake in xml logic itself * premiere is also too lazy to take care of input handling -- if you make a mistake in PRTL file, no error is cast and software just crashes * no format reference is available. happy parameters discovery by guessing! * premiere somehow remembers imported PRTL. if you change something, give file different name or location. Subtitle itself is defined in <TextPage> <Position> (<x> and <y>) is upper left corner of title Each line is defined by section like: <TextLine Version="2" objectID="1" persistentID="3"> <BaseProperties Version="5"> <txBase>908.23</txBase> <XPos>806.335</XPos> <angle>0</angle> <verticalText>false</verticalText> <objectLeading>0</objectLeading> </BaseProperties> <EnclosingObjectType>block</EnclosingObjectType> <Alignment>center</Alignment> <RTL>false</RTL> <TRString TXMarker="Booyah">KYBERDŽIHÁD</TRString> <RunLengthEncodedCharacterAttributes> <CharacterAttributes RunCount="11" StyleRef="4097" TextRef="4097" TXKerning="0" TXPostKerning="0" BaselineShifting="0"/> </RunLengthEncodedCharacterAttributes> <tagName/> </TextLine> If you have more lines, you need separate TextLine for each. objectID is a number of line starting from 1, incremented by 1 persistentID is number, I don't understand, but for the first line it should be something like 3, and every next line 0 wrong objectID and persistentID are common cause of cc crash on PRTL import TRString is text of subtitle itself. Single line only, line breaks ignored RunCount is number of characters in TRString - if you mess it, no title is shown // in PHP use mb_strlen instead of strlen, because it's utf StyleRef and TextRef are styles of text defined earlier in PRTL file if you wanna draw a box, you can use <DrawPage> in <Layer> section like: <DrawPage> <DrawObject objectID="3" persistentID="8"> <BaseID> <ID>3</ID> <styleRef>4099</styleRef> </BaseID> <GraphicSpec Version="2"> <gPrimitive>1</gPrimitive> </GraphicSpec> <GraphicGeometry Version="3"> <gRotate>0</gRotate> <Fillets fillet0="0" fillet1="0" fillet2="0" fillet3="0" fillet4="0" fillet5="0" fillet6="0" fillet7="0"/> <Skew> <horizontal>0</horizontal> <vertical>0</vertical> </Skew> <gAttribute>0</gAttribute> <gCrsrX>336.296</gCrsrX> <gCrsrY>574.815</gCrsrY> <gSizeX>612.852</gSizeX> <gSizeY>109.148</gSizeY> </GraphicGeometry> <tagName/> </DrawObject> </DrawPage> Referenced Style (4099 in this case) must be defined in <Styles>, otherwise CC... crashes. gCrsrX and gCrsrY are coordinates of upper-left corner of the box (X & Y axis), gSizeX and gSizeY are vertical and horizontal dimensions. EOF Comments requested ~~~~~~~~~ Binary Sxizophreny - index of comp related stuff Kangaroo's Homepage (czech)