From owner-freebsd-stable@FreeBSD.ORG Sat Mar 7 14:39:44 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED73106567E for ; Sat, 7 Mar 2009 14:39:44 +0000 (UTC) (envelope-from zkolic@sbb.co.yu) Received: from smtp3.sbb.rs (smtp3.sbb.rs [89.216.2.35]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2C28FC19 for ; Sat, 7 Mar 2009 14:39:44 +0000 (UTC) (envelope-from zkolic@sbb.co.yu) Received: from faust.net (cable-94-189-245-74.dynamic.sbb.rs [94.189.245.74]) by smtp3.sbb.rs (8.14.0/8.14.0) with ESMTP id n27Edgvt030152; Sat, 7 Mar 2009 15:39:42 +0100 Received: by faust.net (Postfix, from userid 1001) id BA9DC5C1C; Sat, 7 Mar 2009 15:34:21 +0100 (CET) Date: Sat, 7 Mar 2009 15:34:21 +0100 From: Zoran Kolic To: Roland Smith Message-ID: <20090307143421.GA942@faust.net> References: <20090307071228.GA1134@faust.net> <20090307090054.GA23931@slackbox.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090307090054.GA23931@slackbox.xs4all.nl> X-SMTP-Vilter-Version: 1.3.2 X-SBB-Virus-Status: clean X-SBB-Spam-Score: -2.0 Cc: freebsd-stable@freebsd.org Subject: Re: cd ripping to flac X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2009 14:39:45 -0000 Thanx for reply! > It won't work if you want the songs to have the right metadata; You'd > have to supply that to the pipe in some way... K. I would use metaflac anyway. > For ripping I use cdparanoia: 'cdparanoia -B 1' rips all tracks. I was intended to have something like: cdparanoia -B - | flac - > The following perl scripts reads a text file containing the metadata > (artist, album name, track data) and calls flac: > > ----- make-flac ----- > #!/usr/bin/perl > # > # Compiles a list of wav files into flac files. > # > # Author: R.F. Smith > # Time-stamp: <2008-07-30 23:53:00 rsmith> > # > # I, the copyright holder of this work, hereby release it into > # the public domain. This applies worldwide. > # > # In case this is not legally possible, I grant any entity the right to use > # this work for any purpose, without any conditions, unless such conditions > # are required by law. > > # Check for programs that this script needs. > chomp($flac = `which flac 2>/dev/null`); > -x $flac || die "Cannot find flac: $!\n"; > #chomp($norm = `which normalize 2>/dev/null`); > #-x $norm || die "Cannot find normalize: $!\n"; > > # Get the name of the file containing the titles. > if ($ARGV[0] ne "") { > $fname = $ARGV[0]; > } else { > $fname = "titles"; > } > > # open the list of song titles > open (TITELS, $fname) || die "cannot open $fname: $!\n"; > > # The titles file format is as follows: > # ------------------------------------ > # album title > # artist > # 01 title of 1st song > # .. > # 14 title of 14th song > # .. > > # get the album title and performer name > chomp($album = ); > $album ne "" || die "cannot read album name"; > chomp($artist = ); > $artist ne "" || die "cannot read artist name"; > > # Normalize the wav files. > #printf("Normalizing .wav files...\n"); > #`$norm -b track*.cdda.wav`; > > # go over all the songs > while() { > chomp; > ($num, $title) = split (' ', $_, 2); > printf ("Encoding \"%s\" as %s\n", $title, "track".$num.".flac"); > # invoke the flac encoder. > do { > $rc = system ($flac, "-8", "-TARTIST=".$artist, "-TALBUM=".$album, > "-TTITLE=".$title, "-TTRACKNUMBER=".$num, > "-o", "track".$num.".flac", "track".$num.".cdda.wav"); > if ($rc != 0) {print "\nError,", $rc, "starting again";} > } until $rc == 0; > } > ----- make-flac ----- He-he! flac defaults to -5, I think. Probably it would do the same trick as pipe, just metadata are stored with no nad work. Thank you once more. Best regards Zoran