XaiJu
EkafdpSEAsub
EkafdpSEAsub

patreon


CutAndExport

The "EfficientCutAndExport" script automates the process of advanced video editing and exporting in Adobe After Effects, making your workflow faster and more efficient. With this script, you can effortlessly perform the following tasks:


Cut Videos at Desired Frames: Specify the cut frames in the script, and it will automatically create cuts at those frames in your video, allowing you to remove or rearrange segments effortlessly.


Apply Random Transition Effects: The script offers a selection of transition effects such as "Cross Dissolve," "Fade," "Blur," "Slide," and "Wipe." It randomly applies these effects between the cut segments, adding visual flair and smooth transitions to your edited video.


Custom Export Settings: Define the export path, bitrate, and resolution to ensure optimal video quality. The script supports a resolution of 1920 x 1080, and you can set a bitrate of 7000 or adjust it according to your requirements.


Streamlined Workflow: By automating the video editing and export process, this script eliminates manual intervention, saving you valuable time and effort. It cuts the video, applies transitions, and exports the final edited video with a single click.


With "EfficientCutAndExport," you can enhance your video editing workflow, making it more efficient and productive. It empowers you to create professional-looking videos seamlessly, whether you're working on personal projects, marketing materials, or client deliverables. Experience the speed and efficiency of Adobe After Effects with this powerful script and take your video editing capabilities to new heights.



// Adobe After Effects Script: Advanced Video Editing and Export


// Define the video file path

var videoFilePath = "path/to/your/video.mp4";


// Set the desired cut frames

var cutFrames = [60, 120, 180, 240, 280, 320, 360];


// Set the available transition effects

var transitionEffects = ["Cross Dissolve", "Fade", "Blur", "Slide", "Wipe"];


// Define export settings

var exportPath = "path/to/export/video.mp4";

var bitrate = 7000;

var resolution = [1920, 1080];


// Get a reference to the project

var project = app.project;


// Import the video file into the project

var importOptions = new ImportOptions(File(videoFilePath));

var importedFootage = project.importFile(importOptions);


// Create a new composition based on the video file

var composition = project.items.addComp("Edited Video", resolution[0], resolution[1], 1, importedFootage.duration, importedFootage.frameRate);

var videoLayer = composition.layers.add(importedFootage);


// Loop through the cut frames and create cuts at those frames

for (var i = 0; i < cutFrames.length; i++) {

  var cutFrame = cutFrames[i];


  // Calculate the time based on the frame number

  var cutTime = cutFrame / importedFootage.frameRate;


  // Create a new layer at the cut frame

  var cutLayer = composition.layers.add(importedFootage);

  cutLayer.startTime = cutTime;


  // Apply a random transition effect

  var randomEffectIndex = Math.floor(Math.random() * transitionEffects.length);

  var transitionEffect = transitionEffects[randomEffectIndex];

  cutLayer.effect.addProperty(transitionEffect);


  // Set the transition duration

  var transitionDuration = 1;

  cutLayer.effect(transitionEffect)("Duration").setValue(transitionDuration);


  // Adjust the layer opacity for the transition

  cutLayer.opacity.setValueAtTime(cutTime - transitionDuration, 0);

  cutLayer.opacity.setValueAtTime(cutTime, 100);

  cutLayer.opacity.setValueAtTime(cutTime + transitionDuration, 0);

}


// Set the output module for rendering

var outputModule = composition.addOutputModule("Export Output");

outputModule.file = new File(exportPath);

outputModule.applyTemplate("H.264");


// Set the custom export settings

outputModule.setSettings([

  { "Setting Name": "Bitrate", "Bitrate": bitrate },

  { "Setting Name": "Width", "Value": resolution[0] },

  { "Setting Name": "Height", "Value": resolution[1] },

  { "Setting Name": "Force Letterbox/Pillarbox", "Value": true }

]);


// Render the edited video

project.renderQueue.items.add(composition);

app.project.renderQueue.render();


// Alert the user when the rendering is complete

alert("Video editing and export process complete!");



More Creators