From ded8f467a6ce732a8388aa8e32db73f5d543abbf Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Thu, 4 Jul 2019 09:57:01 +0100 Subject: [PATCH] Cut review media to timeline. --- pype/plugins/nukestudio/publish/extract_review.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pype/plugins/nukestudio/publish/extract_review.py b/pype/plugins/nukestudio/publish/extract_review.py index ef364d7968..0f5d1a4f33 100644 --- a/pype/plugins/nukestudio/publish/extract_review.py +++ b/pype/plugins/nukestudio/publish/extract_review.py @@ -24,11 +24,16 @@ class ExtractQuicktime(pype.api.Extractor): # Has to be yuv420p for compatibility with older players and smooth # playback. This does come with a sacrifice of more visible banding # issues. + item = instance.data["item"] + start_frame = item.mapTimelineToSource(item.timelineIn()) + end_frame = item.mapTimelineToSource(item.timelineOut()) output_options = { "pix_fmt": "yuv420p", "crf": "18", "timecode": "00:00:00:01", - "vf": "scale=trunc(iw/2)*2:trunc(ih/2)*2" + "vf": "scale=trunc(iw/2)*2:trunc(ih/2)*2", + "ss": start_frame / item.sequence().framerate().toFloat(), + "frames": int(end_frame - start_frame) + 1 } try: