summaryrefslogtreecommitdiff
path: root/rhimport-eu
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-06-13 17:27:28 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-06-13 17:27:28 (GMT)
commitbd47b034d73177ca3dd7088fcb34bb78721c33b8 (patch)
tree692c1e27681e5578c99f934208d003dca1347fa5 /rhimport-eu
parent06e03ea970f2111022c1982d5ef3d50e30db10c0 (diff)
added pre-import converter for EU
Diffstat (limited to 'rhimport-eu')
-rwxr-xr-xrhimport-eu10
1 files changed, 10 insertions, 0 deletions
diff --git a/rhimport-eu b/rhimport-eu
index c11f9c7..4678846 100755
--- a/rhimport-eu
+++ b/rhimport-eu
@@ -164,6 +164,16 @@ if($file eq "" || !(-e "$file")) {
exit 1;
}
+print "converting $file ... ";
+my $infile = $file;
+$file =~ s/\.mp3$/.wav/;
+system("ffmpeg", "-i", $infile, "-acodec", "pcm_s16le", $file);
+if( $! != 0) {
+ die "ffmpeg returned with error: " . $!;
+}
+print "ok\n";
+unlink $infile;
+
print "will import $file to dropbox $dropbox (cart=$to_cart)\n";
my $error_cb = sub {