mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
adding reformating to oiiotool process
- removing it from wrong ffmpeg process
This commit is contained in:
parent
069977b327
commit
cd8451e811
1 changed files with 10 additions and 12 deletions
|
|
@ -217,11 +217,17 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
|||
|
||||
def _create_thumbnail_oiio(self, src_path, dst_path):
|
||||
self.log.debug("Extracting thumbnail with OIIO: {}".format(dst_path))
|
||||
resolution_arg = self._get_resolution_arg("oiiotool", src_path)
|
||||
oiio_cmd = get_oiio_tool_args(
|
||||
"oiiotool",
|
||||
"-a", src_path,
|
||||
"-o", dst_path
|
||||
"oiiotool", path_to_subprocess_arg(src_path)
|
||||
)
|
||||
if resolution_arg:
|
||||
oiio_cmd.extend(resolution_arg)
|
||||
|
||||
oiio_cmd.extend([
|
||||
"-o", path_to_subprocess_arg(dst_path)
|
||||
])
|
||||
|
||||
self.log.debug("running: {}".format(" ".join(oiio_cmd)))
|
||||
try:
|
||||
run_subprocess(oiio_cmd, logger=self.log)
|
||||
|
|
@ -235,7 +241,7 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
|||
|
||||
def _create_thumbnail_ffmpeg(self, src_path, dst_path):
|
||||
self.log.debug("Extracting thumbnail with FFMPEG: {}".format(dst_path))
|
||||
resolution_arg = self._get_resolution_arg("ffmpeg")
|
||||
resolution_arg = self._get_resolution_arg("ffmpeg", src_path)
|
||||
ffmpeg_path_args = get_ffmpeg_tool_args("ffmpeg")
|
||||
ffmpeg_args = self.ffmpeg_args or {}
|
||||
|
||||
|
|
@ -297,14 +303,6 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
|
|||
"-vframes", "1"
|
||||
]
|
||||
|
||||
# get resolution arg
|
||||
resolution_arg = self._get_resolution_arg(
|
||||
"ffmpeg",
|
||||
video_file_path,
|
||||
)
|
||||
if resolution_arg:
|
||||
cmd_args.extend(resolution_arg)
|
||||
|
||||
# add output file path
|
||||
cmd_args.append(output_thumb_file_path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue