12 Replies Latest reply on Oct 22, 2013 8:18 PM by dcfax

    Change text in aepx file

    mpzar

      Hello,

       

      I need to produce about 100 videos from a single project changing some images and texts.

       

      I found out that editing aepx files for the project I can change the images paths and do the renders with aerender.exe without needing to enter AE.

       

      The problem are the texts, I found the text part in the aepx, even in Hex format, but when I try to swap one hex word with another, the change simply doesn't reflect in AE nor aerender. It just display the original text.

       

      Is there a way to change the text content directly in the aepx to let me automate the 100 avi production without even entering After Effects?

       

      Thank you very much,

       

      Manuel.

        • 1. Re: Change text in aepx file
          Todd_Kopriva Level 8

          The XML project file format won't be of any help to you in this workflow.

           

          However, using this script will:

          http://aescripts.com/pt_opensesame/

           

          Don't be distracted by the fact that its primary use is for opening projects in previous versions. The text format that it uses for saving projects is ideal for what you describe.

          • 2. Re: Change text in aepx file
            mpzar Level 1

            This works pretty fine!

            But I understand it modifies the workflow I was planning.

            Is there a way I can still automate the whole process? I want a machine to do this, not a person, with aerender.exe I had the automate render solved but with this I have to still open AE in the process and saved as (is not relevant if it could be made ina an automatic way). So I understand the work will be (assuming I previously exported project with opensesame):

                 1. Change text layer in tsv (automatic(macro or program))

                 2. Open AE.

                 3. Run opensesame script

                 4. import tsv

                 5. Save AEP

                 6. Close AE.

                 7. Execute aerender.exe with the project (automatic)

             

            So I am wondering if there would be a way to do 2,3,4,5 and 6 auto. Or if there is an external program to convert tsv2aep...

             

            Thank you very much.

             

            Manuel.

            • 3. Re: Change text in aepx file
              danieln77

              Did you solve this? We're having a similar problem. We're now trying to not add the text to the project but to a file on disk and refer to that file via an expression. The same for images and sound.  We render, replace the files on disk, and render again. That basically works, but our problem is that aerender sometimes just stops working without rendering everything, but it doesn't give an error message. If anybody has a clue, help is very appreciated.

              • 4. Re: Change text in aepx file
                3fjdk2hfjd

                did you get it working?

                I am thinking about using the same approach (expression).

                • 6. Re: Change text in aepx file
                  mpzar Level 1

                  Hello,

                  Yes, I finally found a way of doing this. All the text is in the aepx file encoded in hexadecimal format. What you would like to do is:

                  1.- Save a project in aepx format with the text boxes to change filled with some simple unique content (ie: text01, text02,...)

                  2.- Use an application to convert these text to hex (ie: text01 would be "746578743031").

                  3.- Encode in hex the text you want to change to (hello world -> "68656C6C6F20776F726C6420")

                  4.- Make a substitution in the aepx and looking for "746578743031" and changing to "68656C6C6F20776F726C6420"

                   

                  And that's it, when you render you will have the text box displaying hello world instead of text01...

                  • 7. Re: Change text in aepx file
                    3fjdk2hfjd Level 1

                    Thank you for the answer.

                    I tried it but after effect cs6 is saying the file is corrupted.

                     

                    Thanks anyway:)

                    • 8. Re: Change text in aepx file
                      mpzar Level 1

                      I am using CS4 so maybe it doesn't work anymore, but maybe there is a limit in the size of the text, so in that case you have to make a substitution of the same size.

                      In the previous example you could try to fill with trailing 0s the text to look for.

                      So you would like to change the text:

                      "746578743031000000000000" to the encoded one: "68656C6C6F20776F726C6420" that have both the same size.

                      Test

                      • 9. Re: Change text in aepx file
                        mpzar Level 1

                        Ok, I found the problem, you have to look for:

                        00740065007800740030003100

                        and change to

                        00680065006C006C006F00200077006F0072006C0064002000

                        so between each letter in hex you have to put a 00.

                        this will change the data in the "bdata" value of the xml element "btdk" inside the "layr" text01

                        Hope this helps!

                        • 10. Re: Change text in aepx file
                          3fjdk2hfjd Level 1

                          still didn't work. i did diff of 2 aepx files one i manually changed and the other i changed using AE and there are many lines different.

                          I guess things changed in cs6.

                           

                          Thank you for your help anyway

                          • 11. Re: Change text in aepx file
                            msatoer

                            This is a old topic, but I have found a solution to the problem. Maybe it can help you or others seeking the same solution.

                             

                            Just add the folowing expression to the layer text (alt + click stopwatch besides "source text"):
                            text.sourceText=name

                             

                            This way the displayed text is the same as the layername. You only have to change the layername string in the aepx! (no hex code needed)

                            • 12. Re: Change text in aepx file
                              dcfax

                              Many thanks to msatoer :

                               

                              Just add the folowing expression to the layer text (alt + click stopwatch besides "source text"):
                              text.sourceText=name

                               

                              This way the displayed text is the same as the layername. You only have to change the layername string in the aepx! (no hex code needed)

                               

                              this is a very smart method ! who open many possibilities !

                               

                              it helps me a lot, and improve strongly my current projects.