mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
setting offset and duration by seconds is based only on handles
This commit is contained in:
parent
3af13c031e
commit
c44d0ab339
1 changed files with 9 additions and 3 deletions
|
|
@ -338,10 +338,16 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
"-framerate {}".format(temp_data["fps"])
|
||||
)
|
||||
|
||||
elif temp_data["without_handles"]:
|
||||
start_sec = float(temp_data["handle_start"]) / temp_data["fps"]
|
||||
ffmpeg_input_args.append("-ss {:0.2f}".format(start_sec))
|
||||
# Change output's duration and start point if should not contain
|
||||
# handles
|
||||
if temp_data["without_handles"] and temp_data["handles_are_set"]:
|
||||
# Set start time without handles
|
||||
# - check if handle_start is bigger than 0 to avoid zero division
|
||||
if temp_data["handle_start"] > 0:
|
||||
start_sec = float(temp_data["handle_start"]) / temp_data["fps"]
|
||||
ffmpeg_input_args.append("-ss {:0.2f}".format(start_sec))
|
||||
|
||||
# Set output duration inn seconds
|
||||
duration_sec = float(output_frames_len / temp_data["fps"])
|
||||
ffmpeg_output_args.append("-t {:0.2f}".format(duration_sec))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue