Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Trim a clip? #74

Open
juniorbraun opened this issue Oct 23, 2023 · 2 comments
Open

How to Trim a clip? #74

juniorbraun opened this issue Oct 23, 2023 · 2 comments

Comments

@juniorbraun
Copy link

juniorbraun commented Oct 23, 2023

I'm trying to trim a clip and following the example that were given on the demo page.

Every time I add the timecode (in fps) it gives an error saying that two parameters were given.

Any tips?

import pymiere
from pymiere.wrappers import timecode_from_time

seq = pymiere.objects.app.project.activeSequence
current_time = seq.getPlayerPosition()
timecode = timecode_from_time(10, seq)
pymiere.objects.qe.project.getActiveSequence().getVideoTrackAt(1).razor(timecode)

@APISeeker
Copy link

Hello, did you make it work @juniorbraun ?

@OnlyDEWx60
Copy link

import pymiere
from pymiere.wrappers import timecode_from_time

seq = pymiere.objects.app.project.activeSequence

get player head time (could be any Time object)

current_time = seq.getPlayerPosition()

Time object to timecode string

timecode = timecode_from_time(current_time, seq)

razor tool on first video track at given timecode

pymiere.objects.qe.project.getActiveSequence().getVideoTrackAt(0).razor(timecode)
------------- here is a code which can help you cut clip at player position at given track enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants