Could i decompress it using a SDK fuction?

New Here ,
Jun 15, 2011

Copy link to clipboard

Copied

I'm managing to create a Title Create tool,
I start with study the codes in .prproj,and I found the title prefs was compressed as code like below
could i decompress it using a SDK fuction?or there is an other way?

codes:

<ImporterPrefs Encoding="base64" Checksum="69363306">AQAAAAAAAACAgAAAAAAAAENvbXByZXNzZWRUaXRsZQB4nO0da1MbOVI/xbXf
iR+ADVVabxEet9SRkMJsEn9KGWOI74zts00C++Pvth/S6D02hODx3hQFzPRD
akndrZ7WjPS//0rxm3gQd2IkKuKbGIiZmIuhmIix+FX8IurijajB/wpgxqIP
8GvAjsUtYf8Ql+JEbAFVk2h+E20hxQHQTMQVcHwRF3A1EYsAfgmlLKDOAWE+
OvW2RQPqrIk9+G3BbwMoqgGNFO+oZL7/IjqAX9A9Sjcnig9QQ088AvYEqGbi
O9zNQIo20M3EPXBgyWkqCaUu6G4BWF1PH+4H1B9tcQPYEdTGJS2jRolmWb+M
4KcN7WMZfLgUx1DWnKCnxM2UPhTpxiAt1ngDP/kS5tOifBOgXUQlDDG2jOfQ
n4uIlBqO0OUjVs3REmzvnOQdEn4mzmjcJlTDHPTvY1J/kd+m9u+PqT8GUPqC
6rkBeLy8X1S7Df0llDIlGXXbYzjELKvRl+oIar6jsdEyxGRqKJmm4jOM0in8
PYZSOgBrkSVhzSEO6btwfSreAwwhu0DfVNQuBmk74hBG/hh+3sMYXVBr34h9
6JEduGqKbcUZ0kkY3RlI+x1a9JXaNFPt1ras8RcAuQUabDnej6nMZdx+z4a9
5vfrAekd6xHeD5T2dYAGx8To3QHV1iMs3t8oHX8D7cZ6DUzC3wm038ZqiKS6
uGW63xBvQyXIMiG5JiC9TeXC2c/kyamxB1YvpdtRg3HPa4nG57Vld8XW7C5p
T0ri6kqj9xZo+uLfSl/uydPF7GVH2UsHZO0BDeIvqPUDqhPnObRY1Ot9mIVY
wnxaCX4u9LbnSvemAEUvp33dBdzjf+Qc05xzR3x2K9ma0nyIj7UYMUckYQ8g
I+DF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z3OoZCPsY5sK
+zk7tYXbp1e0GadPuU7R6BEPz3DxKatKR16u7xY0F9vngIzVtaktpKkGPsSF
urN5NTrzm1Up9vv3Qp8xY+4r4ja79r3LlPqgDzVdwi/OSOHOwSGFJJvqKX9s
okgfKh0bwbrxJHssHWc+4wd1HxmZ+T7duqoXP1WD+Opjdpr2iXrGCd/vyduP
90Zx+RZXTWKwxw6zuFWfJeBDNR1rmfuU7mIQkpad8aaV7knMDDkV+eeyt5Uv
Mue649PwhPj/Au9BvUU=</ImporterPrefs>

TOPICS
SDK

Views

1.7K

Likes

Translate

Translate

Report

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

1 Correct Answer

Adobe Employee , Nov 19, 2014
Bruce Bullis Adobe Employee , Nov 19, 2014
> What the problem for give us the hashing format ?Adobe does not support or recommend parsing .prproj files for data. Instead, PPro provides numerous APIs for working with that data.

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Employee ,
Jun 17, 2011

Copy link to clipboard

Copied

Hi there,

If you are building a tool that creates titles and saves them to a format Premiere Pro understands, you could use the PRTL file format.  To generate sample files in this format, just create the titles in Premiere Pro.  Then in the Project panel, select the titles you want to save to the PRTL format, and choose File > Export > Title.  The PRTL are not base64-encoded, and are easily readable in an XML editor.  Using these sample files as a guide, you could create a tool that generates the same format, so that the files can be imported into Premiere Pro.

To answer your original question: no, there is no SDK function to decompress base64-encoded data.  You'd need to provide your own function for that.

Regards,

Zac

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Nov 17, 2014

Copy link to clipboard

Copied

Hi,

