mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
thumbnails
This commit is contained in:
parent
fa2a9a615f
commit
5ad1f8ba7e
1 changed files with 4 additions and 10 deletions
|
|
@ -71,18 +71,12 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
|||
if not is_oiio_supported():
|
||||
thumbnail_created = self.create_thumbnail_ffmpeg(full_input_path, full_output_path) # noqa
|
||||
else:
|
||||
# Check if the file can be read by OIIO
|
||||
oiio_tool_path = get_oiio_tools_path()
|
||||
args = [
|
||||
oiio_tool_path, "--info", "-i", full_output_path
|
||||
]
|
||||
returncode = execute(args, silent=True)
|
||||
# If the input can read by OIIO then use OIIO method for
|
||||
# conversion otherwise use ffmpeg
|
||||
if returncode == 0:
|
||||
self.log.info("Input can be read by OIIO, converting with oiiotool now.") # noqa
|
||||
thumbnail_created = self.create_thumbnail_oiio(full_input_path, full_output_path) # noqa
|
||||
else:
|
||||
self.log.info("Trying to convert with OIIO") # noqa
|
||||
thumbnail_created = self.create_thumbnail_oiio(full_input_path, full_output_path) # noqa
|
||||
|
||||
if not thumbnail_created:
|
||||
self.log.info("Converting with FFMPEG because input can't be read by OIIO.") # noqa
|
||||
thumbnail_created = self.create_thumbnail_ffmpeg(full_input_path, full_output_path) # noqa
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue