summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-20 18:09:05 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-20 18:09:05 +0200
commit0b9514766b199fac35af8aecaaa511018744ef11 (patch)
tree50f0ffd274c45ef239f7c5ada3c17e0b1a6f4c67
parent4fc90475438982ad42c191ccf509efea94ee83da (diff)
boo
-rwxr-xr-xdir-to-movie.pl18
1 files changed, 10 insertions, 8 deletions
diff --git a/dir-to-movie.pl b/dir-to-movie.pl
index 4ca963b..40fa853 100755
--- a/dir-to-movie.pl
+++ b/dir-to-movie.pl
@@ -27,7 +27,8 @@ if (! -e "results/$tag") {
exit(1);
}
-chdir('results/$tag');
+chdir("results/$tag");
+print `pwd`;
my $i = 0;
my $ls = `ls -1v *.png`;
@@ -37,6 +38,7 @@ chomp $pwd;
$pwd .= '/';
print $pwd . "\n";
+
mkdir('./tmp');
for my $line (@lines) {
@@ -45,13 +47,12 @@ for my $line (@lines) {
$i += 1;
}
-system("ffmpeg",
- "-i", "./tmp/frame_%05d.png",
- "-y", "-c:v", "libx264", "-vf", "fps=25", "-pix_fmt", "yuv420p",
- "-s", "1024x512",
- "../../renders/" . $tag . ".mp4"
-);
+my $ffmpeg = `ffmpeg -i ./tmp/frame_%05d.png -y -c:v libx264 -vf fps=25 -pix_fmt yuv420p -s 1024x512 ../../renders/$tag.mp4`;
+my @lines = split("\n", $ffmpeg);
+for my $line (@lines) {
+ print $line;
+}
if (defined $endpoint) {
print("upload to $endpoint\n");
system("curl",
@@ -60,7 +61,8 @@ if (defined $endpoint) {
"-F", "activity=live",
"-F", "generated=true",
"-F", "dataset=$tag",
- "-F", "file=@../../renders/$tag.mp3",
+ "-F", "datatype=video",
+ "-F", "file=@../../renders/$tag.mp4",
$endpoint
);
}