Currently I give away all my motion scripts for free. If you've found them useful and would like to support future development, you can do so here โ To get updates on future ones, follow me on LinkedIn โ
How to use the script
Always check code before running it on your computer. Even basic scripts like this one. If youโre not a developer, ask an LLM like ChatGPT, Claude, or Gemini to verify it for you.
Option 1: Install to your AE Folder
Download this and install the below .jsx file in your After Effects Script folder. You can then run it using the scripts menu, or by using a launcher like Quick Menu 3.
Option 2: Adapt the script yourself
Alternatively copy the code below and develop your own version. If youโre not a developer you can do this easily with an LLM like ChatGPT.
nc 4K.jsx0.7KB
nc 9*16.jsx0.7KB
nc 1080.jsx0.7KB
nc custom.jsx2.1KB
4K Comp ๐
// Create a new 4K composition (3840x2160)
// adapt the elements below for your personal specs
var compWidth = 3840;
var compHeight = 2160;
var compDuration = 300; // Duration in seconds (300 = 5 minutes)
var compFrameRate = 30; // Frame rate
// Create the composition
var newComp = app.project.items.addComp("4K_Comp", compWidth, compHeight, 1, compDuration, compFrameRate);
// Set the background color (optional)
newComp.bgColor = [0, 0, 0]; // Black background
// Prompt the user for the composition name
var compName = prompt("Enter the name for the new composition:", "4K_Comp");
// Rename the composition with the user-provided name
if (compName !== null && compName !== "") {
newComp.name = compName;
}
// Open the composition in the viewer
newComp.openInViewer();
Custom Comp ๐
// Create a new window
var dialog = new Window("dialog", "New Composition Settings");
// Add input fields and labels
dialog.add("statictext", undefined, "Composition Name:");
var compNameInput = dialog.add("edittext", undefined, "4K_Comp");
compNameInput.characters = 20;
compNameInput.active = true; // Set focus to the first input field
dialog.add("statictext", undefined, "Width:");
var compWidthInput = dialog.add("edittext", undefined, "3840");
compWidthInput.characters = 10;
dialog.add("statictext", undefined, "Height:");
var compHeightInput = dialog.add("edittext", undefined, "2160");
compHeightInput.characters = 10;
dialog.add("statictext", undefined, "Frame Rate:");
var compFrameRateInput = dialog.add("edittext", undefined, "30");
compFrameRateInput.characters = 10;
dialog.add("statictext", undefined, "Scale Factor:");
var scaleFactorInput = dialog.add("edittext", undefined, "1");
scaleFactorInput.characters = 10;
// Add OK and Cancel buttons
var okButton = dialog.add("button", undefined, "OK", {name: "ok"});
var cancelButton = dialog.add("button", undefined, "Cancel", {name: "cancel"});
// Show the dialog and get the result
if (dialog.show() == 1) {
var compName = compNameInput.text;
var compWidth = parseInt(compWidthInput.text, 10);
var compHeight = parseInt(compHeightInput.text, 10);
var compFrameRate = parseInt(compFrameRateInput.text, 10);
var scaleFactor = parseFloat(scaleFactorInput.text);
if (compName !== "" && !isNaN(compWidth) && !isNaN(compHeight) && !isNaN(compFrameRate) && !isNaN(scaleFactor)) {
if (scaleFactor > 1) {
compWidth *= scaleFactor;
compHeight *= scaleFactor;
}
var compDuration = 300; // Duration in seconds (5 minutes)
// Create the composition
var newComp = app.project.items.addComp(compName, compWidth, compHeight, 1, compDuration, compFrameRate);
// Set the background color (optional)
newComp.bgColor = [0, 0, 0]; // Black background
// Open the composition in the viewer
newComp.openInViewer();
} else {
alert("Invalid input. Please enter valid values for all fields.");
}
}