Skip to content

Commit

Permalink
fix manual svp
Browse files Browse the repository at this point in the history
  • Loading branch information
f0e committed Oct 6, 2023
1 parent e89d22f commit 05b7d7f
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/blur.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,25 @@

case _:
if settings["manual_svp"]:
pass # TODO
# todo
# super = core.svp1.Super(video, settings["super_string"])
# vectors = core.svp1.Analyse(super['clip'], super['data'], video, settings["vectors_string"])

# # insert interpolated fps
# fixed_smooth_string = settings["smooth_string"]
# if "rate:" not in fixed_smooth_string:
# fixed_smooth_string.erase(0, 1);
# fixed_smooth_string.pop_back();
# fixed_smooth_string = "'{rate:{num:%d,abs:true}," + fixed_smooth_string + "}' % interpolated_fps";
# }
# else {
# # you're handling it i guess
# fixed_smooth_string = "'" + fixed_smooth_string + "'";
# }

# video_script << fmt::format("video = core.svp2.SmoothFps(video, super['clip'], super['data'], vectors['clip'], vectors['data'], {})", fixed_smooth_string) << "\n";
super = core.svp1.Super(video, settings["super_string"])
vectors = core.svp1.Analyse(
super["clip"], super["data"], video, settings["vectors_string"]
)

# insert interpolated fps
smooth_json = json.loads(settings["smooth_string"])
if "rate" not in smooth_json:
smooth_json["rate"] = {"num": interpolated_fps, "abs": True}
smooth_str = json.dumps(smooth_json)

video = core.svp2.SmoothFps(
video,
super["clip"],
super["data"],
vectors["clip"],
vectors["data"],
smooth_str,
)
else:
video = interpolate.interpolate_svp(
video,
Expand Down

0 comments on commit 05b7d7f

Please sign in to comment.