Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Editing clips with ExtendScript

Community Beginner ,
May 09, 2017 May 09, 2017

hello, you hardworking, knowledgeable people!

I desperately need to automate a big part of the editing process in Premiere.

For the next project we will be recording tons of footage, where the main action on video will be repeating with variations many many times. We then need to split the long recordings into separate chunks. I will be able bring in time markers, for where to make the cuts.

But I've hit a wall when trying to manipulate clips on the timeline with ExtendScript. I can read a bunch of info about the clip, e.g.:

start

end

inPoint

outPoint

(.seconds and .ticks)

But I'm unable to change any of those values. And the only functions I've found deal with selecting a clip i.e. isSelected() and setSelected()

Are there any ways to trim/cut/move, whatever, clips on the timeline using ExtedSctipt scripts, or am I badly out of luck?

And to finish off what I'm trying to do I'll need to do something like "Make Subsequence" with all of the cuts, to separate them into their own videos I can then export, again looking to automate this.

Many thanks!

TOPICS
SDK
13.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , May 11, 2017 May 11, 2017

Thanks for the repro case, Arthur! We're tracking the issue as:

DVAPR-4202375, "Sequence in/out points are not respected, when sequence's projectItem is used to insert it as a clip".

I'll keep the list informed of our progress.

Translate
Adobe Employee ,
May 11, 2017 May 11, 2017

I'm not sure in which documentation that should be, other than in the documentation link I provided...?

As for why the recommended approach ("Just let Add-Ons handle the sync, through the CC Desktop app")...I have no idea. They have an active forum here, as well...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 11, 2017 May 11, 2017

Bruce Bullis wrote

I'm not sure in which documentation that should be, other than in the documentation link I provided...?

I think this documentation in particular could benefit from having that information added to it. That's the documentation that's linked when you visit the extension page, click on "Where to find it", expand "Troubleshooting checklist", and click "Troubleshooting guide"...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
May 11, 2017 May 11, 2017

Agreed, that makes sense.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 06, 2018 Feb 06, 2018

try this

var seq = app.project.activeSequence;

var vTrack = seq.videoTracks[3];

var VinClip = $._PPP_.getClipFromeSequence("1.png", vTrack);

var endTime =VinClip.end;

endTime.seconds = 50;

var startTime =VinClip.start;

startTime.seconds = 10;

VinClip.start = startTime;

VinClip.end = endTime;

getClipFromeSequence: function (name, Track) {

     for (var i = Track.clips.numItems - 1; i >= 0; i--) {

          var clip = Track.clips;

          if (clip.name == name) {

               return clip;

          }

     }

     return 0;

}

i can trim clip on the timeline .

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 06, 2018 Feb 06, 2018
LATEST

This is cool, thanks, im getting some stuff happening!

I realized that the ORDER in which you paste on attributes onto clips affects how they change in the timeline...
(Not very intuitive.)
But this seems to copy edit-info well from one clip to the next (debugging now).

         var clip1 = app.project.activeSequence.videoTracks[0].clips[0];

        var clip2 = app.project.activeSequence.videoTracks[1].clips[0];

        if (clip1.start.seconds > clip2.end.seconds){

            clip2.end = clip1.end;

            clip2.start = clip1.start;

        }else{

            clip2.start = clip1.start;

            clip2.end = clip1.end;

            }

        clip2.inPoint = clip1.inPoint;

        clip2.outPoint = clip1.outPoint;

        clip2.duration = clip1.duration;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines