Beenden
  • Globale Community
    • Sprache:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티

How to get source clip times?

Entdecker ,
Dec 03, 2017 Dec 03, 2017

How to get source clip times, for sequence markers or player position or clip start and end points?

If I make a sub sequence and change start time, I lose original sequence time values.

so I need original clip times. Is there a way to get this?

THEMEN
SDK
3.3K
Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines

correct answers 1 richtige Antwort

Engagiert , Dec 08, 2017 Dec 08, 2017

Here's some proof of concept code. Please bear in mind though the QE DOM is not officially supported. This assumes Your CTI is placed somewhere on the first clip which is placed on the first video track of your timeline. The caveat here is this currently won't work with frame based file sequences.

var CTI_ticks = app.project.activeSequence.getPlayerPosition().ticks;

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

if ((parseInt(clip.start.ticks) <= parseInt(CTI_ticks)) && parseInt(CTI

...
Übersetzen
Engagiert ,
Dec 03, 2017 Dec 03, 2017

Let me rephrase to make sure this is understood correctly:

You have a sequence A containing some clips, which you duplicate (or create a nested sequence from) to sequence B, and you then change the starting time(code) of sequence B.

Now you want to iterate through sequence B, but you need to have the in and out values of the respective clips in sequence A, is this correct?

In that case, I would tend to think if sequence B is a "clip" in sequence A, and you know the in-point of sequence B (in sequence A), it's pretty straightforward, isn't it?

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Entdecker ,
Dec 03, 2017 Dec 03, 2017

to simplify my request.

How  do you get a clip time in source monitor ,when you place a marker in a sequence timeline ?

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Engagiert ,
Dec 03, 2017 Dec 03, 2017

Thanks for clarifying. So basically you want to perform a "match frame" operation.

Well, PrPro gives you the start time for a clip on a track, and when you subtract this from the current playhead position in the timeline, and add the result to the clip's inPoint, you're pretty much there, aren't you?

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Entdecker ,
Dec 04, 2017 Dec 04, 2017

Exactly. I'm trying to find "Match Frame" Time.

But I tried above method, but its not giving me time from source clip except 0. May be i'm not doing it right.

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Entdecker ,
Dec 05, 2017 Dec 05, 2017

Anyone know how to get CLIP TIME (Seconds, Ticks or TimeCode) from at corresponding Match Frame Position of a Player Position in timeline sequence ?

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Engagiert ,
Dec 08, 2017 Dec 08, 2017

Here's some proof of concept code. Please bear in mind though the QE DOM is not officially supported. This assumes Your CTI is placed somewhere on the first clip which is placed on the first video track of your timeline. The caveat here is this currently won't work with frame based file sequences.

var CTI_ticks = app.project.activeSequence.getPlayerPosition().ticks;

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

if ((parseInt(clip.start.ticks) <= parseInt(CTI_ticks)) && parseInt(CTI_ticks) < parseInt(clip.end.ticks)) {

    var offset = parseInt(CTI_ticks) - parseInt(clip.start.ticks); // ticks property is a string thus needs conversion

    var frame = parseInt(clip.inPoint.ticks)+offset;

    var ftime = frame/254016000000;

    app.enableQE();

    qe.source.openFilePath(clip.projectItem.getMediaPath());

    if (ExternalObject.AdobeXMPScript === undefined) {

        ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');

    }

    if (ExternalObject.AdobeXMPScript !== undefined) {

        var info = new XMPMeta(clip.projectItem.getProjectMetadata());

        var theNS = "http://ns.adobe.com/premierePrivateProjectMetaData/1.0/";

        var timebase = info.getProperty(theNS,"Column.Intrinsic.MediaTimebase");

        timebaseF = parseFloat (timebase.value.replace (" fps","").replace(",",".")); // should a comma be used instead of a decimal point

       

        var frames = timebaseF * (ftime-Math.floor(ftime));

        var timeFormat = ""+Math.floor(ftime)+"."+frames;

        qe.source.player.startScrubbing();

        qe.source.player.scrubTo(timeFormat);  // will take either TC or seconds.frames, not seconds.milliseconds!

        qe.source.player.endScrubbing();

        // or use qe.source.player.setInPoint(timeFormat) // will take either TC or seconds.frames, not seconds.milliseconds!

    }

}

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Engagiert ,
Dec 13, 2017 Dec 13, 2017

Hi maximus1105​,

have you tried my proposed solution? Follow-up is always appreciated...

Best,

e.d.

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Entdecker ,
Dec 13, 2017 Dec 13, 2017
AKTUELL

e.d,

I'm sorry not to respond immediately.

I simply opened a sequence and tried to run the code as-is, from ExtendScript Toolkit ,

Premiere Pro stopped responding and I had to Shut down. And I couldn't open the sequence again. I had to get a copy of sequence to restore it.

I'm sure I might have done something wrong.

May be I have to include additional libraries. I'm not sure.

But thanks for your solution. I'll try again.

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines