diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-17 19:07:30 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-17 19:07:30 +0200 |
| commit | 0a3ef697eb37936449dc3768b4e9bac1f903cd76 (patch) | |
| tree | c562ff2ea05655059b57185d284cabb640f58a1a | |
| parent | 5a9506c9cf077c13bd52d4d75f52ce843d287823 (diff) | |
dir2mov
| -rwxr-xr-x | dir-to-movie.pl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dir-to-movie.pl b/dir-to-movie.pl index 8f0afa3..c61a429 100755 --- a/dir-to-movie.pl +++ b/dir-to-movie.pl @@ -3,16 +3,24 @@ my $i = 0; my $ls = `ls -1v *.png`; my @lines = split('\n', $ls); +my $pwd = `pwd`; +chomp $pwd; +$pwd .= '/'; system('mkdir', 'tmp'); for my $line (@lines) { chomp $line; - system('ln', '-s', $line, sprintf('./tmp/frame_%05d.png', $i)); + system('ln', '-s', $pwd . $line, sprintf('./tmp/frame_%05d.png', $i)); $i += 1; } -system("ffmpeg", "-i", "./tmp/frame_%05d.png", "-y", "-c:v", "libx264", "-vf", "fps=25", "-pix_fmt", "yuv420p", "-s", "456x256", $tag . ".mp4"); +system("ffmpeg", + "-i", "./tmp/frame_%05d.png", + "-y", "-c:v", "libx264", "-vf", "fps=25", "-pix_fmt", "yuv420p", + "-s", "1024x512", + $tag . ".mp4" +); END { system('rm', '-rf', 'tmp'); |
