summaryrefslogtreecommitdiff
path: root/test-mogrify.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-15 02:42:33 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-15 02:42:33 +0200
commit743c7ee58013ab6095ee545e723fa06704350f14 (patch)
tree2be98257cbe16ba67478441e5b8a48c3ea6c5855 /test-mogrify.py
parent86a8bc3914d455a16027d35e7a056bcc5ce189c1 (diff)
test
Diffstat (limited to 'test-mogrify.py')
-rw-r--r--test-mogrify.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/test-mogrify.py b/test-mogrify.py
index 7c3c84a..98a4e15 100644
--- a/test-mogrify.py
+++ b/test-mogrify.py
@@ -21,11 +21,21 @@ from time import sleep
if __name__ == '__main__':
opt = TestOptions().parse()
data_opt = DatasetOptions().parse(opt.unknown)
+
+ d = datetime.now()
+ tag = "{}_{}_{}_{}".format(
+ opt.name, opt.experiment, data_opt.experiment,
+ # opt.how_many, frac_a,
+ # blur, sigma, canny_lo, canny_hi,
+ d.strftime('%Y%m%d%H%M'))
+
+ opt.tag = tag
+
opt.nThreads = 1 # test code only supports nThreads = 1
opt.batchSize = 1 # test code only supports batchSize = 1
opt.serial_batches = True # no shuffle
opt.no_flip = True # no flip
- opt.experiment = opt.start_img.split("/")[-1].split(".")[0]
+ opt.experiment = data_opt.experiment # opt.start_img.split("/")[-1].split(".")[0]
render_dir = opt.results_dir + opt.name + "/" + data_opt.experiment + "/"
@@ -120,12 +130,7 @@ if __name__ == '__main__':
os.remove(render_dir + "frame_00000.png")
- 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,
- d.strftime('%Y%m%d%H%M'))
+ video_fn = tag + "_mogrify.mp4"
cmd = ("ffmpeg", "-i", render_dir + "ren_%05d.png", "-y", "-c:v", "libx264", "-vf", "fps=30", "-pix_fmt", "yuv420p", "-s", "455x256", render_dir + video_fn)
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)