Copy link to clipboard
Copied
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:
(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
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
}
Copy link to clipboard
Copied
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)?
Copy link to clipboard
Copied
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:
is there any way to add transition between clips at the middle?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now