Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Batch replace placeholders with real artwork

New Here ,
Feb 18, 2018 Feb 18, 2018

My query is about batch replacement of After Effects placeholders.

I’m looking into getting a new project underway using pdfs exported from inDesign which will be used as artwork for After Effects animations aimed at social media. The pdfs will show the pages of newspaper supplements, the AE video will be a “pageturner” - so the product will depict the pages from the supplement.

Rather than recreate the artwork for each supplement, it makes sense to create an After Effects template, which I have done using placeholders.

At present I can see how to replace individual placeholders with individual pdfs, but as the project could entail replacing about 1,500 pdfs per week, a bit of automation would make sense! I can’t see a batch function in AE - so I assume I’ll have to write a script. I’m a novice at scripting but am prepared to learn, and as the Adobe guide says to work out what you want to do before wading in, I thought I’d ask for help about what is achievable in javascript.

SET UP

The pdfs will be exported from inDesign with a unique name created from a prefix, date, page number and suffix in the format:

ABCD-dd-mm-yy-000-EFGH

Where:

ABCD = product main edition shortcode

dd-mm-yy = date

000 = page number

EFGH = product short code (could be same as product e.g. ABCD) or subsidiary shortcode (could be different from main product, e.g. EFGH).

A couple of real-life examples of front pages from a single date are:

NSST-15-02-18-001-NSTB.pdf

NADV-15-02-18-001-NADV.pdf

NADV-15-02-18-001-NAKP.pdf

But some supplements will be run of print rather than freestanding products, so page numbers might have an ‘offset’, e.g.:

supplement page 1 = NSST-15-02-18-029-NSST.pdf

supplement page 2 = NSST-15-02-18-032-NSST.pdf

supplement page 3 = NSST-15-02-18-031-NSST.pdf

SCRIPTING

Assume I name the placeholders

ABCD-dd-mm-yy-001-EFGH

ABCD-dd-mm-yy-002-EFGH

ABCD-dd-mm-yy-003-EFGH etc,

Method 1

Is there a way of telling AE to replace the placeholders with a pdf based only on their page numbers, e.g.:

replace:

ABCD-dd-mm-yy-001-EFGH with NADV-15-02-18-001-NAKP.pdf

ABCD-dd-mm-yy-002-EFGH with NADV-15-02-18-002-NAKP.pdf

ABCD-dd-mm-yy-003-EFGH with NADV-15-02-18-003-NAKP.pdf etc

or, with an offset,

replace:

ABCD-dd-mm-yy-001-EFGH with NSST-15-02-18-029-NSST.pdf

ABCD-dd-mm-yy-002-EFGH with NSST-15-02-18-030-NSST.pdf

ABCD-dd-mm-yy-003-EFGH with NSST-15-02-18-031-NSST.pdf etc

Method 2

If method one is too ‘fuzzy’ is there a way of telling AE to rename the placeholders so they mimic the name of the pdf, then tell AE to replace the placeholder with the pdf of the same name?

e.g. tell to AE rename placeholders

ABCD-dd-mm-yy-001-EFGH to NADV-15-02-18-001-NAKP

ABCD-dd-mm-yy-002-EFGH to NADV-15-02-18-002-NAKP

ABCD-dd-mm-yy-003-EFGH to NADV-15-02-18-003-NAKP etc

then replace placeholder with pdfs:

placeholder NADV-15-02-18-001-NAKP replaced with  NADV-15-02-18-001-NAKP.pdf

placeholder NADV-15-02-18-002-NAKP replaced with  NADV-15-02-18-002-NAKP.pdf

placeholder NADV-15-02-18-003-NAKP replaced with  NADV-15-02-18-003-NAKP.pdf etc

This method needs to cope with page number offsets.

Method 3

Another idea I haven’t thought of?…

If you can let me know if either of these methods is achievable, or point to existing scripts I can adapt, I’d really appreciate it.

Thanks,

Simon B

1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2018 Feb 18, 2018

