mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge pull request #1620 from ynput/bugfix/thumbnail-safe-rescale-args
Extract thumbnail from source: Safe collection of rescale arguments
This commit is contained in:
commit
92d4da9efa
1 changed files with 15 additions and 6 deletions
|
|
@ -160,9 +160,14 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin):
|
|||
dst_path: str,
|
||||
) -> bool:
|
||||
self.log.debug("Outputting thumbnail with OIIO: {}".format(dst_path))
|
||||
resolution_args = self._get_resolution_args(
|
||||
"oiiotool", src_path
|
||||
)
|
||||
try:
|
||||
resolution_args = self._get_resolution_args(
|
||||
"oiiotool", src_path
|
||||
)
|
||||
except Exception:
|
||||
self.log.warning("Failed to get resolution args for OIIO.")
|
||||
return False
|
||||
|
||||
oiio_cmd = get_oiio_tool_args("oiiotool", "-a", src_path)
|
||||
if resolution_args:
|
||||
# resize must be before -o
|
||||
|
|
@ -188,9 +193,13 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin):
|
|||
src_path: str,
|
||||
dst_path: str,
|
||||
) -> bool:
|
||||
resolution_args = self._get_resolution_args(
|
||||
"ffmpeg", src_path
|
||||
)
|
||||
try:
|
||||
resolution_args = self._get_resolution_args(
|
||||
"ffmpeg", src_path
|
||||
)
|
||||
except Exception:
|
||||
self.log.warning("Failed to get resolution args for ffmpeg.")
|
||||
return False
|
||||
|
||||
max_int = str(2147483647)
|
||||
ffmpeg_cmd = get_ffmpeg_tool_args(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue