mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Fix rendering explicit frames
This seems only safe way
This commit is contained in:
parent
5410d69ad2
commit
4a38e1175f
1 changed files with 9 additions and 9 deletions
|
|
@ -526,12 +526,12 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
||||||
run_subprocess(subprcs_cmd, shell=True, logger=self.log)
|
run_subprocess(subprcs_cmd, shell=True, logger=self.log)
|
||||||
|
|
||||||
# delete files added to fill gaps
|
# delete files added to fill gaps
|
||||||
if new_frame_files:
|
# if new_frame_files:
|
||||||
for filepath in new_frame_files.values():
|
# for filepath in new_frame_files.values():
|
||||||
os.unlink(filepath)
|
# # os.unlink(filepath)
|
||||||
|
#
|
||||||
for filepath in temp_data["paths_to_remove"]:
|
# for filepath in temp_data["paths_to_remove"]:
|
||||||
os.unlink(filepath)
|
# os.unlink(filepath)
|
||||||
|
|
||||||
new_repre.update({
|
new_repre.update({
|
||||||
"fps": temp_data["fps"],
|
"fps": temp_data["fps"],
|
||||||
|
|
@ -818,9 +818,10 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
||||||
staging_dir = os.path.dirname(temp_data["full_input_path"])
|
staging_dir = os.path.dirname(temp_data["full_input_path"])
|
||||||
explicit_frames_path = os.path.join(
|
explicit_frames_path = os.path.join(
|
||||||
staging_dir, "explicit_frames.txt")
|
staging_dir, "explicit_frames.txt")
|
||||||
|
frame_duration = 1 / temp_data["fps"]
|
||||||
with open(explicit_frames_path, "w") as fp:
|
with open(explicit_frames_path, "w") as fp:
|
||||||
lines = [
|
lines = [
|
||||||
f"file {path}"
|
f"file '{path}'{os.linesep}duration {frame_duration}"
|
||||||
for path in temp_data["explicit_input_paths"]
|
for path in temp_data["explicit_input_paths"]
|
||||||
]
|
]
|
||||||
fp.write("\n".join(lines))
|
fp.write("\n".join(lines))
|
||||||
|
|
@ -830,9 +831,8 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
||||||
ffmpeg_input_args.extend([
|
ffmpeg_input_args.extend([
|
||||||
"-f", "concat",
|
"-f", "concat",
|
||||||
"-safe", "0",
|
"-safe", "0",
|
||||||
"-fflags", "+genpts+igndts",
|
|
||||||
"-i", path_to_subprocess_arg(explicit_frames_path),
|
"-i", path_to_subprocess_arg(explicit_frames_path),
|
||||||
"-r", "25"
|
"-r", str(temp_data["fps"])
|
||||||
])
|
])
|
||||||
|
|
||||||
# Add audio arguments if there are any. Skipped when output are images.
|
# Add audio arguments if there are any. Skipped when output are images.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue