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

Perform a cut from script?

Explorer ,
Aug 26, 2020 Aug 26, 2020

Copy link to clipboard

Copied

I'm currently working on a PPro Panel that will cut the last second off of a clip and extend that clipped second duration out the next clip. I'm currently stuck on how to perform a clip cut from the script. This will be used to supply extending the visual in case the above-placed title is longer than the below clip. It'll pause the video while the title continues to finish out it's duration. 

 

These are the notes I have so far: 

app.project.activeSequence.getSelection()
this will be used to get the end seconds of a clip

app.project.activeSequence.setPlayerPosition()
this will be used to set the player position -1 second from end of selection.

 

I have PropertyExplorer installed and have exploring properties for a bit and haven't found the appropriate method/property to perform a cut. Help, please? 

TOPICS
Editing , How to , SDK , User interface or workspaces

Views

2.0K

Translate

Translate

Report

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 2 Correct answers

Adobe Employee , Aug 26, 2020 Aug 26, 2020

There's no cut function; you'd need to change the end point of the trackItem (clip).

Votes

Translate

Translate
Adobe Employee , Jul 22, 2023 Jul 22, 2023
var myClip = app.project.sequences[0].videoTracks[0].clips[0];  // grabs first trackItem in first track in first sequence

if (myClip){
	var oldEnd = myClip.end;
	if (oldEnd){
		oldEnd.seconds = oldEnd.seconds + 3; // arbitrary new value
		myClip.end = oldEnd;
	}
}

Votes

Translate

Translate
Adobe Employee ,
Aug 26, 2020 Aug 26, 2020

Copy link to clipboard

Copied

There's no cut function; you'd need to change the end point of the trackItem (clip).

Votes

Translate

Translate

Report

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 ,
Aug 26, 2020 Aug 26, 2020

Copy link to clipboard

Copied

Can this be done through a different method? I'm currently working on this as a panel using HTML and ExtendScript/Javascript. Can another develop method provide this kind of automation? i.e. via the SDK

Votes

Translate

Translate

Report

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 ,
Aug 26, 2020 Aug 26, 2020

Copy link to clipboard

Copied

Can this be done through a different method?

 

Yes; changing the end point of the trackItem. 🙂

> Can another develop method provide this kind of automation?

 

You don't need another method; you can use ExtendScript.

Votes

Translate

Translate

Report

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 ,
Aug 26, 2020 Aug 26, 2020

Copy link to clipboard

Copied

I tried updating the end point with 


app.project.activeSequence.getSelection()[0].end.seconds = 20 

and

app.project.activeSequence.getSelection()[0].end = {"seconds":20, "tick":existingTick};

 

and have had no success. I appreciate your information henceforth. Could you help me further this process? 

Votes

Translate

Translate

Report

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 ,
Aug 26, 2020 Aug 26, 2020

Copy link to clipboard

Copied

Reaching out directly.

 

Votes

Translate

Translate

Report

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
New Here ,
Aug 20, 2021 Aug 20, 2021

Copy link to clipboard

Copied

Hi!
did you find the proper way to cut part of tacks or clips ??
Thanks

Votes

Translate

Translate

Report

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 ,
Aug 23, 2021 Aug 23, 2021

Copy link to clipboard

Copied

The proper way remains adjusting the end point.

Votes

Translate

Translate

Report

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
New Here ,
Aug 23, 2021 Aug 23, 2021

Copy link to clipboard

Copied

Thanks!
actualy I solved my problem)
we can use this:
app.project.rootItem.children[index].createSubClip(name, startTime, endTime,
hasHardBoundaries, takeAudio, takeVideo);

and than insert this clipped project item to sequence track

app.project.sequences[index].videoTracks[index].insertClip(projectItem, time);

Votes

Translate

Translate

Report

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 ,
Jul 21, 2023 Jul 21, 2023

Copy link to clipboard

Copied

What is the code snippet to adjust the end point?
There have been multiple responses from employees saying 'adjust the end point' without saying how to adjust the end point via script.

Wouldn't have commented about it but Google has led me back here like a dozen times.

Votes

Translate

Translate

Report

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 ,
Jul 22, 2023 Jul 22, 2023

Copy link to clipboard

Copied

var myClip = app.project.sequences[0].videoTracks[0].clips[0];  // grabs first trackItem in first track in first sequence

if (myClip){
	var oldEnd = myClip.end;
	if (oldEnd){
		oldEnd.seconds = oldEnd.seconds + 3; // arbitrary new value
		myClip.end = oldEnd;
	}
}

Votes

Translate

Translate

Report

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 ,
Jul 22, 2023 Jul 22, 2023

Copy link to clipboard

Copied

LATEST

You're the best, thanks!

Votes

Translate

Translate

Report

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
New Here ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

There's no cut function in extendscript API. QE DOM has razor(string, bool, bool) method on sequence and track objects but I failed to get it to work.
As a workaround you can use overwriteClip() with one-frame media and then delete that new media immediately, so you will have two desired cutted clips BBBBUT with one frame gap.
Another workaround is adjusting inPoint, outPoint, start and end, but it is a bit tricky: clip's inPoint and outPoint work in a strange nonobvious way, so make tests first.

Votes

Translate

Translate

Report

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