As far as Page Numbers and PDF's I know of no way to have AE pick a page out of a multiple page PDF. Try importing a multi-page PDF. You will always only get the first page. You are going to have to extract the pages you want to use in your project. Fifteen hundred PDF's is a huge number and a project that one person could not possibly handle. I can't imagine all 1500 PDF's being in the same comp. That's not going to work. The only efficient thing I can think of is to write some kind of script for Acrobat or In Design that will export all of the pages you want to turn as a single page file or as a PNG or JPEG image. You may have to have the In Design artist do it as the pages are completed.

The template idea is a valid one but for this kind of repeating project, I don't think scripting is the answer.

The first thing I would do would be to open the template project and go to File>Dependencies>Collect files and pick a folder to collect the project. Inside that folder, you will have a folder with the name of the template project. Inside that folder, you will have the .aep file and a footage folder. Inside the footage folder, you will have all footage used in the template.

Next create a separate folder for each of the new projects you are going to create, inside that folder create a Footage folder and inside the footage folder put all of your new files. Make sure that the files have the same name as the footage in the template. I do this all the time.

Now all you have to do is copy the AEP file that is in the original Collected folder then paste to the new project folder, open the AEP and render. If you have artwork size and placement standards this is by far the easiest way to accomplish the task.

If you go to the trouble of writing a script you will still have to have naming conventions, the names will have to be the same for every project and you will spend hours or even days fiddling with the script to get it to work. Don't get me wrong, I use scripts every day to save time, but from your description, I do not think scripting is a viable solution.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Feb 18, 2018 Feb 18, 2018

Method 1 will work nicely.

You can tell AE to ignore dates and just look for page numbers and to replace one numbered page with an identical numbered page. Your issue is telling AE which folder to look into as I'm thinking you will want each project to be in a different because I'm sceptical with having that many files in a single folder due to performance issues.

As Rick has suggested, AE will by default only pick the first page of a multi-page PDF. I thought I recalled a workaround but a quick Google got me nothing.

Here's a bit of info on how to create/export individual pages out of Acrobat. CreativeCOW

I suggest a TIFF for working with, in AE or PPro or for post-production instead of a highly compressed format.

I also encourage you to visit aenhancers.com as they are more atuned towards scripting in AE.

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 20, 2018 Feb 20, 2018

Rick, Roland,

Thank you so much for taking the time to reply.

Sorry, I should have made clear that the pdfs will single pages in individual files. As in theory I could have 1,500 pdfs sloshing round the system every week, I would store them in a folder per supplement, so each folder would have at most 32 pdfs in it.

Roland: Sounds like the perfect solution - trouble is, I can't see how to batch replace the placeholders with live pdfs - is there a function in AE I've missed, or would I need to write a script for this?

Rick: I was thinking that the alternative to methods 1 and 2 is setting up a template pointing at 'dummy' pdfs, then drop 'live' pdfs of the same name on top, replace, then open AE. I was worried that I'd lose concentration moving the live pdfs to the AE dummy footage folder and end up outputting the wrong pages to a project as the pdf naming convention would not tell me which supplement I was working on (a lot fo the pages will look v similar). I had assumed the AE template would look to its original location for the footage, but if it looks first to its nearest footage folder, then the process you have devised could be a viable solution - I could just look at the title of the 'live' folder to check which supplement I'm working on. Just relies on not messing up the processing of moving pdfs to their live folder and renaming them!

Again, thanks for your help guys, I much appreciate it.

Simon B

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Feb 20, 2018 Feb 20, 2018
LATEST

I believe JSON files, as input, to drive Expressions is one way to help update Expressions and Scripts, to automate tasks.

You could place "Today's"task into a folder with today's date. Then have the script(s) and expressions look for this folder, within the main folder. To prevent issues such as working past midnight and where the date may change or if you have to redo something - there should be a slider Expression Control to shift the date back a day or two, or even more - if you realize an error later on and need to update the AEP and archive new renders, with corrections. I believe dates can be reformatted into numbers - much like how Excel does it. I'm just uncertain how Javascript handles it.

A good automation solution must be able to handle issues such as user- errors and also allowing the user to make changes during automation, which in essence means stopping the automation and updating relevant details to the automation task(s).

Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines