mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
input/output args are loaded from config (only input for jpeg)
This commit is contained in:
parent
69b8bd0546
commit
b2d4897872
2 changed files with 36 additions and 14 deletions
|
|
@ -41,9 +41,23 @@ class ExtractJpegEXR(pyblish.api.InstancePlugin):
|
|||
|
||||
self.log.info("output {}".format(full_output_path))
|
||||
|
||||
subprocess_jpeg = "ffmpeg -y -gamma 2.2 -i {} {}".format(
|
||||
full_input_path, full_output_path
|
||||
)
|
||||
config_data = instance.context.data['output_repre_config']
|
||||
|
||||
proj_name = os.environ.get('AVALON_PROJECT', '__default__')
|
||||
profile = config_data.get(proj_name, config_data['__default__'])
|
||||
|
||||
jpeg_items = []
|
||||
jpeg_items.append("ffmpeg")
|
||||
# override file if already exists
|
||||
jpeg_items.append("-y")
|
||||
# use same input args like with mov
|
||||
jpeg_items.extend(profile.get('input', []))
|
||||
# input file
|
||||
jpeg_items.append("-i {}".format(full_input_path))
|
||||
# output file
|
||||
jpeg_items.append(full_output_path)
|
||||
|
||||
subprocess_jpeg = " ".join(jpeg_items)
|
||||
subprocess.Popen(subprocess_jpeg)
|
||||
|
||||
if "files" not in instance.data:
|
||||
|
|
|
|||
|
|
@ -41,18 +41,26 @@ class ExtractQuicktimeEXR(pyblish.api.InstancePlugin):
|
|||
|
||||
self.log.info("output {}".format(full_output_path))
|
||||
|
||||
input_args = [
|
||||
"-y -gamma 2.2",
|
||||
"-i {}".format(full_input_path),
|
||||
"-framerate {}".format(fps),
|
||||
"-start_number {}".format(start)
|
||||
]
|
||||
output_args = [
|
||||
"-c:v libx264",
|
||||
"-vf colormatrix=bt601:bt709",
|
||||
full_output_path
|
||||
]
|
||||
config_data = instance.context.data['output_repre_config']
|
||||
|
||||
proj_name = os.environ.get('AVALON_PROJECT', '__default__')
|
||||
profile = config_data.get(proj_name, config_data['__default__'])
|
||||
|
||||
input_args = []
|
||||
# overrides output file
|
||||
input_args.append("-y")
|
||||
# preset's input data
|
||||
input_args.extend(profile.get('input', []))
|
||||
# necessary input data
|
||||
input_args.append("-i {}".format(full_input_path))
|
||||
input_args.append("-framerate {}".format(fps))
|
||||
input_args.append("-start_number {}".format(start))
|
||||
|
||||
output_args = []
|
||||
# preset's output data
|
||||
output_args.extend(profile.get('output', []))
|
||||
# output filename
|
||||
output_args.append(full_output_path)
|
||||
mov_args = [
|
||||
"ffmpeg",
|
||||
" ".join(input_args),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue