diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-01-16 02:35:05 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-01-16 02:35:05 +0100 |
| commit | 2085a45ca753ac5fbcec677298442eb5a789c1c1 (patch) | |
| tree | 0488ce161277fb70afb53ff4c2ff66e5ce60d178 | |
| parent | b61ef3c57798dd3ecc67ec1f4d207f0520a89f43 (diff) | |
| parent | e2b228dd82377c71bfb8a9d35cdc53838488aef6 (diff) | |
Merge branch 'master' of asdf.us:vsr-duf
| -rw-r--r-- | crop_frames.py | 7 | ||||
| -rw-r--r-- | merge_frames.py | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/crop_frames.py b/crop_frames.py index b1db08d..0773e86 100644 --- a/crop_frames.py +++ b/crop_frames.py @@ -25,10 +25,11 @@ def crop_dir(): img = Image.open(files[0]) width, old_height = img.size - if ratio == (width / height): - old_height = height + if args.ratio == (width / old_height): + height = old_height + top_offset = 0 else: - height = round(width / ratio) + height = round(width / args.ratio) top_offset = round((old_height - height) / 2) print("{}x{} {}".format(width, height, step)) diff --git a/merge_frames.py b/merge_frames.py index 7dd7f25..5d42950 100644 --- a/merge_frames.py +++ b/merge_frames.py @@ -32,7 +32,7 @@ def make_movie(merge_dir, out_fn): '-crf', '19', '-vf', 'fps=25', '-pix_fmt', 'yuv420p', - os.path.join(opt.render_dir, out_fn + '.mp4') + os.path.join(args.render_dir, out_fn + '.mp4') ]) def merge_files(file, crop_dir_list, ww, hh, overlap, merge_dir): @@ -87,7 +87,7 @@ def merge_dir(): pool.starmap(merge_files, dataset, chunksize) if args.mov: - make_movie(merge_dir, opt.out_fn) + make_movie(merge_dir, args.out_fn) if __name__ == "__main__": merge_dir() |
