Highlighted

Encoding/charset of Source Text in exported GraphicAndType effect

New Here ,
Dec 05, 2017

Copy link to clipboard

Copied

I am currently working to programmatically editing Premiere projects exported as Final Cut Pro XML.

When editing text effects in the timeline I am having issues changing the text itself. The effect id is GraphicAndType and the parameter I'm having issues with is the source text. I am able to decode the text from base64, but unable to re-encode it in a way that lets premiere read it an create the edited text.

Does the source text require any specific charset/encoding or some kind of cryptographic cipher to work? I have attempted to re-encode from UTF-8, UTF-16 with all kinds of endians and byte order mark, and more. An example of the clip item with the effect can be forund here: [XML] Premiere Pro export XML - Pastebin.com

Or is there some easier way to achieve what I am trying to do?

NOTE: The text was originally created with the Essential Graphics tool

Views

805

Likes

Translate

Translate

Report

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

Encoding/charset of Source Text in exported GraphicAndType effect

New Here ,
Dec 05, 2017

Copy link to clipboard

Copied

I am currently working to programmatically editing Premiere projects exported as Final Cut Pro XML.

When editing text effects in the timeline I am having issues changing the text itself. The effect id is GraphicAndType and the parameter I'm having issues with is the source text. I am able to decode the text from base64, but unable to re-encode it in a way that lets premiere read it an create the edited text.

Does the source text require any specific charset/encoding or some kind of cryptographic cipher to work? I have attempted to re-encode from UTF-8, UTF-16 with all kinds of endians and byte order mark, and more. An example of the clip item with the effect can be forund here: [XML] Premiere Pro export XML - Pastebin.com

Or is there some easier way to achieve what I am trying to do?

NOTE: The text was originally created with the Essential Graphics tool

Views

806

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

I'm in the same boat, I assume it has to do with the hash field, how do they calculate it?

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

hey ya

Did you ever get to the bottom of this? I'm having the same issue. It would seem that the <value> element is base64 encoded, using an online decoder it outputs a json object containing parameters and the text value. But editing and then re-encoding to base64, produces no text when you import the xml back into premiere.

Cheers

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hi, folks!

After hours of headaches, I cracked it.

The <value> tag's contents is a base64-encoded JSON string, wrapped in some weird special characters. It's not related to the hash field. ‡

Original XML line:

