diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-20 15:05:53 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-20 15:05:53 +0200 |
| commit | fce8a69e04876379794d91e7cdc0d74ab8a36c80 (patch) | |
| tree | 574f5c2de9c5a09df1e08a303d3598458c58246e | |
| parent | 2c14047ff0e8143c21d9ebc2a598168ae9f6b6f2 (diff) | |
live path stuff and dir 2movie
| -rwxr-xr-x | dir-to-movie.pl | 8 | ||||
| -rw-r--r-- | live.py | 6 | ||||
| -rw-r--r-- | options/dataset_options.py | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/dir-to-movie.pl b/dir-to-movie.pl index 7bc48c5..7e74eec 100755 --- a/dir-to-movie.pl +++ b/dir-to-movie.pl @@ -3,6 +3,13 @@ my $tag = $ARGV[0] or "pix2pixhd_" . time; $tag =~ s/\....$//; +if (! -e "results/$tag") { + print "usage: $0 [tag]\n"; + exit(1); +} + +chdir('results/$tag'); + my $i = 0; my $ls = `ls -1v *.png`; my @lines = split('\n', $ls); @@ -28,4 +35,5 @@ system("ffmpeg", END { system('rm', '-rf', 'tmp'); + chdir('../..'); } @@ -139,7 +139,13 @@ def process_live_input(opt, data_opt, rpc_client): rpc_client.send_status('processing', False) if data_opt.tag != data_opt.final_tag and len(data_opt.final_tag) > 0: tag = data_opt.final_tag.lower().replace(' ', '_').replace('__', '_') + print("final result: {}".format(tag)) os.rename(opt.render_dir, opt.results_dir + "/" + tag + "/") + sleep(0.1) + else: + print("final result: {}".format(data_opt.tag)) + + print("done") if __name__ == '__main__': listener = Listener(opt, data_opt, data_opt_parser, process_live_input) diff --git a/options/dataset_options.py b/options/dataset_options.py index 57df872..bffd60c 100644 --- a/options/dataset_options.py +++ b/options/dataset_options.py @@ -116,7 +116,7 @@ class DatasetOptions(BaseOptions): self.parser.add_argument( '--frame-delay', type=float, - default=1.0, + default=0.0, help='delay per render, in seconds. inverse of frame rate' ) |
