mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
use new functions in code
This commit is contained in:
parent
6a5d43a479
commit
6efb1b0a74
8 changed files with 19 additions and 37 deletions
|
|
@ -66,9 +66,10 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin):
|
|||
proj_name = os.environ.get('AVALON_PROJECT', '__default__')
|
||||
profile = config_data.get(proj_name, config_data['__default__'])
|
||||
|
||||
ffmpeg_path = pype.lib.get_ffmpeg_tool_path("ffmpeg")
|
||||
|
||||
jpeg_items = []
|
||||
jpeg_items.append(
|
||||
os.path.join(pype.lib.get_path_to_ffmpeg(), "ffmpeg"))
|
||||
jpeg_items.append(ffmpeg_path)
|
||||
# override file if already exists
|
||||
jpeg_items.append("-y")
|
||||
# use same input args like with mov
|
||||
|
|
|
|||
|
|
@ -311,10 +311,11 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
"creating dir: {}".format(stg_dir))
|
||||
os.mkdir(stg_dir)
|
||||
|
||||
ffmpeg_path = (
|
||||
pype.lib.get_ffmpeg_tool_path("ffmpeg")
|
||||
)
|
||||
mov_args = [
|
||||
os.path.join(
|
||||
pype.lib.get_path_to_ffmpeg(), "ffmpeg"
|
||||
),
|
||||
ffmpeg_path,
|
||||
" ".join(input_args),
|
||||
" ".join(output_args)
|
||||
]
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class ExtractReviewSlate(pype.api.Extractor):
|
|||
|
||||
suffix = "_slate"
|
||||
slate_path = inst_data.get("slateFrame")
|
||||
ffmpeg_path = os.path.join(pype.lib.get_path_to_ffmpeg(), "ffmpeg")
|
||||
ffmpeg_path = pype.lib.get_ffmpeg_tool_path("ffmpeg")
|
||||
|
||||
to_width = 1920
|
||||
to_height = 1080
|
||||
|
|
|
|||
|
|
@ -28,11 +28,8 @@ class ValidateFfmpegInstallef(pyblish.api.Validator):
|
|||
return True
|
||||
|
||||
def process(self, instance):
|
||||
self.log.info("ffmpeg path: `{}`".format(
|
||||
pype.lib.get_path_to_ffmpeg()
|
||||
))
|
||||
if self.is_tool(
|
||||
os.path.join(
|
||||
pype.lib.get_path_to_ffmpeg(), "ffmpeg")) is False:
|
||||
ffmpeg_path = pype.lib.get_ffmpeg_tool_path("ffmpeg")
|
||||
self.log.info("ffmpeg path: `{}`".format(ffmpeg_path))
|
||||
if self.is_tool(ffmpeg_path) is False:
|
||||
self.log.error("ffmpeg not found in PATH")
|
||||
raise RuntimeError('ffmpeg not installed.')
|
||||
|
|
|
|||
|
|
@ -149,12 +149,7 @@ class ExtractReviewSP(pyblish.api.InstancePlugin):
|
|||
# output filename
|
||||
output_args.append(full_output_path)
|
||||
|
||||
ffmpeg_path = pype.lib.get_path_to_ffmpeg()
|
||||
if ffmpeg_path:
|
||||
ffmpeg_path += "/ffmpeg"
|
||||
else:
|
||||
ffmpeg_path = "ffmpeg"
|
||||
|
||||
ffmpeg_path = pype.lib.get_ffmpeg_tool_path("ffmpeg")
|
||||
mov_args = [
|
||||
ffmpeg_path,
|
||||
" ".join(input_args),
|
||||
|
|
|
|||
|
|
@ -74,11 +74,7 @@ class ExtractThumbnailSP(pyblish.api.InstancePlugin):
|
|||
config_data.get("__default__", {})
|
||||
)
|
||||
|
||||
ffmpeg_path = pype.lib.get_path_to_ffmpeg()
|
||||
if ffmpeg_path:
|
||||
ffmpeg_path += "/ffmpeg"
|
||||
else:
|
||||
ffmpeg_path = "ffmpeg"
|
||||
ffmpeg_path = pype.lib.get_ffmpeg_tool_path("ffmpeg")
|
||||
|
||||
jpeg_items = []
|
||||
jpeg_items.append(ffmpeg_path)
|
||||
|
|
|
|||
|
|
@ -12,20 +12,17 @@ import pype.lib
|
|||
log = pype.Logger().get_logger("BurninWrapper", "burninwrap")
|
||||
|
||||
|
||||
ffmpeg_path = pype.lib.get_path_to_ffmpeg()
|
||||
if ffmpeg_path and os.path.exists(ffmpeg_path):
|
||||
# add separator "/" or "\" to be prepared for next part
|
||||
ffmpeg_path += os.path.sep
|
||||
else:
|
||||
ffmpeg_path = ""
|
||||
ffmpeg_path = pype.lib.get_ffmpeg_tool_path("ffmpeg")
|
||||
ffprobe_path = pype.lib.get_ffmpeg_tool_path("ffprobe")
|
||||
|
||||
|
||||
FFMPEG = (
|
||||
'{} -loglevel panic -i %(input)s %(filters)s %(args)s%(output)s'
|
||||
).format(os.path.normpath(ffmpeg_path + "ffmpeg"))
|
||||
).format(ffmpeg_path)
|
||||
|
||||
FFPROBE = (
|
||||
'{} -v quiet -print_format json -show_format -show_streams %(source)s'
|
||||
).format(os.path.normpath(ffmpeg_path + "ffprobe"))
|
||||
).format(ffprobe_path)
|
||||
|
||||
|
||||
def _streams(source):
|
||||
|
|
|
|||
|
|
@ -225,12 +225,7 @@ class DropDataFrame(QtWidgets.QFrame):
|
|||
self._process_data(data)
|
||||
|
||||
def load_data_with_probe(self, filepath):
|
||||
ffprobe_path = pype.lib.get_path_to_ffmpeg()
|
||||
if ffprobe_path:
|
||||
ffprobe_path += '/ffprobe'
|
||||
else:
|
||||
ffprobe_path = 'ffprobe'
|
||||
|
||||
ffprobe_path = pype.lib.get_ffmpeg_tool_path("ffprobe")
|
||||
args = [
|
||||
ffprobe_path,
|
||||
'-v', 'quiet',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue