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 to the command line aerender and / or ffmpeg (especially if you’ve got lots of cores–see below).

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 here’s my 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.

Wait, what’s a jsx file! what’s a Github?

You can clone or fork all my scripts and their sources at Github, or if you don’t know what that means, you can just download the proxynator.jsx file.

To install and have the script appear in the Window menu in AE, first unzip it, then put it in the Scripts/ScriptUI Panels folder in the After Effects install folder.
On Windows the Scripts folder is in a folder called Support Files, on Mac the Scripts folder is in the top level of the application folder.

Next time you restart AE it will appear in the Window menu.

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 the line  while ($fcount -ge 4){to set how many 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.

 

Leave a Reply

Your email address will not be published. Required fields are marked *