Skip to main content
Participant
December 1, 2025
Question

How to batch process many clips for adding pixel motion blur

  • December 1, 2025
  • 1 reply
  • 88 views

Pretty simple problem here, but maybe without a simple solution. I have a large collection of short (~5 seconds or less) clips (~300 in total), and need to apply pixel motion blur to all of them.

The problem is that pixel motion blur creates a massive volume of cached data (several GB for a 5s clip). So I need an automated solution to:

 

  1. loop through each clip
  2. apply pixel motion blur
  3. render the clip out
  4. clear the cache
  5. move on to the next clip

I could do this manually, but it would take absolutely forever.

I tried to automate the process with AE scripting in JavaScript, but it seems that pixel motion blur in particular cannot be applied in a scripting environment (?)

Any suggestions?

1 reply

Inspiring
December 1, 2025

Scripting can certainly apply effects/presets.    Not sure if I could help yo with the caching thing,  but does it really matter as AE will simply purge older data as it creates new data while it's rendering?
But here's one method you could use to get the job done.  
Bring your clips into AE, drag them onto the Create a New Composition icon on the bottom to create your 300 comps.
Create an Animation Preset of Pixel Motion Blur with your prefered settings,  then use this handy script and it will apply that preset to all the layers in all the comps.  ***BE sure to change the section in // --- UPDATE THIS TO YOUR REAL .ffx FILE PATH ---. to the location on your system where your presets are stored.


(function dockablePanel(thisObj) {

function applyPixelMotionBlur() {
app.beginUndoGroup("Apply Pixel Motion Blur");

var sel = app.project.selection;
if (!sel || sel.length === 0 || !(sel[0] instanceof CompItem)) {
alert("Please select one or more comps in the Project panel.");
return;
}

// --- UPDATE THIS TO YOUR REAL .ffx FILE PATH ---
var presetPath = "C:/Path/To/Your/Presets/Apply Pixel Motion Blur.ffx";
var presetFile = new File(presetPath);

if (!presetFile.exists) {
alert("Preset file not found:\n" + presetPath);
return;
}

for (var i = 0; i < sel.length; i++) {
if (sel[i] instanceof CompItem) {
var comp = sel[i];
if (comp.numLayers > 0) {
var topLayer = comp.layer(1);
try {
topLayer.applyPreset(presetFile);
} catch (e) {
alert("Failed to apply preset to: " + comp.name);
}
}
}
}

app.endUndoGroup();
}

function buildUI(thisObj) {
var win = (thisObj instanceof Panel) ? thisObj :
new Window("palette", "Pixel Motion Blur", undefined, { resizeable: true });

win.orientation = "column";
win.alignChildren = ["fill", "top"];
win.spacing = 10;
win.margins = 10;

// --- Simple text message ---
var msg = win.add("statictext", undefined, "Select Comps in Project Window");
msg.alignment = "center";

// --- Button ---
var btnApply = win.add("button", undefined, "Apply Pixel Motion Blur");
btnApply.onClick = applyPixelMotionBlur;

win.onResizing = win.onResize = function () { this.layout.resize(); };

return win;
}

var myPanel = buildUI(thisObj);
if (myPanel instanceof Window) {
myPanel.center();
myPanel.show();
} else {
myPanel.layout.layout(true);
}

})(this);