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

Parameter types for Track.insertClip and Track.overwriteClip?

Enthusiast ,
May 23, 2017 May 23, 2017

Copy link to clipboard

Copied

What are the parameters for the Track.insertClip and Track.overwriteClip functions? Specifically I'm interested in understanding what parameters are allowed, what parameters are optional, parameter types, and the return value, if any, of the functions.

Here's what I've been able to glean [in TypeScript format] from the Premiere.jsx examples:

// insertClip's second parameter can be either a number or a string.

insertClip(clipToInsert: ProjectItem, timeInSeconds: number😞 void;

insertClip(clipToInsert: ProjectItem, time: string😞 void;

// overwriteClip only has a single example (using a number for the

//  time).Does it also accept a string?

overwriteClip(clipToWrite: ProjectItem, time: number😞 void;

The stuff I'm unsure of is colored red.

Further, any documentation about what the APIs actually do would be very useful. For instance, if the time specified for overwriteClip is in the middle of another clip on the Track, does the entire clip get erased and the current clip inserted at the specified location, or is the existing clip get truncated at the point specified before insertion?

Thanks!

TOPICS
SDK

Views

495

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
Engaged ,
May 23, 2017 May 23, 2017

Copy link to clipboard

Copied

sberic  wrote

For instance, if the time specified for overwriteClip is in the middle of another clip on the Track, does the entire clip get erased and the current clip inserted at the specified location, or is the existing clip get truncated at the point specified before insertion?

Hey sberic, am I right in guessing you are not a video editor? In NLE terms, an insert operation adds new media, starting at the specified frame, and retains all existing media by moving it after the newly inserted media. An overwrite operation adds new media, starting at the specified frame, and replaces (overwrites) any existing media that previously occupied that space. So with respect to your question, the existing clip gets truncated at the point specified, as will any following clips that also intersect in whole or in part with the new media added to that track.

Hope that helps

Andy

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
Enthusiast ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

LATEST

andymees@aje wrote

Hey sberic, am I right in guessing you are not a video editor?

You are correct. I'm not a video editor by trade, no; more of a hobbyist. I first used Premiere Pro back in 2001 but it has never been my primary focus at work.

andymees@aje wrote

In NLE terms, an insert operation adds new media, starting at the specified frame, and retains all existing media by moving it after the newly inserted media. An overwrite operation adds new media, starting at the specified frame, and replaces (overwrites) any existing media that previously occupied that space. So with respect to your question, the existing clip gets truncated at the point specified, as will any following clips that also intersect in whole or in part with the new media added to that track.

Awesome. Thanks so much for the explanation! That is very clear and helpful!

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