Well, you (adobe) compresse the title definition with base64, add a binaryHash, but doesn't give acces to the hashing format ???

I (and i'm not the only person) search to play with an title already in a prproj file. change title, change police, change size...all title parameter.

Not with the export title option but with script for automation.

I parse the prproj/xml file (ungzip), with python I found the title "Media", I decompresse, decode, utf-16 etc...

I change my title and recollapse my xml title.

Now, Adobe block me for editing the BinaryHash ??

You don't provide any reference for playing with jsx, C++ pluggin is little too big for me and i'm not sur you give a big control for all the premierepro function.

What the problem for give us the hashing format ? Explain me please I don't understand !

Regards

Ian.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Employee ,
Nov 19, 2014

Copy link to clipboard

Copied

> What the problem for give us the hashing format ?

Adobe does not support or recommend parsing .prproj files for data. Instead, PPro provides numerous APIs for working with that data.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Apr 14, 2017

Copy link to clipboard

Copied

Here it is base64 packed with ZLib.

You can convert this base64 to binary.

Then make offset 32 mbyte.

And then decode it with Offzip 0.4

Luigi Auriemma

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Sep 11, 2018

Copy link to clipboard

Copied

It can be done with autohotkey 32 bit and zlib1.dll.

http://zlib.net/zlib128-dll.zip

In variable "var" there is base64 premiere legacy title "Hello world!".

Script decode, unpack, change title to "Hello adobe!", then pack and encode.

If You replace any base64 title in Your xml project with the title, that generates this script, then You will see new title when open project.

var := "AQAAAAAAAACgYQAAAAAAAENvbXByZXNzZWRUaXRsZQB4nO1d63NTuxHXn+L2O/hBnMfMae6EkBSmgTBxLpBPjHGc4NbYru1Acv/4tru/lY7ex064YKd4MglH+9JK2l3tkY7Ef/9TqN/Urfqihqqmvqq+mqqZGqixGqm/qb+qpnqqGvRvjTAj1SP4JWFH6hrY39W5OlZPiGobNL+pfVWoA6IZq0/E8VGd0dNYzSP4OUmZU519YN559e6rFtXZULv0u0O/LaKoRzSFeg3JUv6oOoSfo8zazUDxlmroqjvCHhPVVH2j0pS02Ce6qbohDpacpypI6hylOWFNPT0q99Ef++qKsEOqTSQtomaNpmW/DOlnn9onOoTwQh2RrBmgr8AtlCGU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3ydnIfLn0kFsm3pbR2+Yucu5lm36e4uTZts7OGHcHXFufNzani1NS3IyKefl7ij2SyOuwu4FEew7dSHS5lz2nvw43unzPLSG/yp0Z9Qr79q1feE1Wxs/+d0EpWI5b/MyMV+422ZriG4LNPXLm7HoTmEnJMVNy1s6n4HrMqV6/XQNYSNVpXr5/wZ4IbpOnyF2k5mS/jy9wo63Ep9hTLW7xid6vpYYy+5h+Cm02T1d4PXaS9NUqCsZX9RpTHGFdaKijDPO5t/1Z27K3/rDUZbkeesfNGck4iXrKQNnmzuCf07KtL5WcPOcboCUa88nBv2hbDqkLZC4j9BhD+GYOaZP4/qW29Sm8Vb7Vy90VuxxlTdfImf0N2mnPhdScWCNZu3+rQ620iRC7rbEfyttbpIVmrUxw5hbwHI2xkfgul5Cyrq3qz+u9OWZs9zaQkX62tcU09Sjq+FB/zq8n8wP7DiwzxY0yd83Yck1dl89hPJqgD3pU0zn98hwWn7KNKQp4YVdHcJtrhtDC8yium2/67+o1Hhs5TR9ZnaWcb109yLLqURb2rrzL+1i/CcU7BlVnV680V+hz9SyGe+ywzG73dWQOoYZOrMx/l/cxDMnrLnjbSv9OaIHwGeOqe+v3dfRK/a8J/wMFyDy9"

size := StringBase64ToData(var, outData)

offset := 32, OriginalSize := size*100

VarSetCapacity(var1, offset, 0)

DllCall("Ntdll\RtlMoveMemory", Ptr, &var1, Ptr, &outData, Ptr, offset)

VarSetCapacity(var2, size-offset, 0)

DllCall("Ntdll\RtlMoveMemory", Ptr, &var2, Ptr, &outData+offset, Ptr, size-offset)

zlib_Decompress(Decompressed, var2, size-offset, OriginalSize)

DecompressedData := StrGet(&Decompressed, "UTF-16")

DecompressedData := StrReplace(DecompressedData, "Hello world!", "Hello adobe!")

DecompressedSize := VarSetCapacity(DecompressedData, -1)

CompressedSize := zlib_Compress(Compressed, DecompressedData, DecompressedSize)

VarSetCapacity(var3, CompressedSize+offset, 0)

DllCall("Ntdll\RtlMoveMemory", Ptr, &var3, Ptr, &var1, Ptr, offset)

DllCall("Ntdll\RtlMoveMemory", Ptr, &var3+offset, Ptr, &Compressed, Ptr, CompressedSize)

msgbox % Base64Enc(var3, CompressedSize+offset)

return

Base64Enc(ByRef Bin, nBytes) { ; By SKAN / 18-Aug-2017

   Local Rqd := 0, B64 ; CRYPT_STRING_BASE64 := 0x1, CRYPT_STRING_NOCRLF := 0x40000000

   DllCall( "Crypt32.dll\CryptBinaryToString", "Ptr", &Bin ,"UInt", nBytes, "UInt",0x1|0x40000000, "Ptr",0,"UIntP",Rqd )

   VarSetCapacity( B64, Rqd * ( A_Isunicode ? 2 : 1 ), 0 )

   DllCall( "Crypt32.dll\CryptBinaryToString", "Ptr",&Bin, "UInt",nBytes, "UInt",0x1|0x40000000, "Str",B64, "UIntP",Rqd )

   Return B64

}

StringBase64ToData(stringBase64, ByRef outData)

{

   static CRYPT := CRYPT_STRING_BASE64 := 1

   DllCall("Crypt32\CryptStringToBinary", Ptr, &stringBase64, UInt, StrLen(stringBase64), UInt, CRYPT, UInt, 0, UIntP, bytes, UIntP, 0, UIntP, 0)

   VarSetCapacity(outData, bytes, 0)

   DllCall("Crypt32\CryptStringToBinary", Ptr, &stringBase64, UInt, StrLen(stringBase64), UInt, CRYPT, Str, outData, UIntP, bytes, UIntP, 0, UIntP, 0)

   Return bytes

}

; ===================================== zlib.ahk =====================================

; by shajul -- http://www.autohotkey.com/board/topic/63343-zlib/

; Download zlib1.dll -- http://zlib.net/zlib128-dll.zip

zlib_Compress(Byref Compressed, Byref Data, DataLen, level = -1) {

    nSize := DllCall("zlib1\compressBound", "UInt", DataLen, "Cdecl")

    VarSetCapacity(Compressed,nSize, 0)

    ErrorLevel := DllCall("zlib1\compress2", "ptr", &Compressed, "UIntP", nSize, "ptr", &Data, "UInt", DataLen, "Int"

                   , level    ;level 0 (no compression), 1 (best speed) - 9 (best compression)

                   , "Cdecl") ;0 means Z_OK

    return ErrorLevel ? 0 : nSize

} ;http://www.autohotkey.com/forum/viewtopic.php?t=68170

zlib_Decompress(Byref Decompressed, Byref CompressedData, DataLen, OriginalSize = -1) {

    OriginalSize := (OriginalSize > 0) ? OriginalSize : DataLen*10 ;should be large enough for most cases

    VarSetCapacity(Decompressed,OriginalSize, 0)

    ErrorLevel := DllCall("zlib1\uncompress", "Ptr", &Decompressed, "UIntP", OriginalSize, "Ptr", &CompressedData, "UInt", DataLen)

    return ErrorLevel ? 0 : OriginalSize

} ;http://www.autohotkey.com/forum/viewtopic.php?t=68170

/*

Return codes for the compression/decompression functions. Negative values are errors, positive values are used for special but normal events.

#define Z_OK            0

#define Z_STREAM_END    1

#define Z_NEED_DICT     2

#define Z_ERRNO        (-1)

#define Z_STREAM_ERROR (-2)

#define Z_DATA_ERROR   (-3)

#define Z_MEM_ERROR    (-4)

#define Z_BUF_ERROR    (-5)

#define Z_VERSION_ERROR (-6)

Compression levels.

#define Z_NO_COMPRESSION         0

#define Z_BEST_SPEED             1

#define Z_BEST_COMPRESSION       9

#define Z_DEFAULT_COMPRESSION  (-1)

*/

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Jul 11, 2019

Copy link to clipboard

Copied

I tried to figure out what might be wrong with a premiere project file. But in the end I came up with a utilty script to just print some useful details like this:

But I have no idea how to convert those Start / End numbers into meaningful values.  They surely not milliseconds - the whole thing was only 15 seconds long!

Processing Premiere Project file: premiere-test.prproj.xml
>> PremiereData   Attributes: [Version:3]
   Track 0 Start: 0 End: 3820400640000 Name: Color Matte
   Track 1 Start: 0 End: 518192640000 Name: IMG_6102.JPG
   Track 1 Start: 518192640000 End: 1534256640000 Name: IMG_5890.JPG
   Track 1 Start: 1534256640000 End: 3180280320000 Name: images.jpg
   Track 1 Start: 3180280320000 End: 3820400640000 Name: IMG_6102.JPG
   Track 2 Start: 0 End: 518192640000 Name: IMG_6102.JPG
   Track 2 Start: 518192640000 End: 1534256640000 Name: IMG_5890.JPG
   Track 3 Start: 0 End: 518192640000 Name: Title 01
   Track 3 Start: 518192640000 End: 1534256640000 Name: Title 04
   Track 3 Start: 1534256640000 End: 3180280320000 Name: Title 05
   Track 3 Start: 3180280320000 End: 3820400640000 Name: Title 06

 

Media File: IMG_6102.JPG / E:\FilmClub\Adverts\opticians 2018\IMG_6102.JPG : [Version:19, ObjectUID:11b0dd6f-04d2-4ce1-936d-d6a8e963df17, Index:4294967295, ClassID:7a5c103e-f3ac-4391-b6b4-7cc3d2f9a7ff]

Media File: IMG_5890.JPG / \\?\E:\FilmClub\Adverts\opticians 2018\IMG_5890.JPG : [Version:19, ObjectUID:2752e137-5936-43e0-8001-f71012de67dc, Index:4294967295, ClassID:7a5c103e-f3ac-4391-b6b4-7cc3d2f9a7ff]

Adobe Title Version: 20080702 Media Atr: [Version:19, ObjectUID:38dfebd5-26c6-4f16-aab4-5f08de1b4c5e, Index:4294967295, ClassID:7a5c103e-f3ac-4391-b6b4-7cc3d2f9a7ff]
  Font: NuevaStd-BoldCond / Nueva Std
  Font: NuevaStd-Cond / Nueva Std
  Font: NuevaStd-Cond / Nueva Std
=== TITLE START ===
SERVICE YOU CAN TRUST
THE COMPLETE HEARING SERVICE
ò EARWAX REMOVAL
ò DIGITAL HEARING AIDS
ò HEARING PROTECTION
ò SWIM AND SLEEP MOULDS
ò SERVICE AND REPAIR
=== TITLE END ===

Save with name "prprojReader.groovy", install Apache Groovy (and a java) and just run it!

import java.util.zip.Inflater
import java.nio.*
import groovy.xml.*

def cli = new CliBuilder(usage:'prProjReader.groovy <premiere project file.prproj>',
  header:'Extract key data from the project.',
  footer: 'MGB 2019')

def options = cli.parse(args)

if (options.arguments().size == 0) {
    cli.usage()
    return 0
    //System.exit(1)
}
def theXml = new File(options.arguments()[0])
if (! theXml.isFile()) {
    println "${theXml} is not a valid file path."
    return 2
}

// An xml parser used later when extracting text from embedded Titles.
// I use extra settings here just to show how to refine the parser, but should work with defaults only too.
def tx = new XmlParser(false,true,true)
tx.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false)
tx.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false)
// The xml parser used for the main project file..
def pr = new XmlSlurper()
def prx = pr.parse(theXml)
def pp = new groovy.util.XmlNodePrinter()  // if needed - a 'pretty printer' to output formatted XML

