mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fix(nuke): burnin were converting better codec to h264
This commit is contained in:
parent
26dec21d54
commit
d9b64f760a
3 changed files with 15 additions and 4 deletions
|
|
@ -55,6 +55,7 @@ class ExtractBurnin(pype.api.Extractor):
|
|||
|
||||
burnin_data = {
|
||||
"input": full_movie_path.replace("\\", "/"),
|
||||
"codec": repre.data.get("codec", []),
|
||||
"output": full_burnin_path.replace("\\", "/"),
|
||||
"burnin_data": prep_data
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
)
|
||||
|
||||
output_args = []
|
||||
output_args.extend(profile.get('codec', []))
|
||||
# preset's output data
|
||||
output_args.extend(profile.get('output', []))
|
||||
|
||||
|
|
@ -183,7 +184,8 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
'ext': ext,
|
||||
'files': repr_file,
|
||||
"tags": new_tags,
|
||||
"outputName": name
|
||||
"outputName": name,
|
||||
"codec": profile.get('codec', [])
|
||||
})
|
||||
if repre_new.get('preview'):
|
||||
repre_new.pop("preview")
|
||||
|
|
|
|||
|
|
@ -213,13 +213,15 @@ def example(input_path, output_path):
|
|||
burnin.render(output_path, overwrite=True)
|
||||
|
||||
|
||||
def burnins_from_data(input_path, output_path, data, overwrite=True):
|
||||
def burnins_from_data(input_path, codec_data, output_path, data, overwrite=True):
|
||||
'''
|
||||
This method adds burnins to video/image file based on presets setting.
|
||||
Extension of output MUST be same as input. (mov -> mov, avi -> avi,...)
|
||||
|
||||
:param input_path: full path to input file where burnins should be add
|
||||
:type input_path: str
|
||||
:param codec_data: all codec related arguments in list
|
||||
:param codec_data: list
|
||||
:param output_path: full path to output file where output will be rendered
|
||||
:type output_path: str
|
||||
:param data: data required for burnin settings (more info below)
|
||||
|
|
@ -339,11 +341,17 @@ def burnins_from_data(input_path, output_path, data, overwrite=True):
|
|||
)
|
||||
return
|
||||
|
||||
burnin.render(output_path, overwrite=overwrite)
|
||||
codec_args = " ".join(codec_data)
|
||||
burnin.render(output_path, args=codec_args, overwrite=overwrite)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
import json
|
||||
data = json.loads(sys.argv[-1])
|
||||
burnins_from_data(data['input'], data['output'], data['burnin_data'])
|
||||
burnins_from_data(
|
||||
data['input'],
|
||||
data['codec'],
|
||||
data['output'],
|
||||
data['burnin_data']
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue