diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-15 02:07:34 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-15 02:07:34 +0200 |
| commit | e1ecfd498a9c7800e54533bce487a0e8012efbdc (patch) | |
| tree | 388ea9797df309e4b46c21b19029a23be98afe62 /test-mogrify.py | |
| parent | 13a28cc9347ba2a1a3603cbd3dd5b654f1fa7cfb (diff) | |
yeah
Diffstat (limited to 'test-mogrify.py')
| -rw-r--r-- | test-mogrify.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test-mogrify.py b/test-mogrify.py index ee8111b..9a64bfc 100644 --- a/test-mogrify.py +++ b/test-mogrify.py @@ -13,7 +13,7 @@ from scipy.misc import imresize from shutil import copyfile, rmtree import numpy as np import cv2 -import time +import datetime import subprocess from time import sleep @@ -27,7 +27,7 @@ if __name__ == '__main__': opt.no_flip = True # no flip opt.experiment = opt.start_img.split("/")[-1].split(".")[0] - render_dir = opt.results_dir + opt.name + "/exp:" + opt.experiment + "/" + render_dir = opt.results_dir + opt.name + "/" + data_opt.experiment + "/" if os.path.exists(render_dir): rmtree(render_dir) @@ -116,14 +116,12 @@ if __name__ == '__main__': os.remove(render_dir + "frame_00000.png") - t = time.time() - t /= 60 - t %= 525600 - video_fn = "{}_{}_{}_mogrify.mp4".format( - opt.name, opt.experiment, + d = datetime.now() + video_fn = "{}_{}_{}_{}_mogrify.mp4".format( + opt.name, opt.experiment, data_opt.experiment, # opt.how_many, frac_a, # blur, sigma, canny_lo, canny_hi, - int(t)) + d.strftime('%Y%m%d%H%M')) cmd = ("ffmpeg", "-i", render_dir + "ren_%05d.png", "-y", "-c:v", "libx264", "-vf", "fps=30", "-pix_fmt", "yuv420p", render_dir + video_fn) process = subprocess.Popen(cmd, stdout=subprocess.PIPE) |