// Titles are held as a huge Base64 encoded string - but when decoded we find they are still gibberish.
// But if we use the inflater feature (which uses an image comression algorithm rather than straight unzip)
// we find the title is wrapped in another mass of XML (in unicode).  Note that we start the inflation from byte 32, in chunks.
String decompress2(byte[] compressed) {
         // Decompress the bytes
     if (compressed.length <= 32)
         return new String(compressed);
     xmlout = new ByteArrayOutputStream (10000)
     Inflater decompresser = new Inflater();
     decompresser.setInput(compressed, 32, compressed.length - 32);
     do {
         byte[] result = new byte[1000];
         int resultLength = decompresser.inflate(result);
         xmlout.write(result, 0, resultLength)
     } while (!decompresser.finished())
     finalSize = decompresser.bytesWritten
     //println "   Final Length = $finalSize"

     decompresser.end();
     return new String(xmlout.toByteArray(), 0, finalSize as Integer, "unicode")
}

println "Processing Premiere Project file: ${theXml.name}"
println " >> ${prx.name()}   Attributes: ${prx.attributes()}"

if (prx.name() != "PremiereData") {
println "This xml file does not look like a Premiere Project file.  It is likely to error or not output anything here..."
}
println ""
// first, print the content of each video track
projData = prx.'**'.findAll { it.name() == 'VideoClipTrackItem' }
projData.each { vnode ->
  try{
  ti = vnode.ClipTrackItem.TrackItem
  print "   Track ${ti.TrackIndex.text()} Start: ${ti['Start'].text()} End: ${ti['End'].text()}"
  obj = vnode.ClipTrackItem.SubClip.@ObjectRef

  sc = vnode.parent().'**'.find {it.name() == "SubClip" && it.@ObjectID == obj}
  if (sc) {
   println " Name: ${sc['Name'].text()}"
  } else {
   println " no name"
  }

} catch (  x  ) {
  println x
}
}

