From 54205db2225a55486f6348c9dec1b5bd69d02df9 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 6 Dec 2023 15:24:19 +0100 Subject: [PATCH] Refactor transcoding.py to fix sample aspect ratio parsing The code change fixes an issue in the transcoding.py file where the sample aspect ratio was not being parsed correctly. The fix involves modifying the way the sample aspect ratio is accessed from the stream object. --- openpype/lib/transcoding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/lib/transcoding.py b/openpype/lib/transcoding.py index acf110635f..1fa3447a1f 100644 --- a/openpype/lib/transcoding.py +++ b/openpype/lib/transcoding.py @@ -1262,7 +1262,7 @@ def get_rescaled_command_arguments( stream = input_file_metadata["streams"][0] input_width = int(stream["width"]) input_height = int(stream["height"]) - stream_input_par = stream[0].get("sample_aspect_ratio") + stream_input_par = stream.get("sample_aspect_ratio") if stream_input_par: input_par = ( float(stream_input_par.split(":")[0])