I have a hard disk full of live shows. Each show is in an individual folder (titled by name and date of show), and contains the individual wav files of the show, labeled "disc1track1, disc1track2, etc." It's the same naming scheme in each of the 200 or so folders for each show. I want to convert each audio file to flac - is there a way to do this all at once? I can't just copy and paste each file into the frontend because they share file names. What would be ideal is some way to add the folders to a list, and have it encode any audio files found in each folder. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/flac/attachments/20060601/43e2dbea/attachment.htm
In linux..... Something like ----------------------------------------------------------------- for FOO in `ls -R | grep wav` ; do flac -5 ${FOO} ; done ---------------------------------------------------------------- or -------------------------------------------------------------- find . -name "*.wav" | while read FOO do flac -5 "${FOO}" done --------------------------------------------------------------- Now, if you're using winders, All I can do is give you some perl --------------------------------------------------- #!/usr/bin/perl -w use strict; my $dir = shift @ARGV; opendir DIR, $dir; while (my $file = readdir(DIR)) { next unless $file =~ /wav$/; my $cmd = qq[flac -8 "$file" ]; print "$cmd\n"; print `$cmd`; } closedir DIR; ----------------------------------------------------------------------------->From: "Matthew Greig" <mgreig1@lsu.edu> >To: <flac@xiph.org> >Subject: [Flac] Batch Process for wav->flac? >Date: Thu, 1 Jun 2006 18:55:31 -0500 > >I have a hard disk full of live shows. Each show is in an individual >folder >(titled by name and date of show), and contains the individual wav files of >the show, labeled "disc1track1, disc1track2, etc." It's the same naming >scheme in each of the 200 or so folders for each show. > > > >I want to convert each audio file to flac - is there a way to do this all >at >once? I can't just copy and paste each file into the frontend because they >share file names. What would be ideal is some way to add the folders to a >list, and have it encode any audio files found in each folder. Thanks! >>_______________________________________________ >Flac mailing list >Flac@xiph.org >http://lists.xiph.org/mailman/listinfo/flac
Also, If using perl, you can convert between formats quite easily (aac, flac,ape,wav,etc)... Someone re-read this as I don't have an installation to test this on at the moment. Copy/paste into convert.pl and run>perl convert.pl c:\mydirectory aacor>perl convert.pl c:\mydirectory mp4or something Change the following lines to suite your needs faad $noext.aac $noext.wav flac -8 $noext.wav ---------------------------------------------------------------------------------- #!/usr/bin/perl -w use strict; # --- grab dir and filter from cmd line --- my $dir = shift @ARGV || '.'; # default to . my $filter = shift @ARGV || '*.aac'; # default to *.aac # --- run 'find', break into array --- my @find = split /\n/, `find $dir -type f -name "$filter"`; # --- process each file --- foreach my $file (@find) { $file =~ s/([^\w\.\/-_,])/\$1/g; # escape non-word chars my $noext = ($file =~ /^(.*)\..*?$/)[0] || ''; # get filename w/o ext # --- customize this to your needs --- my $cmd = qq[ faad $noext.aac $noext.wav flac -8 $noext.wav # rm $file $noext.wav # uncomment when you know the previous cmds work ]; print $cmd; # display what we're gonna run (optional) #print `$cmd`; # run it (uncomment when ready) }>From: "Frank Russo" <russofris@hotmail.com> >To: mgreig1@lsu.edu, flac@xiph.org >Subject: RE: [Flac] Batch Process for wav->flac? >Date: Thu, 01 Jun 2006 17:37:00 -0700 > >In linux..... Something like >----------------------------------------------------------------- >for FOO in `ls -R | grep wav` ; do flac -5 ${FOO} ; done >---------------------------------------------------------------- >or >-------------------------------------------------------------- >find . -name "*.wav" | while read FOO >do > flac -5 "${FOO}" >done >--------------------------------------------------------------- > >Now, if you're using winders, All I can do is give you some perl > >--------------------------------------------------- >#!/usr/bin/perl -w > >use strict; > >my $dir = shift @ARGV; > >opendir DIR, $dir; >while (my $file = readdir(DIR)) { > next unless $file =~ /wav$/; > my $cmd = qq[flac -8 "$file" ]; > print "$cmd\n"; > print `$cmd`; >} >closedir DIR; >----------------------------------------------------------------------------- > >>From: "Matthew Greig" <mgreig1@lsu.edu> >>To: <flac@xiph.org> >>Subject: [Flac] Batch Process for wav->flac? >>Date: Thu, 1 Jun 2006 18:55:31 -0500 >> >>I have a hard disk full of live shows. Each show is in an individual >>folder >>(titled by name and date of show), and contains the individual wav files >>of >>the show, labeled "disc1track1, disc1track2, etc." It's the same naming >>scheme in each of the 200 or so folders for each show. >> >> >> >>I want to convert each audio file to flac - is there a way to do this all >>at >>once? I can't just copy and paste each file into the frontend because >>they >>share file names. What would be ideal is some way to add the folders to a >>list, and have it encode any audio files found in each folder. Thanks! >> > > >>_______________________________________________ >>Flac mailing list >>Flac@xiph.org >>http://lists.xiph.org/mailman/listinfo/flac > > >_______________________________________________ >Flac mailing list >Flac@xiph.org >http://lists.xiph.org/mailman/listinfo/flac
????? Haha, sorry, I have no idea how to work a perl script. Can you give me some idea of where to put this, or is it way beyond an amateur's comprehension? Thanks. -----Original Message----- From: Frank Russo [mailto:russofris@hotmail.com] Sent: Thursday, June 01, 2006 7:37 PM To: mgreig1@lsu.edu; flac@xiph.org Subject: RE: [Flac] Batch Process for wav->flac? In linux..... Something like ----------------------------------------------------------------- for FOO in `ls -R | grep wav` ; do flac -5 ${FOO} ; done ---------------------------------------------------------------- or -------------------------------------------------------------- find . -name "*.wav" | while read FOO do flac -5 "${FOO}" done --------------------------------------------------------------- Now, if you're using winders, All I can do is give you some perl --------------------------------------------------- #!/usr/bin/perl -w use strict; my $dir = shift @ARGV; opendir DIR, $dir; while (my $file = readdir(DIR)) { next unless $file =~ /wav$/; my $cmd = qq[flac -8 "$file" ]; print "$cmd\n"; print `$cmd`; } closedir DIR; ---------------------------------------------------------------------------- ->From: "Matthew Greig" <mgreig1@lsu.edu> >To: <flac@xiph.org> >Subject: [Flac] Batch Process for wav->flac? >Date: Thu, 1 Jun 2006 18:55:31 -0500 > >I have a hard disk full of live shows. Each show is in an individual >folder >(titled by name and date of show), and contains the individual wav files of >the show, labeled "disc1track1, disc1track2, etc." It's the same naming >scheme in each of the 200 or so folders for each show. > > > >I want to convert each audio file to flac - is there a way to do this all >at >once? I can't just copy and paste each file into the frontend because they >share file names. What would be ideal is some way to add the folders to a >list, and have it encode any audio files found in each folder. Thanks! >>_______________________________________________ >Flac mailing list >Flac@xiph.org >http://lists.xiph.org/mailman/listinfo/flac
On 6/2/06, Matthew Greig <mgreig1@lsu.edu> wrote:> I want to convert each audio file to flac ? is there a way to do this all at > once? I can't just copy and paste each file into the frontend because they > share file names. What would be ideal is some way to add the folders to a > list, and have it encode any audio files found in each folder. Thanks!1. Get sweep. Unpack it somewhere. http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=1927&view=findpost&p=199863 2. Open a command prompt (cmd, command.com). 3. sweep flac *.wav 4. Adjust d:\paths\to\executables.exe if it doesn't work.