//Now print the Titles extracted from those compressed Base64 unicode xml parts (together with the fonts used)!
projData = prx.'**'.findAll { (it.name() == 'Media') && (it['Title'] != "")}
projData.each { mediaNode ->
println ""
  try {
    b64 = mediaNode.'**'.find { it.@Encoding == 'base64' }
    if (b64 && b64.name() == "ImporterPrefs") {
    bdat = (b64.toString()).decodeBase64()
        itemData = decompress2 (bdat)
        if (itemData.size() > 32) {
     txml = tx.parseText( itemData )
     println "Adobe Title Version: ${txml.Adobe_Title.Version.text()} Media Atr: ${mediaNode.attributes()}"
     txtml = txml.'**'.findAll {txtN -> txtN.name() == 'TypeSpec'}
     txtml.each { txtfont ->
      println "  Font: ${txtfont['fifullName'].text()} / ${txtfont.fifontFamilyName.text()}"
     }
     println "=== TITLE START ==="
     txtml = txml.'**'.findAll {txtN -> txtN.name() == 'TRString'}
     txtml.each {println it.text()
       //pp.print it.parent().parent()
       //println it.parent().attributes()
       }
     println "=== TITLE END ==="
    } else {
      println "  Short of Data"
    }
  } else {
   println ("  Media File: ${mediaNode['Title'].text()} / ${mediaNode['ActualMediaFilePath'].text()} : ${mediaNode.attributes()}")
  }
} catch (  x  ) {
  println x
}
}
//println XmlUtil.serialize(prx)
return

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Jul 11, 2019

