Skip to main content
Participant
March 6, 2024
Answered

Automating Video Editing in Adobe Premiere Pro with ExtendScript

  • March 6, 2024
  • 2 replies
  • 5742 views

Hello everyone,

 

I'm currently working on a project in Adobe Premiere Pro and am looking for some guidance on how to automate a specific editing process using ExtendScript.

Here's the scenario: I have two video tracks (from two different cameras) for a podcast, and a single audio track. I also have a detailed list specifying the exact times each speaker talks. For example:

 

start=0.0s stop=12.7s speaker_SPEAKER_01
start=13.5s stop=37.4s speaker_SPEAKER_00

 

 

and so on. The goal is to automatically cut between the two video tracks based on who is speaking at any given moment.

 

Interface for Input: A simple user interface where I can select the two video tracks. This is to ensure I am working with the correct tracks.

 

Processing the List: The script should read the timecodes and speaker identifiers from the input list.

 

Automating Cuts: Based on the input, the script should automatically cut between the two video tracks at the specified times. For instance, if SPEAKER_01 starts at 0.0s and stops at 12.7s, the script should cut to the track corresponding to SPEAKER_01 during this interval.

 

I'm not sure how to start with such a task in ExtendScript, particularly with the aspects of reading the input list and controlling the cuts in the timeline. Any pointers, code snippets, or references to similar projects would be immensely helpful.

 

Is there a straightforward way to create such an automation, or any tools/plugins that might simplify this process? I feel that there's a lack of detailed resources or guides on the internet for such specific tasks in ExtendScript.

 

Thank you in advance for your help!

I've already looked at this, but to be honest I'm lost ^^

https://github.com/Adobe-CEP/Samples/tree/master/PProPanel

Premier Pro 24.2.1
Windows 10

 

 

This topic has been closed for replies.
Correct answer Bruce Bullis

> I'm not sure how to start with such a task in ExtendScript

 

PProPanel is the right place!

 

Interface for Input: A simple user interface where I can select the two video tracks. This is to ensure I am working with the correct tracks.

 

Do you want the user to start with track items already in tracks? That sounds harder. 🙂 


Here's some pseudo-code, with links to relevant example code in PProPanel.

  • Confirm happy state of destination sequence [either check the existing sequence, or make a new one from template; what "happy" means, is up to you.]
  • Define which project item relates to "speaker 1",  and "speaker 2"; I'd use project panel selection to do this.
  • Read and parse list. Here's PProPanel browsing for a file; you can use the ExtendScript File object for more parsing help.
  • For each segment defined in list:
    • insert edit from appropriate projectItem [1 or 2] into sequence, to appropriate video track, using in/out points specified in list
    • [bonus behavior; it'd be a simple matter to add sequence markers for every speaker change]


Do I have that right? Miss anything? 

2 replies

Mathias Moehl
Community Expert
Community Expert
March 7, 2024

My (paid) extension Automation Blocks could be very hepful, too.

 

To get you started, here is a tutorial, which reads clips with start and end times from a spreadsheet file and inserts them in the active sequence:

https://www.youtube.com/watch?v=FPeOjwP1pX8

 

And maybe instead of basic cuts, you want to animate between the two perspectives. Then you can "steal" block code from the "Remote Interview" tools, which are included in Automation Blocks:

https://docs.mamoworld.com/automation-blocks/tools-pr/keyframeTools#remote-interview-tools

 

Finally, if you are lost, you can also hire an expert:

https://docs.mamoworld.com/automation-blocks/hireAnExpert

"The Machine Must Work" can create both a dedicated CEP panel or an Automation Blocks tool for you - depending on what fits best in your scenario.

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
March 6, 2024

> I'm not sure how to start with such a task in ExtendScript

 

PProPanel is the right place!

 

Interface for Input: A simple user interface where I can select the two video tracks. This is to ensure I am working with the correct tracks.

 

Do you want the user to start with track items already in tracks? That sounds harder. 🙂 


Here's some pseudo-code, with links to relevant example code in PProPanel.

  • Confirm happy state of destination sequence [either check the existing sequence, or make a new one from template; what "happy" means, is up to you.]
  • Define which project item relates to "speaker 1",  and "speaker 2"; I'd use project panel selection to do this.
  • Read and parse list. Here's PProPanel browsing for a file; you can use the ExtendScript File object for more parsing help.
  • For each segment defined in list:
    • insert edit from appropriate projectItem [1 or 2] into sequence, to appropriate video track, using in/out points specified in list
    • [bonus behavior; it'd be a simple matter to add sequence markers for every speaker change]


Do I have that right? Miss anything?