<value>aAgAAAAAAAB7ACIAbQBUAGUAeAB0AFAAYQByAGEAbQAiADoAewAiAG0AQQBsAGkAZwBuAG0AZQBuAHQAIgA6ADAALAAiAG0ARABlAGYAYQB1AGwAdABSAHUAbgAiADoAWwBdACwAIgBtAEgAZQBpAGcAaAB0ACIAOgAwACwAIgBtAEgAaQBuAGQAaQBEAGkAZwBpAHQAcwAiADoAZgBhAGwAcwBlACwAIgBtAEkAbgBkAGkAYwAiADoAZgBhAGwAcwBlACwAIgBtAEkAcwBWAGUAcgB0AGkAYwBhAGwAVABlAHgAdAAiADoAZgBhAGwAcwBlACwAIgBtAEwAZQBhAGQAaQBuAGcAIgA6AC0AMwAsACIAbQBMAGkAZwBhAHQAdQByAGUAcwAiADoAZgBhAGwAcwBlACwAIgBtAFIAVABMACIAOgBmAGEAbABzAGUALAAiAG0AUwBoAGEAZABvAHcAQQBuAGcAbABlACIAOgAxADMANQAsACIAbQBTAGgAYQBkAG8AdwBCAGwAdQByACIAOgA0ADAALAAiAG0AUwBoAGEAZABvAHcAQwBvAGwAbwByACIAOgA0ADEANAA0ADkANQA5ACwAIgBtAFMAaABhAGQAbwB3AE8AZgBmAHMAZQB0ACIAOgA3ACwAIgBtAFMAaABhAGQAbwB3AE8AcABhAGMAaQB0AHkAIgA6ADcANQAsACIAbQBTAGgAYQBkAG8AdwBTAGkAegBlACIAOgAwACwAIgBtAFMAaABhAGQAbwB3AFYAaQBzAGkAYgBsAGUAIgA6AGYAYQBsAHMAZQAsACIAbQBTAHQAeQBsAGUAUwBoAG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ABNAFQAIgBdAF0AfQAsACIAbQBGAG8AbgB0AFMAaQB6AGUAIgA6AHsAIgBtAFAAYQByAGEAbQBWAGEAbAB1AGUAcwAiADoAWwBbADAALAA1ADgALgA4ADIANgAwADgANAAxADMANgA5ADYAMgA4ADkAMQBdAF0AfQAsACIAbQBLAGUAcgBuAGkAbgBnACIAOgB7ACIAbQBQAGEAcgBhAG0AVgBhAGwAdQBlAHMAIgA6AFsAWwAwACwAMABdAF0AfQAsACIAbQBTAHQAcgBvAGsAZQBDAG8AbABvAHIAIgA6AHsAIgBtAFAAYQByAGEAbQBWAGEAbAB1AGUAcwAiADoAWwBbADAALAAxADYANwA3ADcAMgAxADUAXQBdAH0ALAAiAG0AUwB0AHIAbwBrAGUAVgBpAHMAaQBiAGwAZQAiADoAewAiAG0AUABhAHIAYQBtAFYAYQBsAHUAZQBzACIAOgBbAFsAMAAsAGYAYQBsAHMAZQBdAF0AfQAsACIAbQBTAHQAcgBvAGsAZQBXAGkAZAB0AGgAIgA6AHsAIgBtAFAAYQByAGEAbQBWAGEAbAB1AGUAcwAiADoAWwBbADAALAAxAF0AXQB9ACwAIgBtAFQAZQB4AHQAIgA6ACIAQQBkAG8AYgBlACAARgBvAHIAdQBtACIALAAiAG0AVAByAGEAYwBrAGkAbgBnACIAOgB7ACIAbQBQAGEAcgBhAG0AVgBhAGwAdQBlAHMAIgA6AFsAWwAwACwAMABdAF0AfQAsACIAbQBUAHMAdQBtAGkAIgA6AHsAIgBtAFAAYQByAGEAbQBWAGEAbAB1AGUAcwAiADoAWwBbADAALAAwAF0AXQB9AH0ALAAiAG0AVABhAGIAVwBpAGQAdABoACIAOgA0ADAAMAAsACIAbQBXAGkAZAB0AGgAIgA6ADAAfQAsACIAbQBWAGUAcgBzAGkAbwBuACIAOgAxAH0A</value>

When decoded from base64, the gobbledygook is comprehensible:

