mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 22:02:15 +01:00
Merge branch 'OP-3172_More-control-over-thumbnail-processing' of https://github.com/pypeclub/OpenPype into OP-3172_More-control-over-thumbnail-processing
This commit is contained in:
commit
2ef659f95d
1 changed files with 20 additions and 4 deletions
|
|
@ -132,7 +132,15 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
|||
]
|
||||
subprocess_exr = " ".join(oiio_cmd)
|
||||
self.log.info(f"running: {subprocess_exr}")
|
||||
run_subprocess(oiio_cmd, logger=self.log)
|
||||
try:
|
||||
run_subprocess(oiio_cmd, logger=self.log)
|
||||
return True
|
||||
except Exception:
|
||||
self.log.warning(
|
||||
"Failed to create thubmnail using oiiotool",
|
||||
exc_info=True
|
||||
)
|
||||
return False
|
||||
|
||||
def create_thumbnail_ffmpeg(self, src_path, dst_path):
|
||||
self.log.info("outputting {}".format(dst_path))
|
||||
|
|
@ -161,6 +169,14 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
|||
# output file
|
||||
jpeg_items.append(path_to_subprocess_arg(dst_path))
|
||||
subprocess_command = " ".join(jpeg_items)
|
||||
run_subprocess(
|
||||
subprocess_command, shell=True, logger=self.log
|
||||
)
|
||||
try:
|
||||
run_subprocess(
|
||||
subprocess_command, shell=True, logger=self.log
|
||||
)
|
||||
return True
|
||||
except Exception:
|
||||
self.log.warning(
|
||||
"Failed to create thubmnail using ffmpeg",
|
||||
exc_info=True
|
||||
)
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue