Created
December 11, 2022 00:22
-
-
Save mamemomonga/bc2868ab8a2f86e42f67b6381d057899 to your computer and use it in GitHub Desktop.
KORG Gadget2 -> SP-404MK2 インポート補助ツール: このファイルと同じところに置かれた全てのWAVファイルをffmpegを通して1階層上のIMPORTフォルダに出力する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# --------------------------------------------- | |
# このファイルと同じところに置かれた全てのWAVファイルを | |
# ffmpegを通して1階層上のIMPORTフォルダに出力する | |
# --------------------------------------------- | |
use strict; | |
use warnings; | |
use Cwd 'getcwd'; | |
use feature 'say'; | |
use File::Basename; | |
use Data::Dumper; | |
use File::Spec; | |
my $ffmpeg='ffmpeg'; | |
my $basedir=dirname(File::Spec->rel2abs($0)); | |
chdir($basedir); | |
my @files=glob('*.wav'); | |
foreach my $fn(@files) { | |
my $fnd=File::Spec->catfile('../IMPORT','(E)'.$fn); | |
say "$fn -> $fnd"; | |
system($ffmpeg,'-i',$fn,'-vn',$fnd); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment