summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-04-20 14:04:33 +0200
committerJules Laplace <julescarbon@gmail.com>2018-04-20 14:04:33 +0200
commit9edb366f293e6b25eaf19e4582a3a3d53d5d45fc (patch)
tree376c15ce736af7ca2db622522e8cce1736c99103 /test.py
parentb0d1616f1be8e7a4abd608c3b06dd67c6d048772 (diff)
expand
Diffstat (limited to 'test.py')
-rw-r--r--test.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test.py b/test.py
index e2ed114..dc73fbf 100644
--- a/test.py
+++ b/test.py
@@ -9,6 +9,7 @@ from shutil import move, copyfile
from PIL import Image, ImageOps
from skimage.transform import resize
from scipy.misc import imresize
+from shutil import copyfile
import subprocess
from time import sleep
@@ -53,16 +54,16 @@ if __name__ == '__main__':
s = 256
p = 8
im = imresize(im, (s-p, s-p), interp='bicubic')
+ image_pil.save(save_path)
image_pil = Image.fromarray(im)
image_pil = ImageOps.expand(image_pil, p)
image_pil.save(save_path)
- os.rename(save_path, final_path)
+ copyfile(save_path, final_path)
webpage.save()
os.remove(render_dir + "frame_00000.png")
-
- cmd = ("/usr/bin/ffmpeg", "-i", opt.results_dir + opt.name + "/frame_%05d_fake_B.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_tmp.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()