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

Transition issue after trimming clips (Extendscipt)

Participant ,
Dec 17, 2023 Dec 17, 2023

I have script that automatically inserts clips and trim them to match beats in music track.

But sometimes transitions are not working between clips and in timeline you can see some gap:

Dmitriy5FD0_0-1702832433094.png

Dmitriy5FD0_0-1702834363943.png

(I can even select it in UI but can't remove it using UI also)

Than i found that i have some empty objects:

 

qeSequence = qe.project.getActiveSequence(0);
qeTrackOne = qeSequence.getVideoTrackAt(0);
qeTrackOne.getItemAt(2).type

 

Result: Empty

So i have object type empty

Dmitriy5FD0_1-1702833285346.png

tried to remove it using:

 

qeTrackOne.getItemAt(2).remove()

 

Error: Unknown error exception

 

Any ideas why i have this gaps and way how to remove it...

P.S. If i not trim clips using inPoint outPoint i not have those gaps...

 

Code:

 

for(var im=0;im<job_data.media.length;im++) {
	cMedia = getMediaByName(job_data.media[im].split("/").pop(),media);
	sequence.videoTracks[0].insertClip(cMedia,start);
	length  = get_next_beat(1,start,job_data.beats)-start; // getting next beat time - start = needed duration of clip
	// Trimming to needed duration
	clip = getClipByName(cMedia.name, seq[video_type].videoTracks[0]);
	trim = clip.duration.seconds-length;
	cutTimeStart = new Time();
	cutTimeStart.seconds = clip.inPoint.seconds + trim/2;
	clip.inPoint = cutTimeStart;
	cutTimeOut = new Time();
	cutTimeOut.seconds = clip.start.seconds + length;
	clip.end = cutTimeOut;
	//
	
	start = clip.end.seconds; // start time for next clip
}

 

TOPICS
SDK
252
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 ,
Dec 17, 2023 Dec 17, 2023

The QE DOM remains unsupported, and not at all recommended. 

>P.S. If i not trim clips using inPoint outPoint i not have those gaps...

Do you encounter similar problems, if you use PPro's normal DOM, to perform the same operation(s)?

 

 

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 ,
Dec 17, 2023 Dec 17, 2023
LATEST

I tried to use QE to try to remove gaps, nornal DOM doesn't contain those objects...

start = clip.end.seconds;
sequence.videoTracks[0].insertClip(cMedia,start);

this causes gap, so i've changed it to

sequence.videoTracks[0].insertClip(cMedia,start-0.01);

that almost fixes issue... but i don't understand why those gaps appears...

 

Also i'm using QE to add transitions as there's no other way:

item.addTransition(transitionToApply, false, '00;00;00;15');

but it adds transitionat the end of clip, not between them:

Dmitriy5FD0_0-1702849377242.png

is there any way to add transition between clips at the middle?

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