summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-04-17 15:23:46 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-04-17 15:23:46 (GMT)
commitb1242a5cb143c6e7b48b94366ca1f2c474d98774 (patch)
treeb1f619a89a36243312eda6e5b7ad18700a85c65a
parentc2f3fb7af88e83b97792d4522c23cb9d664791db (diff)
convert democracy now locally before import - this fixes wrong samplerate detection
-rwxr-xr-xrhimport-dn10
1 files changed, 10 insertions, 0 deletions
diff --git a/rhimport-dn b/rhimport-dn
index 0c5fb8e..47933f4 100755
--- a/rhimport-dn
+++ b/rhimport-dn
@@ -191,6 +191,16 @@ unless($IGNORE_HEADLINE) {
print "\n";
}
+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\n";
my $error_cb = sub {