pymiere
pymiere copied to clipboard
How to Trim a clip?
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)
Hello, did you make it work @juniorbraun ?
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!