From 66ae8a0ccd07c0541a0d992cffc8fe9d2ee3db50 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 25 Nov 2021 16:44:19 +0100 Subject: [PATCH] added function to create temp transcoding directory --- openpype/lib/transcoding.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openpype/lib/transcoding.py b/openpype/lib/transcoding.py index 80dbc765cb..8384292d4b 100644 --- a/openpype/lib/transcoding.py +++ b/openpype/lib/transcoding.py @@ -114,6 +114,18 @@ def should_decompress(file_url): return False +def get_transcode_temp_directory(): + """Creates temporary folder for transcoding. + + Its local, in case of farm it is 'local' to the farm machine. + + Should be much faster, needs to be cleaned up later. + """ + return os.path.normpath( + tempfile.mkdtemp(prefix="op_transcoding_") + ) + + def get_oiio_info_for_input(filepath, logger=None): """Call oiiotool to get information about input and return stdout.""" args = [