# 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.

#### Installing After Effects Scripts

Recent versions of After Effects will take care of the installation for you. For scripts with a UI, go to the File menu in AE and choose Scripts>Install Script UI Panel. Point it at the unzipped .jsx file that you just downloaded and let it work its magic, then restart AE.

#### Running the script

Once the script is installed it should appear in AE’s Window> menu. Calling the script from this menu will make its window appear, and it can then be docked like any other panel. If you want it to always be visible, add it to your workspace.

1. […] proxynator.jsx – lets you set multiple proxies in one click […]

2. 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

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.

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

1. Dang. I’ll scooch over to a mac some time and have a bash at it.

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.