Proxynator – a script to link multiple files to proxies in After Effects – now with a UI!

I’ve been working with 6K footage from our Kinefinity Terra camera. To stop things grinding to a halt I’ve written a script for After Effects to allow me to set a whole folder’s worth of proxies at once.

While After Effects does let you create a proxy for a file, it’s pretty slow compared ffmpeg (especially if you’ve got lots of cores–see below for how I run lots of ffmpeg instances in parallel to chomp through the proxy making in a fraction of the time AE would take).

What’s more, you can’t work on a project while you’re rendering the proxies, whereas command line renderers and converters can run in the background. So for an efficient workflow it’s much better to use aerender and ffmpeg.

The problem you face if you render in the background is that you have to manually link the proxy files you create, and After Effects will only let you link a proxy one file at a time (unlike Premiere). If you have dozens and dozens of files, that’s going to be really tedious and fraught with errors.

So there I was setting proxies for all of the source files one… by… one…

…and thinking that this kind of repetitive task is the kind of thing best left to a computinator. So I wrote a script to speed up the process.



To use it, first open the panel—go to Window>Proxinator. Once the panel is open select some items in your project window, hit the choose proxy folder button to set your source folder and then hit the Set proxies for selected button. The script will set a proxy for each of the selected items (footage or comp) to the first file it finds in the folder with the same name as it.

Part II: Maximising ffmpeg performance with multiple instances

If you’re on Windows and you want to batch-encode files, using several instances of ffmpeg at once, here’s the powershell script I’ve been using

ls|%{
 $fcount = (Get-Process "ffmpeg" -ErrorAction SilentlyContinue|Measure-Object).count
  while ($fcount -ge 4){
  sleep 1; 
  $fcount = (Get-Process "ffmpeg" -ErrorAction SilentlyContinue|Measure-Object).count
  Write-Host ("{0}." -f $fcount) -NoNewline
 }
 $ArgumentList = ('-n -i "{0}" -c:v prores -profile:v 3 -vf scale=-1:1080 "{1}"' -f $_.fullname, ("\path\to\proxies\"+$_.name))
  start-process "ffmpeg" -ArgumentList $ArgumentList
}

This will run 4 instances of ffmpeg at a time (change the number 4 on line 2  while ($fcount -ge X){ and substitute X with how many instances you want to run). It converts every file in the current folder to a proRes movie with 1080 lines (how wide it is depends on the aspect ratio of the source). You can change the encoding settings in the line $ArgumentList = etc. etc. Note that you also need to specify the full path to your proxy folder—at the end of that same line change  "\path\to\proxies" to whatever the full path is.

Download

You can download this script along with all my other scripts here. Or to download just this script click the download button below.

11 comments

  1. Thank you for the Downloads 🙂 would be a great time-saver. – Unfortunately, it doesn’t work on AE 15.1.2 Mac. Do you have any suggestions… ? THX Missi

    Reply

    1. I’m thinking it might have something to do with being written and tested only on windowss (My mac is broken at the moment). I had a look at the source, and it should all be platform agnostic, except for one thing: do your proxies have file extensions like “.mov”, “.mp4” etc? The script looks for movie files based on their extensions, so if yours don’t have extensions it wouldn’t find them. Try this: open the proxynator.jsx script with a textedit and change the line that looks like:
      // possible matches for the proxy, from the reasonable to the silly var suffixes = [ ".mov", ".avi",
      to include some empty quotes like this:
      // possible matches for the proxy, from the reasonable to the silly var suffixes = [ "", ".mov", ".avi",
      Tell me if that works and I’ll update the script.

      Reply

  2. Hi! Really good idea but didn’t works on mac even with : “”, …

    Reply

  3. Thanks in advance.
    very impressive.

    I have one thing I want to adjust.
    I want to change a sequence stored in a folder to a proxy.

    What should I do?
    Thank you.

    Reply

  4. Bummer, having trouble with this in CC2020 on Mac

    Reply

  5. Any idea if there’s a way to make this work with clips that have slightly different filenames/extensions? For example, setting DJI_0103_1.mov as the proxy for DJI_0103.mp4?

    Reply

  6. This script doesn’t work for me and I’m PC 🙁
    The ‘Set proxies for selected’ button just turns blue then nothing happens…
    Can you advise?

    Reply

Leave a Reply to Simon Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.