0 Replies Latest reply on Jun 5, 2013 8:15 AM by Andy-Davies

    Replacing video clips in AEPX project file

    Andy-Davies Level 1

      Hi all,


      I'm really hoping that someone can help. I'm trying to replace a video clip in an xml project file and have hit a bit of a wall. My goal is to edit the project file and send it to aerender.exe On the face of it this is quite simple as the file contains file references similar to the below:


           <fileReference filetype="4d6f6f56" fullpath="\\andy-win7\Incoming\vids\coop.mov" platform="Win" relativeAscendCountFromProject="2" relativeIndexIntoFullpath="21"/>


      However while it seems that you can consistently replace the video with another one from the same directory, replacing it with a video in the different folder works sometimes and other times fails. So does anyone know how to get this to work reliably?


      At first I thought I could simply rename the file path but that didn't work (I suspect that After Effects doesn't actually use this path) so I looked at the relativeAscendCountFromProject and relativeIndexIntoFullpath properties. Now there doesn't seem to be much (read zero) documentation about these, but I'm guessing that:


      • relativeAscendCountFromProject: Defines the number of folders above the project file to start looking for the resource
      • relativeIndexIntoFullpath: The number of characters to strip from the full path to create a relative path from the folder deduced from the above


      Even armed with this theory I still couldn't replace the file with one from a different location. One project file allowed it while another project file didn't allow it, even when I copied the fileReference tag from the working file to the other one. This suggests that there is something else in the project that is actually controlling this. Performing a diff on the two files and via a process of elimination there is a bit of binary data that seems to make this work.


      This bit of xml doesn't work:


      <sspc bdata="000000000000000000000000000000000000000000004d50454f0000000000000780000004380000011300000019000000000000001900000000001900000018010100000000000000034649454c00010000000000000000000000000000000000030004000200000000000000000000002000000000cd955f560000000b0000000100000000000000004380000043800000000000000000001900000000000840e77000000000000000000000000000000000000000000000000000fffffffffffffffe000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100020000000000000068600400000000000000000000"/>                     <Alas>                          <fileReference filetype="4d6f6f56" fullpath="\\andy-win7\Incoming\vids\coop.mov" platform="Win" relativeAscendCountFromProject="2" relativeIndexIntoFullpath="21"/>                     </Alas>


      While this does work:

      <sspc bdata="000000000000000000000000000000000000000000004d4f6f560000000000000500000002d0000a2e4000000bb50000000000000bb500000000001df8520018010100000000000000034649454c00010000000000000000000000000000000000030004000200000000000000000000002000000000cdd36ac60000000b0000000100000000000000004380000043800000000000000000001df8520000000840e58880000000000000000000000000000000000000000000000000fffffffffffffffe000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100020000000000000397b39b00000000000000000000"/>                      <Alas> <fileReference filetype="4d6f6f56" fullpath="\\andy-win7\Incoming\vids\coop.mov" platform="Win" relativeAscendCountFromProject="2" relativeIndexIntoFullpath="21"/>                      </Alas>


      As ou can see the only difference is the binary data - something in there is allowing me to use files from any location. Now I want to understand why this is and what is changing rather than just randomly the binary data as this may have side affects. Does anyone know how to read the binary in somethign a little easier to understand or have any idea as to what settings it may contain or indeed anything shed any light on this?