From 9b097d40e2d3a9830d9fa49bd587d5b363ae8be2 Mon Sep 17 00:00:00 2001 From: Jakub Trllo Date: Mon, 28 Mar 2022 12:10:36 +0200 Subject: [PATCH] create a sequence output when converting sequence --- openpype/lib/transcoding.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/openpype/lib/transcoding.py b/openpype/lib/transcoding.py index 6bab6a81604..8e79aba0ae6 100644 --- a/openpype/lib/transcoding.py +++ b/openpype/lib/transcoding.py @@ -478,8 +478,14 @@ def convert_for_ffmpeg( oiio_cmd.extend(["--eraseattrib", attr_name]) # Add last argument - path to output - base_file_name = os.path.basename(first_input_path) - output_path = os.path.join(output_dir, base_file_name) + if is_sequence: + ext = os.path.splitext(first_input_path)[1] + base_filename = "tmp.%{:0>2}d{}".format( + len(str(input_frame_end)), ext + ) + else: + base_filename = os.path.basename(first_input_path) + output_path = os.path.join(output_dir, base_filename) oiio_cmd.extend([ "-o", output_path ])