Copy link to clipboard

Copied

As I remember If You want to get number of frames You have to divide "Start / End numbers" on "<framerate>...</framerate> number".

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Employee ,
Jul 11, 2019

Copy link to clipboard

Copied

Emphatically, Adobe neither supports nor recommends parsing .prproj files directly, and definitely not modifying them. Use our APIs, or PPro's UI, to make any such changes.

Also, those numbers are in 'ticks'; there are 254016000000 ticks per second.254016000000LL

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Jul 11, 2019

Copy link to clipboard

Copied

"Also, those numbers are in 'ticks'; there are 254016000000 ticks per second."
Thank you very much.
I have Vegas Pro that is meant to be able import prproj files (though it errored for some) - I do not currently have premiere or any of those other tools, but a colleague has given me some old project files as a base to start new material.  At least I can now get the most basic track and sequence information, which is roughly all I need for now.

Cheers,

Merlin

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Employee ,
Jul 11, 2019

Copy link to clipboard

Copied

If it's not a huge number of .prproj files, perhaps you could convince someone to open them, and export them as FCP XML...?

[If it's less than 20, I could do it during lunch. ]

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Feb 09, 2021

Copy link to clipboard

Copied

Thank you verry much !

Your code saved me time!

Do you have the reverse function "compress2": compress data?

 

Have a good day

Likes

Translate

Translate

Report

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