pymiere icon indicating copy to clipboard operation
pymiere copied to clipboard

How to Trim a clip?

Open juniorbraun opened this issue 1 year ago • 2 comments

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)

juniorbraun avatar Oct 23 '23 15:10 juniorbraun

Hello, did you make it work @juniorbraun ?

APISeeker avatar Jan 29 '24 07:01 APISeeker

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!

OnlyDEWx60 avatar Mar 13 '24 08:03 OnlyDEWx60