"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pacpl.in" between
pacpl-6.1.0.tar.bz2 and pacpl-6.1.2.tar.bz2

About: Perl Audio Converter is a tool for converting multiple audio types from one format to another.

pacpl.in  (pacpl-6.1.0.tar.bz2):pacpl.in  (pacpl-6.1.2.tar.bz2)
#!/usr/bin/perl #!/usr/bin/perl
# #
# Perl Audio Converter # Perl Audio Converter
# #
# Copyright (C) 2005-2018 Philip Lyons (vorzox@gmail.com) # Copyright (C) 2005-2019 Philip Lyons (vorzox@gmail.com)
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or # the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
skipping to change at line 27 skipping to change at line 27
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
use strict; use strict;
use warnings; use warnings;
use Getopt::Long; use Getopt::Long;
use File::Basename; use File::Basename;
use File::Find; use File::Find;
use File::Spec::Functions qw(rel2abs); use File::Spec::Functions qw(rel2abs);
use Parallel::ForkManager; use Parallel::ForkManager;
use String::ShellQuote;
use feature qw(switch say); use feature qw(switch say);
no if $] >= 5.018, warnings => "experimental::smartmatch"; no if $] >= 5.018, warnings => "experimental::smartmatch";
# Tagging modules # Tagging modules
use MP3::Tag; use MP3::Tag;
use Audio::FLAC::Header; use Audio::FLAC::Header;
use Audio::Scan; use Audio::Scan;
skipping to change at line 84 skipping to change at line 85
$artist, $artist,
$album, $album,
$comment, $comment,
$year, $year,
$genre, $genre,
$taginfo, $taginfo,
); );
# name and version # name and version
my $name = "Perl Audio Converter"; my $name = "Perl Audio Converter";
my $version = "6.1.0"; my $version = "6.1.2";
# If these options are toggled, messages/errors will be displayed # If these options are toggled, messages/errors will be displayed
# via kdialog or zenity/notify-send (depending on environment) # via kdialog or zenity/notify-send (depending on environment)
my ($gui, $kde, $gnome); my ($gui, $kde, $gnome);
# Debugging (for developer use only) # Debugging (for developer use only)
my $debug = 0; my $debug = 0;
# default configuration. # default configuration.
my %config = ( my %config = (
skipping to change at line 813 skipping to change at line 814
}, },
}, },
TAGS => { TAGS => {
READ => 0, READ => 0,
WRITE => 0, WRITE => 0,
MODULE => undef, MODULE => undef,
}, },
}, },
dsf => {
DEFAULT_ENCODER => undef,
DEFAULT_DECODER => "sacd",
DECODER => {
sacd => {
NAME => "sacd",
DSTR => sub { "-i %i" },
},
},
TAGS => {
READ => 1,
WRITE => 0,
MODULE => "Audio::Scan",
},
},
dts => { dts => {
DEFAULT_ENCODER => 'ffmpeg', DEFAULT_ENCODER => 'ffmpeg',
DEFAULT_DECODER => 'ffmpeg', DEFAULT_DECODER => 'ffmpeg',
ENCODER => { ENCODER => {
ffmpeg => { ffmpeg => {
NAME => 'ffmpeg', NAME => 'ffmpeg',
ESTR => sub { ESTR => sub {
$opts = '' if $defopts == 1; $opts = '' if $defopts == 1;
skipping to change at line 2407 skipping to change at line 2428
get_visual_opts($to,$outdir) if $gui and not defined($first_r un); get_visual_opts($to,$outdir) if $gui and not defined($first_r un);
$first_run = 1; $first_run = 1;
perror("multi_out","") if (defined($out_name) and $#fil e gt 0 or defined($out_name) and @dir); perror("multi_out","") if (defined($out_name) and $#fil e gt 0 or defined($out_name) and @dir);
perror("no_outdir","") if (not -e $outdir and not -d $o utdir); perror("no_outdir","") if (not -e $outdir and not -d $o utdir);
$outfile = "$file" if not $out_name; $outfile = "$file" if not $out_name;
if ($keep and $if eq $to) { if ($keep and $if eq $to) {
system("cp -v \"$dir/$file.$ext\" \"$outdir/$outfile.$ext my $source_q = shell_quote "$dir/$file.$ext";
\"") if $outdir ne $dir and not -e "$outdir/$outfile.$ext"; my $dest_q = shell_quote "$outdir/$outfile.$ext";
system("cp -v $source_q $dest_q") if $outdir ne $dir and
not -e "$outdir/$outfile.$ext";
next if $outdir eq $dir; next if $outdir eq $dir;
} }
else { else {
$files{"FILE$number"}{FILE} = "$dir/$file"; $files{"FILE$number"}{FILE} = "$dir/$file";
$files{"FILE$number"}{OUTF} = "$outdir/$outfile"; $files{"FILE$number"}{OUTF} = "$outdir/$outfile";
$files{"FILE$number"}{EXT} = "$ext"; $files{"FILE$number"}{EXT} = "$ext";
$files{"FILE$number"}{CODEC} = "$codec"; $files{"FILE$number"}{CODEC} = "$codec";
$files{"FILE$number"}{NAME} = "$file"; $files{"FILE$number"}{NAME} = "$file";
$files{"FILE$number"}{OUTD} = "$outfile"; $files{"FILE$number"}{OUTD} = "$outfile";
skipping to change at line 2542 skipping to change at line 2565
# convert input to destination format # convert input to destination format
sub convert { sub convert {
my ($inf, $outf, $infmt, $iname, $oname, $codec, $dec) = @_; my ($inf, $outf, $infmt, $iname, $oname, $codec, $dec) = @_;
my $if = $infmt; my $if = $infmt;
$if =~ tr/A-Z/a-z/; $if =~ tr/A-Z/a-z/;
clear_tag_hash() if not $rip; clear_tag_hash() if not $rip;
# catch ^C. will have to be pressed repeatedly to exit the process.
$SIG{INT} = sub {
unlink("$outf.$$.wav");
kill 9, $$;
};
# check to see if encoder/decoder exists. if not, see if we have one # check to see if encoder/decoder exists. if not, see if we have one
# that supports the desired input/output formats. # that supports the desired input/output formats.
$decoder = $dec; $decoder = $dec;
check_encoder(); check_encoder();
check_decoder($codec); check_decoder($codec);
my $wavf = "$outf.$$.wav";
my $wavf_q = shell_quote $wavf;
my $decode_string = $run{$codec}{DECODER}{$decoder}{DSTR}->(); my $decode_string = $run{$codec}{DECODER}{$decoder}{DSTR}->();
$decode_string =~ s/%i/\"$inf.$infmt\"/; my $inf_q = shell_quote "$inf.$infmt";
$decode_string =~ s/%o/\"$outf.$$.wav\"/; $decode_string =~ s/%i/$inf_q/;
$decode_string =~ s/(\$|\\)/\\$1/g; if ( $decode_string =~ m/%o/ ) {
$decode_string =~ s/%o/$wavf_q/;
} else {
$wavf = "$outf.wav";
$wavf_q = shell_quote $wavf;
}
pnotice("debug","\n$run{$codec}{DECODER}{$decoder}{NAME} $decode_string", 2) if $dryrun; pnotice("debug","\n$run{$codec}{DECODER}{$decoder}{NAME} $decode_string", 2) if $dryrun;
# catch ^C. will have to be pressed repeatedly to exit the process.
$SIG{INT} = sub {
unlink("$wavf");
kill 9, $$;
};
# decode input file to temporary wav # decode input file to temporary wav
system("$run{$codec}{DECODER}{$decoder}{NAME} $decode_string $silent") if not $dryrun; system("$run{$codec}{DECODER}{$decoder}{NAME} $decode_string $silent") if not $dryrun;
# remove temporary wav file and die if decode fails # remove temporary wav file and die if decode fails
if ($? > 0) { if ($? > 0) {
unlink("$outf.$$.wav") if -e "$outf.$$.wav"; unlink("$wavf") if -e "$wavf";
say ""; say "";
$banner = 0; $banner = 0;
pnotice("decode_failed","$inf.$infmt: try with --verbose",1); pnotice("decode_failed","$inf.$infmt: try with --verbose",1);
return 1; return 1;
} }
# normalize wav file before encoding to output format # normalize wav file before encoding to output format
perror("no_app","normalize") if $normalize and not `which normalize 2>/de v/null`; perror("no_app","normalize") if $normalize and not `which normalize 2>/de v/null`;
system("normalize $nopts \"$outf.$$.wav\"") if $normalize; system("normalize $nopts $wavf_q") if $normalize;
# copy meta-data from input file to %tag_name # copy meta-data from input file to %tag_name
read_tags("$inf.$infmt", "$codec") if $run{$codec}{TAGS}{READ} == 1 and n ot $dryrun; read_tags("$inf.$infmt", "$codec") if $run{$codec}{TAGS}{READ} == 1 and n ot $dryrun;
my $tag_opts = format_tags($to); # tag options for mp4/m4a/m4b/mpc/mpp/bonk/ spx/wv my $tag_opts = format_tags($to); # tag options for mp4/m4a/m4b/mpc/mpp/bonk/ spx/wv
my $outf_q = shell_quote "$outf.$to";
my $encode_string = $run{$to}{ENCODER}{$encoder}{ESTR}->(); my $encode_string = $run{$to}{ENCODER}{$encoder}{ESTR}->();
$encode_string =~ s/%i/$tag_opts \"$outf.$$.wav\"/ if $to =~ /mpc|mpp|mp $encode_string =~ s/%i/$tag_opts $wavf_q/ if $to =~ /mpc|mpp|mp4|m4a/ an
4|m4a/ and $encoder eq "faac" or $encoder eq "mpcenc"; d $encoder eq "faac" or $encoder eq "mpcenc";
$encode_string =~ s/%i/\"$outf.$$.wav\" $tag_opts/ if $to =~ /mpc|mpp|mp $encode_string =~ s/%i/$wavf_q $tag_opts/ if $to =~ /mpc|mpp|mp4|m4a/ an
4|m4a/ and $encoder eq "ffmpeg" or $encoder eq "avconv"; d $encoder eq "ffmpeg" or $encoder eq "avconv";
$encode_string =~ s/%i/\"$outf.$$.wav\"/ if $to !~ /mpc|mpp|mp $encode_string =~ s/%i/$wavf_q/ if $to !~ /mpc|mpp|mp4|m4a/;
4|m4a/; $encode_string =~ s/%o/$tag_opts $outf_q/ if $tag_opts ne " " and $to
$encode_string =~ s/%o/$tag_opts \"$outf.$to\"/ if $tag_opts ne " " a !~ /mpc|mpp|mp4|m4a/;
nd $to !~ /mpc|mpp|mp4|m4a/; $encode_string =~ s/%o/$outf_q/ if $tag_opts eq " " or $to
$encode_string =~ s/%o/\"$outf.$to\"/ if $tag_opts eq " " o =~ /mpc|mpp|mp4|m4a/;
r $to =~ /mpc|mpp|mp4|m4a/;
$encode_string =~ s/(\$|\\)/\\$1/g;
# read tag options from command line if present # read tag options from command line if present
get_user_tags(); get_user_tags();
pnotice("debug","\n$run{$to}{ENCODER}{$encoder}{NAME} $encode_string", 2) if $dryrun; pnotice("debug","\n$run{$to}{ENCODER}{$encoder}{NAME} $encode_string", 2) if $dryrun;
# encode temporary WAV to desired output format. # encode temporary WAV to desired output format.
system("$run{$to}{ENCODER}{$encoder}{NAME} $encode_string $silent") if no t $dryrun; system("$run{$to}{ENCODER}{$encoder}{NAME} $encode_string $silent") if no t $dryrun;
# remove partially encoded output file and temporary wav if encoding fail s # remove partially encoded output file and temporary wav if encoding fail s
if ($? > 0) { if ($? > 0) {
unlink("$outf.$to") if -e "$outf.$to"; unlink("$outf.$to") if -e "$outf.$to";
unlink("$outf.$$.wav") if -e "$outf.$$.wav"; unlink("$wavf") if -e "$wavf";
say ""; say "";
$banner = 0; $banner = 0;
pnotice("encode_failed","$outf.$to: $?",1); pnotice("encode_failed","$outf.$to: $?",1);
return 1; return 1;
} }
# write meta-data to output file from %tag_name hash # write meta-data to output file from %tag_name hash
write_tags("$outf.$to", "$to") if $run{$to}{TAGS}{WRITE} == 1 and $tag_op ts eq " " and not $dryrun; write_tags("$outf.$to", "$to") if $run{$to}{TAGS}{WRITE} == 1 and $tag_op ts eq " " and not $dryrun;
unlink("$outf.$$.wav") if not $dryrun; unlink("$wavf") if not $dryrun;
unlink("$inf.$infmt") if $delete and not $dryrun; unlink("$inf.$infmt") if $delete and not $dryrun;
pnotice("removed_tmp","$outf.$$.wav","2") if $verbose; pnotice("removed_tmp","$wavf","2") if $verbose;
pnotice("removed_src","$inf.$infmt", "2") if $delete and $verbose; pnotice("removed_src","$inf.$infmt", "2") if $delete and $verbose;
} }
$pm->run_on_finish $pm->run_on_finish
( sub { ( sub {
my $pid = shift; my $pid = shift;
my $exit_code = shift; my $exit_code = shift;
my $ident = shift; my $ident = shift;
if (-e "$ident.$to") { if (-e "$ident.$to") {
skipping to change at line 2965 skipping to change at line 2995
$tag_name{$k} = $v if exists($tag_nam e{$k}); $tag_name{$k} = $v if exists($tag_nam e{$k});
$tag_name{artist} = $v if $k =~ /^aut hor/i; $tag_name{artist} = $v if $k =~ /^aut hor/i;
$tag_name{track} = $v if $k =~ /^tra cknumber/i; $tag_name{track} = $v if $k =~ /^tra cknumber/i;
} }
unlink("tmp-$$.wav"); unlink("tmp-$$.wav");
return 0; return 0;
} }
when (/^flac$|^fla$/) { when (/^flac$|^fla$/) {
my $flac_tag = Audio::Scan->scan_tags($in _file)->{tags}; my $flac_tag = Audio::FLAC::Header->scan_ tags($in_file)->{tags};
$tag_name{title} = $flac_tag->{TITLE } if $flac_tag->{TITLE}; $tag_name{title} = $flac_tag->{TITLE } if $flac_tag->{TITLE};
$tag_name{track} = $flac_tag->{TRACK NUMBER} if $flac_tag->{TRACKNUMBER}; $tag_name{track} = $flac_tag->{TRACK NUMBER} if $flac_tag->{TRACKNUMBER};
$tag_name{artist} = $flac_tag->{ARTIS T} if $flac_tag->{ARTIST}; $tag_name{artist} = $flac_tag->{ARTIS T} if $flac_tag->{ARTIST};
$tag_name{album} = $flac_tag->{ALBUM } if $flac_tag->{ALBUM}; $tag_name{album} = $flac_tag->{ALBUM } if $flac_tag->{ALBUM};
$tag_name{comment} = $flac_tag->{COMME NT} if $flac_tag->{COMMENT}; $tag_name{comment} = $flac_tag->{COMME NT} if $flac_tag->{COMMENT};
$tag_name{year} = $flac_tag->{DATE} if $flac_tag->{DATE}; $tag_name{year} = $flac_tag->{DATE} if $flac_tag->{DATE};
$tag_name{genre} = $flac_tag->{GENRE } if $flac_tag->{GENRE}; $tag_name{genre} = $flac_tag->{GENRE } if $flac_tag->{GENRE};
return 0; return 0;
skipping to change at line 2992 skipping to change at line 3022
$tag_name{track} = $mp4_tag->{TRKN} if $mp4_tag->{TRKN}; $tag_name{track} = $mp4_tag->{TRKN} if $mp4_tag->{TRKN};
$tag_name{artist} = $mp4_tag->{ART} if $mp4_tag->{ART}; $tag_name{artist} = $mp4_tag->{ART} if $mp4_tag->{ART};
$tag_name{album} = $mp4_tag->{ALB} if $mp4_tag->{ALB}; $tag_name{album} = $mp4_tag->{ALB} if $mp4_tag->{ALB};
$tag_name{comment} = $mp4_tag->{CMT} if $mp4_tag->{CMT}; $tag_name{comment} = $mp4_tag->{CMT} if $mp4_tag->{CMT};
$tag_name{year} = $mp4_tag->{DAY} if $mp4_tag->{DAY}; $tag_name{year} = $mp4_tag->{DAY} if $mp4_tag->{DAY};
$tag_name{genre} = $mp4_tag->{GNRE} if $mp4_tag->{GNRE}; $tag_name{genre} = $mp4_tag->{GNRE} if $mp4_tag->{GNRE};
return 0; return 0;
} }
when (/^dsf$/) {
my $dsf_tag = $tag_module->scan_tags($in
_file)->{tags};
$tag_name{title} = $dsf_tag->{TIT2}
if $dsf_tag->{TIT2};
$tag_name{track} = $dsf_tag->{TRCK}
if $dsf_tag->{TRCK};
$tag_name{artist} = $dsf_tag->{TPE1}
if $dsf_tag->{TPE1};
$tag_name{album} = $dsf_tag->{TALB}
if $dsf_tag->{TALB};
$tag_name{comment} = $dsf_tag->{COMM}
if $dsf_tag->{COMM};
$tag_name{year} = $dsf_tag->{TYER}
if $dsf_tag->{TYER};
$tag_name{genre} = $dsf_tag->{TCON}
if $dsf_tag->{TCON};
return 0;
}
when (/^ape$|^mpc$|^mpp$|^wv$/) { when (/^ape$|^mpc$|^mpp$|^wv$/) {
my $audio_tag = $tag_module->scan_tags($ in_file)->{tags}; my $audio_tag = $tag_module->scan_tags($ in_file)->{tags};
$tag_name{title} = $audio_tag->{TIT LE} if $audio_tag->{TITLE}; $tag_name{title} = $audio_tag->{TIT LE} if $audio_tag->{TITLE};
$tag_name{track} = $audio_tag->{TRA CK} if $audio_tag->{TRACK}; $tag_name{track} = $audio_tag->{TRA CK} if $audio_tag->{TRACK};
$tag_name{artist} = $audio_tag->{ART IST} if $audio_tag->{ARTIST}; $tag_name{artist} = $audio_tag->{ART IST} if $audio_tag->{ARTIST};
$tag_name{album} = $audio_tag->{ALB UM} if $audio_tag->{ALBUM}; $tag_name{album} = $audio_tag->{ALB UM} if $audio_tag->{ALBUM};
$tag_name{comment} = $audio_tag->{COM MENT} if $audio_tag->{COMMENT}; $tag_name{comment} = $audio_tag->{COM MENT} if $audio_tag->{COMMENT};
$tag_name{year} = $audio_tag->{YEA R} if $audio_tag->{YEAR}; $tag_name{year} = $audio_tag->{YEA R} if $audio_tag->{YEAR};
$tag_name{genre} = $audio_tag->{GEN RE} if $audio_tag->{GENRE}; $tag_name{genre} = $audio_tag->{GEN RE} if $audio_tag->{GENRE};
skipping to change at line 3078 skipping to change at line 3122
$tag_m = ''; $tag_m = '';
$tag_m = "$tag_m -t \"TITLE=$tag_name{title}\" " if $tag_name{title}; $tag_m = "$tag_m -t \"TITLE=$tag_name{title}\" " if $tag_name{title};
$tag_m = "$tag_m -t \"TRACKNUMBER=$tag_name{tr ack}\"" if $tag_name{track}; $tag_m = "$tag_m -t \"TRACKNUMBER=$tag_name{tr ack}\"" if $tag_name{track};
$tag_m = "$tag_m -t \"ARTIST=$tag_name{artist} \"" if $tag_name{artist}; $tag_m = "$tag_m -t \"ARTIST=$tag_name{artist} \"" if $tag_name{artist};
$tag_m = "$tag_m -t \"ALBUM=$tag_name{album}\" " if $tag_name{album}; $tag_m = "$tag_m -t \"ALBUM=$tag_name{album}\" " if $tag_name{album};
$tag_m = "$tag_m -t \"COMMENT=$tag_name{commen t}\"" if $tag_name{comment}; $tag_m = "$tag_m -t \"COMMENT=$tag_name{commen t}\"" if $tag_name{comment};
$tag_m = "$tag_m -t \"YEAR=$tag_name{year}\"" if $tag_name{year}; $tag_m = "$tag_m -t \"YEAR=$tag_name{year}\"" if $tag_name{year};
$tag_m = "$tag_m -t \"GENRE=$tag_name{genre}\" " if $tag_name{genre}; $tag_m = "$tag_m -t \"GENRE=$tag_name{genre}\" " if $tag_name{genre};
system("vorbiscomment -w $tag_m \"$out_file\"" my $out_file_q = shell_quote $out_file;
) if $tag_m ne ''; system("vorbiscomment -w $tag_m $out_file_q")
if $tag_m ne '';
return 0; return 0;
} }
when (/^fla$|^flac$/) { when (/^fla$|^flac$/) {
$tag_m = Audio::FLAC::Header->new("$out_file "); $tag_m = Audio::FLAC::Header->new("$out_file ");
my $tag_i = $tag_m->tags(); my $tag_i = $tag_m->tags();
$tag_i->{TITLE} = "$tag_name{title}" if $tag_name{title}; $tag_i->{TITLE} = "$tag_name{title}" if $tag_name{title};
$tag_i->{TRACKNUMBER} = "$tag_name{track}" if $tag_name{track}; $tag_i->{TRACKNUMBER} = "$tag_name{track}" if $tag_name{track};
skipping to change at line 3330 skipping to change at line 3375
$outdir = $ENV{HOME}; $outdir = $ENV{HOME};
$to =~ tr/A-Z/a-z/; $to =~ tr/A-Z/a-z/;
get_visual_opts($to,$out_dir) if $gui and not defined($first_run); get_visual_opts($to,$out_dir) if $gui and not defined($first_run);
$first_run = 1; $first_run = 1;
pnotice("ripping_track","$tno",2); pnotice("ripping_track","$tno",2);
$on =~ s/\//_/g; $on =~ s/\//_/g;
say "\ncdparanoia -d $device $tno $on.wav\n" if $dryrun; say "\ncdparanoia -d $device $tno $on.wav\n" if $dryrun;
system("cdparanoia -d $device $tno \"$on.wav\" >/dev/null 2>&1") if not my $on_q = shell_quote "$on.wav";
$dryrun; system("cdparanoia -d $device $tno $on_q >/dev/null 2>&1") if not $dryr
un;
if ($to !~ /wav/i) { if ($to !~ /wav/i) {
push(@file, "$on.wav"); push(@file, "$on.wav");
tag_track($tno); tag_track($tno);
proc_input(); proc_input();
clear_tag_hash(); clear_tag_hash();
undef(@file); undef(@file);
unlink("$on.wav") if not $dryrun; unlink("$on.wav") if not $dryrun;
pnotice("removed_tmp","$on.wav",2) if $verbose; pnotice("removed_tmp","$on.wav",2) if $verbose;
skipping to change at line 3437 skipping to change at line 3483
exit(0); exit(0);
} }
# version / license information # version / license information
sub version { sub version {
say " say "
$name - $version $name - $version
Copyright (C) 2005-2018 Philip Lyons Copyright (C) 2005-2019 Philip Lyons
This is free software. You may redistribute copies of it under the terms of This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law. There is NO WARRANTY, to the extent permitted by law.
"; ";
} }
# help & longhelp menu # help & longhelp menu
sub help_menu { sub help_menu {
skipping to change at line 3563 skipping to change at line 3609
if (@ARGV) { if (@ARGV) {
foreach (@ARGV) { foreach (@ARGV) {
if (-f $_) { push(@file,$_); print "$lang{debug} adding $_ to \@file\n " if $debug == 1; } if (-f $_) { push(@file,$_); print "$lang{debug} adding $_ to \@file\n " if $debug == 1; }
elsif (-d $_) { push(@dir, $_); print "$lang{debug} adding $_ to \@dir\n" if $debug == 1; } elsif (-d $_) { push(@dir, $_); print "$lang{debug} adding $_ to \@dir\n" if $debug == 1; }
else { perror("no_infile","$_"); } else { perror("no_infile","$_"); }
} }
} }
load_user_modules() if $config{IMPORTM} == 1; load_user_modules() if $config{IMPORTM} == 1;
if ($to and @ARGV and not $rip) { proc_input(); } if ($to and @ARGV and not $rip) { proc_input(); exit $total_failed; }
elsif ($to and $rip) { proc_cd(); } elsif ($to and $rip) { proc_cd(); }
elsif ($my_encoder and not $to) { show_encoders(); } elsif ($my_encoder and not $to) { show_encoders(); }
elsif ($my_decoder and not $to) { show_decoders(); } elsif ($my_decoder and not $to) { show_decoders(); }
elsif ($verinfo) { version(); } elsif ($verinfo) { version(); }
elsif ($longhelp) { help_menu(); } elsif ($longhelp) { help_menu(); }
elsif ($formats) { show_formats(); } elsif ($formats) { show_formats(); }
elsif ($cdinfo) { cdinfo(); } elsif ($cdinfo) { cdinfo(); }
elsif ($taginfo and not $to) { show_taginfo(); } elsif ($taginfo and not $to) { show_taginfo(); }
elsif ($title or $track or $artist or $album or $comment or $year or $genre) { w rite_user_tags(); } elsif ($title or $track or $artist or $album or $comment or $year or $genre) { w rite_user_tags(); }
skipping to change at line 3598 skipping to change at line 3644
Perl Audio Converter Perl Audio Converter
A Linux CLI tool for converting multiple audio types from one format to another. A Linux CLI tool for converting multiple audio types from one format to another.
It supports the following audio formats: It supports the following audio formats:
======================================== ========================================
3G2, 3GP, 8SVX, AAC, AC3, ADTS, AIFF, AL, AMB, AMR, APE, AU, 3G2, 3GP, 8SVX, AAC, AC3, ADTS, AIFF, AL, AMB, AMR, APE, AU,
AVR, BONK, CAF, CDR, CVU, DAT, DTS, DVMS, F32, F64, FAP, FLA, AVR, BONK, CAF, CDR, CVU, DAT, DSF, DTS, DVMS, F32, F64, FAP, FLA,
FLAC, FSSD, GSRT, HCOM, IMA, IRCAM, LA, MAT, MAUD, MAT4, MAT5, FLAC, FSSD, GSRT, HCOM, IMA, IRCAM, LA, MAT, MAUD, MAT4, MAT5,
M4A, MP2, MP3, MP4, MPC, MPP, NIST, OFF, OFR, OFS, OPUS, OGA, M4A, MP2, MP3, MP4, MPC, MPP, NIST, OFF, OFR, OFS, OPUS, OGA,
OGG, PAF, PRC, PVF, RA, RAM, RAW, RF64, SD2, SF, SHN, SMP, SND, OGG, PAF, PRC, PVF, RA, RAM, RAW, RF64, SD2, SF, SHN, SMP, SND,
SOU, SPX, SRN, TAK, TTA, TXW, VOC, VMS, VQF, W64, WAV, WMA, SOU, SPX, SRN, TAK, TTA, TXW, VOC, VMS, VQF, W64, WAV, WMA,
and WV. and WV.
It can also extract audio from the following video extensions: It can also extract audio from the following video extensions:
============================================================== ==============================================================
skipping to change at line 4074 skipping to change at line 4120
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
=head1 AUTHOR =head1 AUTHOR
Copyright (C) 2005-2018 Philip Lyons (vorzox@gmail.com) Copyright (C) 2005-2019 Philip Lyons (vorzox@gmail.com)
 End of changes. 24 change blocks. 
37 lines changed or deleted 90 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)