From 00f168b250acf8f66f26fba806bcd4e872e92b8f Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 29 Jul 2024 16:43:31 +0200 Subject: [PATCH] fixing the situation where `time/frame` expression is used. --- client/ayon_core/lib/transcoding.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/ayon_core/lib/transcoding.py b/client/ayon_core/lib/transcoding.py index 9450bfb9b7..905a2f03b1 100644 --- a/client/ayon_core/lib/transcoding.py +++ b/client/ayon_core/lib/transcoding.py @@ -935,6 +935,11 @@ def get_image_info_metadata( if rate_info is None: rate_info = metadata_stream.get("framespersecond") + # calculate framerate from string expression + if "/" in str(rate_info): + time, frame = str(rate_info).split("/") + rate_info = float(time) / float(frame) + try: metadata_stream["framerate"] = float(str(rate_info)) except Exception as e: