Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Changing pre-rendered video footage using csv data

  • Perry Sheppard

    July 31, 2020 at 10:41 pm

    I want to mention–because this community is so fantastic and I’d hate to leave the impression that I’m trying to get ‘free sub-contractor help’–that I work for a public institution and this is one of two projects I’ve been developing on nights and weekends (this isn’t for a paying client).

    The institution isn’t asking for these solutions because they don’t know what’s possible, so I’m trying to provide the proof-of-concepts to help improve our processes and provide better experiences for our community. So, I’ve been, admittedly, outside my coding comfort zone because I’m a solution designer more than an actual developer.

    Filip, you Tomas (and others) have been really gracious with your time and support as I’ve been trying to learn expressions and the more complex ins-and-outs of AE, so I wanted to let you know how much it’s appreciated.

  • Filip Vandueren

    August 1, 2020 at 9:01 am

    Since only the first segment is truly dynamic.
    I would just render those 4000 (don’t know if AE like 4000 comps inside of 1 project though, but easy to distribute over a few files if not)
    This is pretty trivial to do.
    You could even just have a simple expression that looks at a number in the name of the comp to fetch that name from a csv.
    Comp 1 -> name in row 1
    Comp 2 -> name in row 2
    Etc.

    And then either automate premiere or even ffmpeg to stitch together the rendered titles with the other segments.
    Doing it with ffmpeg would be lightning fast but involves some CLI scripting. https://trac.ffmpeg.org/wiki/Concatenate

    Rendering the whole movie over and over again in After Effects would be by far the worst option. Because that’s just not what AE is built for, it’s not an editor.

  • Filip Vandueren

    August 1, 2020 at 3:28 pm

    Did a quick test with 1000 comps.
    a simple script to duplicate a project-item 999 times and add each copy to the renderqueue
    took just a few minutes to complete.
    After Effects might not allow you to scroll down through past the first few 100 render queue items (a problem with drawing the interface), but it’ll render out all of them.

    I juist loaded in a csv with mock username.
    set the expresison for text-source to this:

    i=parseInt(thisComp.name.split(" ")[1]);
    t=footage("MOCK_DATA.csv").dataValue([1,i]) + " " + footage("MOCK_DATA.csv").dataValue([2,i])

    (takes a number from the second word of comp name like “comp 123” = 123 and looks that up in the)

    then ran this simple script:

    app.beginUndoGroup("999")

    for (i=0; i < 999; i++) {
    cmp = app.project.items[1].duplicate();
    app.project.renderQueue.items.add(cmp);
    }

    app.endUndoGroup();

    Obvioulsy just a quick &dirty proof of concept, you would want to change the name of the queued item to the name or some other identifier etc.

  • Perry Sheppard

    August 1, 2020 at 5:15 pm

    Thanks Filip, that gives me a better sense of it.

    I’ve been researching FFmpeg (haven’t used it in years), Premiere Extendscript and AE scripting this morning. I know AE isn’t really for editing and it might not be sustainable on an ongoing basis, but it looks like it might be the best option for me for the proof-of-concept.

    I’ll take a closer look at that script you provided and see if I can wrap my head around the syntax. I found a couple of reference sites, but still working through it.

  • Perry Sheppard

    August 2, 2020 at 3:57 am

    Filip, can you private message me or email me. For some reason, the email response option fails on my computer. Thanks!

  • Filip Vandueren

    August 2, 2020 at 10:21 am

    I don’t have your e-mail ?

  • Perry Sheppard

    August 3, 2020 at 3:08 am

    perry.sheppard at gmail.com

  • Tomas Bumbulevičius

    August 4, 2020 at 11:09 am

    Hey Perry, sorry for my late response, yet I see Filip might gave you a path to chase already. While I am an advocat for Templater all the time whenever I have a chance to do that (use it myself and for clients), before committing now or later you should consider whether it will be beneficiary in the long run.

    Reason why I do say so – it has some learning curve as well, thus going in an easier path from a first sight (to get things finished now) might seem a great choice, but it also provides cons, when in the future you will still need scripting, sooner or later. Thus its better to go that harder path sooner, IMO! (: Unless you don’t have intentions for automation – then its out of question. Yet, considering where everything is going to in the tech, knowing automation well enough is beneficial!

    On a different note, as Filip mentioned – approaches are trivial and depends on everyones experiences/taste. Personally I wouldn’t recommend parsing .csv, but instead – run a batch script which creates N projects and do replacement in each of them. Having XXXX comps in a project is not a sustainable choice, nor rendering all of them in a single project through Render Queue.

    Find out more:
    Motion Graphics Design & After Effects Tutorials
    On YT
    On VH

Page 2 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy