about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-11-04 16:05:22 +0530
committerAndinus <andinus@nand.sh>2021-11-04 16:05:22 +0530
commit1ef8b03bad506a5f5872341c9d90cd7c96e3ea26 (patch)
treed541e5342b37d83520292d59dafc6560ec0b1fd5
parent9fededa37f0788e20ecb0c94dd4952ceed3b83a7 (diff)
downloadfornax-1ef8b03bad506a5f5872341c9d90cd7c96e3ea26.tar.gz
Wait 4s on last frame, use await
-rw-r--r--lib/Fornax/CLI.rakumod3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Fornax/CLI.rakumod b/lib/Fornax/CLI.rakumod
index 0bd3d54..38ed03d 100644
--- a/lib/Fornax/CLI.rakumod
+++ b/lib/Fornax/CLI.rakumod
@@ -81,7 +81,7 @@ multi sub MAIN(
         # Wait until all scheduled jobs are finished, then empty the
         # array and continue.
         if @p.elems == $batch {
-            while @p.grep(*.status).elems !== $batch {};
+            await @p;
             @p = [];
         }
 
@@ -155,6 +155,7 @@ multi sub MAIN(
 
         my Str $log-level = $verbose ?? "info" !! "error";
         run «ffmpeg -loglevel "$log-level" -r "$frame-rate" -i "$output/\%08d.png"
+                    -vf 'tpad=stop_mode=clone:stop_duration=4'
                     -vcodec libx264 -crf 28 -pix_fmt yuv420p "$output/solution.mp4"»;
     }
     put "[fornax] Output: '$output'";