ASCII readable string format (doesn't display fully as some characters are invisible): †

h {"mTextParam":{"mAlignment":0,"mDefaultRun":[],"mHeight":0,"mHindiDigits":false,"mIndic":false,"mIsVerticalText":false,"mLeading":-3,"mLigatures":false,"mRTL":false,"mShadowAngle":135,"mShadowBlur":40,"mShadowColor":4144959,"mShadowOffset":7,"mShadowOpacity":75,"mShadowSize":0,"mShadowVisible":false,"mStyleSheet":{"mBaselineOption":{"mParamValues":[[0,0]]},"mBaselineShift":{"mParamValues":[[0,0]]},"mCapsOption":{"mParamValues":[[0,2]]},"mFauxBold":{"mParamValues":[[0,false]]},"mFauxItalic":{"mParamValues":[[0,false]]},"mFillColor":{"mParamValues":[[0,16777215]]},"mFillOverStroke":{"mParamValues":[[0,true]]},"mFillVisible":{"mParamValues":[[0,true]]},"mFontName":{"mParamValues":[[0,"TimesNewRomanPS-BoldMT"]]},"mFontSize":{"mParamValues":[[0,58.826084136962891]]},"mKerning":{"mParamValues":[[0,0]]},"mStrokeColor":{"mParamValues":[[0,16777215]]},"mStrokeVisible":{"mParamValues":[[0,false]]},"mStrokeWidth":{"mParamValues":[[0,1]]},"mText":"Adobe Forum","mTracking":{"mParamValues":[[0,0]]},"mTsumi":{"mParamValues":[[0,0]]}},"mTabWidth":400,"mWidth":0},"mVersion":1}

As you can see, this example is for a graphic that says "Adobe Forum" in Times New Roman.

To change the text or font you would have your script:

– Decode from base64

– Replace the parts you want to replace like font or text or font size

– Re-encode for base64

– Re-place between two value tags.

Have a play. Reach out if you need any help.


Valid for Premiere Pro version 12.1.1.

This example Essential Graphic <value> is saved on a pastebin​ for posterity in ASCII, hex and base64 formats. For reference, the whole FCP XML (from which the <value> is taken is here.

More:

† It's safer to do a replace of the valid Premiere Pro-generated string because of the special characters and the top and bottom of the string. If you try to build a fresh JSON object and base64-encode it, it won't work in Premiere Pro because of the missing special characters at the top and bottom.

‡ And, to re-state, the hash tag is irrelevant.

The example graphic is this:

1.jpg

2.jpg

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Regarding encoding, I processed things on a web-server-side in UTF-16 and that cracked it.

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hi harryfear,

first of all, thank you very much for your solution to the problem raised by TeamHaxor.

I tried your workflow, decoding the base64 string wich returns something like: "¶{"mTextParam":{"mAlignment".

However, I'm unable to replace nothing from this resulting string as it seems to have a length of 1 (the first special char).

I tried in PHP and AS3 (code below) with the same result.

I would appreciate some help.

Thanks in advance.

- - - - - - - - - -

import mx.utils.*;

import flash.utils.ByteArray;

var base64Code:String = 'tgYAAAAAAAB7ACIAbQBUAGUAeAB0AFAAYQByAGEAbQAiADoAewAiAG0AQQBsAGkAZwBuAG0AZQBuAHQAIgA6ADIALAAiAG0ARABlAGYAYQB1AGwAdABSAHUAbgAiADoAWwBdACwAIgBtAEgAZQBpAGcAaAB0ACIAOgAwACwAIgBtAEgAaQBuAGQAaQBEAGkAZwBpAHQAcwAiADoAZgBhAGwAcwBlACwAIgBtAEkAbgBkAGkAYwAiADoAZgBhAGwAcwBlACwAIgBtAEkAcwBWAGUAcgB0AGkAYwBhAGwAVABlAHgAdAAiADoAZgBhAGwAcwBlACwAIgBtAEwAZQBhAGQAaQBuAGcAIgA6ADAALAAiAG0ATABpAGcAYQB0AHUAcgBlAHMAIgA6AGYAYQBsAHMAZQAsACIAbQBSAFQATAAiADoAZgBhAGwAcwBlACwAIgBtAFMAaABhAGQAbwB3AEEAbgBnAGwAZQAiADoAMQAzADUALAAiAG0AUwBoAGEAZABvAHcAQgBsAHUAcgAiADoAMAAsACIAbQBTAGgAYQBkAG8AdwBDAG8AbABvAHIAIgA6ADAALAAiAG0AUwBoAGEAZABvAHcATwBmAGYAcwBlAHQAIgA6ADEAMAAsACIAbQBTAGgAYQBkAG8AdwBPAHAAYQBjAGkAdAB5ACIAOgAxADAAMAAsACIAbQBTAGgAYQBkAG8AdwBWAG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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';

var b64:Base64Decoder = new Base64Decoder();

b64.decode( base64Code );

var decoded = b64.toByteArray();

decoded = decoded.toString();

trace( decoded.length );

trace( decoded );

var decodedReplaced = decoded.replace( 'mAlignment','whatever' );

trace( decodedReplaced );

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hi!

This is related to an encoding issue.

The way the data is stored, there is padding, which PHP isn't handling correctly. Between each character you say printed in the echo, there is actually a spacer '00'.

For example, if you try to replace all single opening brackets "{", it is successful:

<?php

$str = 'tgYAAAAAAAB7ACIAbQBUAGUAeAB0AFAAYQByAGEAbQAiADoAewAiAG0AQQBsAGkAZwBuAG0AZQBuAHQAIgA6ADIA LAAiAG0ARABlAGYAYQB1AGwAdABSAHUAbgAiADoAWwBdACwAIgBtAEgAZQBpAGcAaAB0ACIAOgAwACwAIgBtAEgAaQ BuAGQAaQBEAGkAZwBpAHQAcwAiADoAZgBhAGwAcwBlACwAIgBtAEkAbgBkAGkAYwAiADoAZgBhAGwAcwBlACwAIgBt AEkAcwBWAGUAcgB0AGkAYwBhAGwAVABlAHgAdAAiADoAZgBhAGwAcwBlACwAIgBtAEwAZQBhAGQAaQBuAGcAIgA6AD AALAAiAG0ATABpAGcAYQB0AHUAcgBlAHMAIgA6AGYAYQBsAHMAZQAsACIAbQBSAFQATAAiADoAZgBhAGwAcwBlACwA IgBtAFMAaABhAGQAbwB3AEEAbgBnAGwAZQAiADoAMQAzADUALAAiAG0AUwBoA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AAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';

  

$decodedddd = base64_decode($str);

echo "<hr>";

echo $decodedddd;

echo "<hr>";

$decodedReplaced = str_replace ('{','whatever', $decodedddd, $count );

echo $count;

echo "<hr>";

echo $decodedReplaced;

?>

But if you try to replace more than one character, because there is spacing/00/padding, it fails.

I'm not an expert enough in PHP to fix this. I've tried some encoding handling functions but they don't seem to work.

In ColdFusion (which is another programming language), though, it works perfectly:

<!--Set encoding-->

<cfcontent type="text/html; charset=UTF-16LE">

  

<!--Your sub-->

<cfset origin = 'tgYAAAAAAAB7ACIAbQBUAGUAeAB0AFAAYQByAGEAbQAiADoAewAiAG0AQQBsAGkAZwBuAG0AZQBuAHQAIgA6ADIA LAAiAG0ARABlAGYAYQB1AGwAdABSAHUAbgAiADoAWwBdACwAIgBtAEgAZQBpAGcAaAB0ACIAOgAwACwAIgBtAEgAaQ BuAGQAaQBEAGkAZwBpAHQAcwAiADoAZgBhAGwAcwBlACwAIgBtAEkAbgBkAGkAYwAiADoAZgBhAGwAcwBlACwAIgBt AEkAcwBWAGUAcgB0AGkAYwBhAGwAVABlAHgAdAAiADoAZgBhAGwAcwBlACwAIgBtAEwAZQBhAGQAaQBuAGcAIgA6A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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'>

<!--Preview before replace-->

<cfdump var="#ToString( ToBinary( origin ) )#"> <!--take the origin variable, convert it to binary, then put the binary into string format, then send that to the browser-->

<hr> <!--horizontal ruler break-->

<!--Preview successful replace-->

<cfdump var="#replace(ToString( ToBinary( origin ) ),'mTextParam','oops')#"> <!-- the same as above, but with replacing mTextParam with oops -->

Run at: https://cffiddle.org/

I wish I could help more(!) but hopefully this can help you make progress. If you reach out to a PHP expert on StackOverflow, hopefully they can help with this?

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Just a little more info to explain again what I meant about the padding:

Sometimes the base64 that's generated by Premiere doesn't play friendly with various systems. To illustrate, you can use the base64 in my original example.

If you put your base64 through here: ASCII text,Hex,Binary,Decimal,Base64 converter

You can see that there is 00 padding between characters:

https://ibb.co/93j9KB5

If you remove the 00 padding in the Hex viewer, after for example 22 (so you have "22" not "22 00"), the ASCII text doesn't change. It's because the 00 padding is just contentless padding.

Hope this can help.

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hi, and thanks again for your help!

I managed to remove the binary padding in PHP (code below). However, when encoded in base64 again and imported back to Premiere, It doesn't works.

In my case, I'm trying to replace the text inside a tex box and the result of the modified base64 string is a blank text box in Premiere.

In your first response, you mentioned that the encoded string is not related with the <hash> value. If it were related, do yo have any idea on how to implement the hash key in the encryption process? PHP base64_encode() has no parameter for keys, for example.

Thanks!

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

PHP - Remove binary padding, replace string and encode in base64

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

$str = 'tgYAAAAAAAB7ACIAbQBUAGUAeAB0AFAAYQByAGEAbQAiADoAewAiAG0AQQBsAGkAZwBuAG0AZQBuAHQAIgA6ADIA LAAiAG0ARABlAGYAYQB1AGwAdABSAHUAbgAiADoAWwBdACwAIgBtAEgAZQBpAGcAaAB0ACIAOgAwACwAIgBtAEgAa Q BuAGQAaQBEAGkAZwBpAHQAcwAiADoAZgBhAGwAcwBlACwAIgBtAEkAbgBkAGkAYwAiADoAZgBhAGwAcwBlACwAIgB t AEkAcwBWAGUAcgB0AGkAYwBhAGwAVABlAHgAdAAiADoAZgBhAGwAcwBlACwAIgBtAEwAZQBhAGQAaQBuAGcAIgA6A D AALAAiAG0ATABpAGcAYQB0AHUAcgBlAHMAIgA6AGYAYQBsAHMAZQAsACIAbQBSAFQATAAiADoAZgBhAGwAcwBlACw A IgBtAFMAaABhAGQAbwB3AEEAbgBnAGwAZQAiADoAMQAzADUALAAiAG0AUwBoAGEAZABvAHcAQgBsAHUAcgAiADoA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA A AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';

$decodedddd = base64_decode($str);

echo( '<hr>' );

echo( '<h1>Original</h1>' );

echo( $decodedddd );

echo( '<hr>' );

echo( 'Original length: '.strlen($decodedddd) );

echo( '<hr>' );

$newDecoded = '';

for( $i=0;$i<strlen($decodedddd);$i++ ){

$value     = unpack( 'H*',$decodedddd[$i] );

$converted = base_convert( $value[1],16,2 );

//echo( $i.') '.$decodedddd[$i]. ' ['.$converted.']');

//echo( '<hr>' );

if( $converted != 0 ){

$newDecoded .= $decodedddd[$i];

}

}

echo( '<h1>Binary padding removed</h1>' );

echo( $newDecoded );

echo( '<hr>' );

echo( 'New length: '.strlen($newDecoded) );

echo( '<hr>' );

$newDecodedReplaced = str_replace('Alice','Ines', $newDecoded, $count );

echo( '<h1>Binary padding removed and string replaced</h1>' );

echo( $newDecodedReplaced );

$newBase64 = base64_encode( $newDecodedReplaced );

echo( '<hr>' );

echo( '<h1>Binary padding removed and string replaced to base64</h1>' );

echo( $newBase64 );

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

I struggle with the exact same problem - did any of you find a solution for this?

 

Thanks,

Eivind

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

I made an app which managed to import SRT file to pr in essential graphic title. It's Pr Titles and it is available on Mac App Store. You make a title on timeline and export the sequence to Final Cut Pro xml, then use SRT file and xml file to generate a new xml file which contains all subtitles from SRT file. Hope this doesn't bother. 

Likes

Translate

Translate

Report

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