summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-04-20 14:14:46 +0200
committerJules Laplace <julescarbon@gmail.com>2018-04-20 14:14:46 +0200
commit211a42eb14824b9e761705650c1ddbd88df068d7 (patch)
tree531c75061d31de66eb7806a891392879cbbebf0e /test.py
parentba8afac2f61e0d6b25e33c55cef6da98d9138867 (diff)
expand
Diffstat (limited to 'test.py')
-rw-r--r--test.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/test.py b/test.py
index 0274fe4..630e446 100644
--- a/test.py
+++ b/test.py
@@ -51,20 +51,21 @@ if __name__ == '__main__':
im = visuals['fake_B']
save_path = render_dir + "frame_{:05d}_tmp.png".format(i+1)
final_path = render_dir + "frame_{:05d}.png".format(i+1)
- s = 256
- p = 8
- im = imresize(im, (s-p, s-p), interp='bicubic')
- image_pil = Image.fromarray(im)
- image_pil = ImageOps.expand(image_pil, p)
- image_pil.save(save_path)
- copyfile(save_path, final_path)
+ # s = 256
+ # p = 8
+ # im = imresize(im, (s-p, s-p), interp='bicubic')
+ # image_pil = Image.fromarray(im)
+ # image_pil = ImageOps.expand(image_pil, p)
+ # image_pil.save(save_path)
+ # copyfile(save_path, final_path)
image_pil = Image.fromarray(im)
image_pil.save(save_path)
+ os.rename(save_path, final_path)
webpage.save()
os.remove(render_dir + "frame_00000.png")
- cmd = ("/usr/bin/ffmpeg", "-i", render_dir + "/frame_%05d_tmp.png", "-c:v", "libx264", "-vf", "fps=30", "-pix_fmt", "yuv420p", render_dir + opt.name + "_" + opt.experiment + ".mp4")
+ cmd = ("/usr/bin/ffmpeg", "-i", render_dir + "/frame_%05d.png", "-c:v", "libx264", "-vf", "fps=30", "-pix_fmt", "yuv420p", render_dir + opt.name + "_" + opt.experiment + ".mp4")
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
output, error = process.communicate()