Skip to main content
Inspiring
February 16, 2022
Answered

script to add audio and clips at certain points

  • February 16, 2022
  • 1 reply
  • 614 views

Hi. I create educational videos for students to learn English.

I create the same video for every single class. BUT I record the audio separately for each class then add it to the video.

Is here a way of me automating the task. ie: Create an audio folder for each class. Use script to add the audio at certain points in the video, then export the video. This way I don't have to add the audio separately for each audio and each class. It would save me days of work literally.

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

Yes, that's completely possible. 

You'd run such a script from within a CEP panel; here's the PProPanel example, and here's some "getting started" info. 🙂

Example code, for inserting projectItems into a sequence: 

https://github.com/Adobe-CEP/Samples/blob/2cd368a84e86e9f5c85ad403140a09aaadbb4fd4/PProPanel/jsx/PPRO/Premiere.jsx#L1656

Example code, for rendering a sequence: 

https://github.com/Adobe-CEP/Samples/blob/2cd368a84e86e9f5c85ad403140a09aaadbb4fd4/PProPanel/jsx/PPRO/Premiere.jsx#L713

1 reply

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
February 16, 2022

Yes, that's completely possible. 

You'd run such a script from within a CEP panel; here's the PProPanel example, and here's some "getting started" info. 🙂

Example code, for inserting projectItems into a sequence: 

https://github.com/Adobe-CEP/Samples/blob/2cd368a84e86e9f5c85ad403140a09aaadbb4fd4/PProPanel/jsx/PPRO/Premiere.jsx#L1656

Example code, for rendering a sequence: 

https://github.com/Adobe-CEP/Samples/blob/2cd368a84e86e9f5c85ad403140a09aaadbb4fd4/PProPanel/jsx/PPRO/Premiere.jsx#L713

Bed30321077z973
Inspiring
October 26, 2023

Hello

Thanks for the answer, you seem to be a super expert. I personnaly had difficulty reading it first. I would have few questions if you dont mind.

1) What is (ProjectItemType.BIN) ? It seems there are 3 types: BIN, FILE and CLIP, but I am missing one because they all both to numbers up to 4, but in the whole file you linked there are only 4 times.

2) This line (timeAtZero.seconds) indicates the instant 0, right? My question is how to indicate another number? for example second 121 (2:01) ?

Thanks

Bruce Bullis
Community Manager
Community Manager
October 26, 2023

1. The fourth type is ROOT, the root of the project.
2. Correct; you can indicate another time by passing a new value in ticks (254016000000 ticks per second), or a floating point value for seconds (121.0, for your example).