From owner-freebsd-stable@FreeBSD.ORG Sat Mar 7 09:01:04 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 46D0F106566B for ; Sat, 7 Mar 2009 09:01:04 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr5.xs4all.nl (smtp-vbr5.xs4all.nl [194.109.24.25]) by mx1.freebsd.org (Postfix) with ESMTP id E7A578FC13 for ; Sat, 7 Mar 2009 09:01:03 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr5.xs4all.nl (8.13.8/8.13.8) with ESMTP id n2790spP046608; Sat, 7 Mar 2009 10:00:54 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 7801BBA9A; Sat, 7 Mar 2009 10:00:54 +0100 (CET) Date: Sat, 7 Mar 2009 10:00:54 +0100 From: Roland Smith To: Zoran Kolic Message-ID: <20090307090054.GA23931@slackbox.xs4all.nl> References: <20090307071228.GA1134@faust.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline In-Reply-To: <20090307071228.GA1134@faust.net> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: by XS4ALL Virus Scanner 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 09:01:04 -0000 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 07, 2009 at 08:12:28AM +0100, Zoran Kolic wrote: > Howdy! > I'd like to rip my cd-s to flac files using some > command line app, like cdda2wav or cdparanoia. > Using pipe to flac utility would be nice and the > way I'd take. What program acts in that matter? 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... For ripping I use cdparanoia: 'cdparanoia -B 1' rips all tracks. 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 =3D `which flac 2>/dev/null`); -x $flac || die "Cannot find flac: $!\n"; #chomp($norm =3D `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 =3D $ARGV[0]; } else { $fname =3D "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 =3D ); $album ne "" || die "cannot read album name"; chomp($artist =3D ); $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) =3D split (' ', $_, 2); printf ("Encoding \"%s\" as %s\n", $title, "track".$num.".flac"); # invoke the flac encoder. do { $rc =3D system ($flac, "-8", "-TARTIST=3D".$artist, "-TALBUM=3D".$a= lbum,=20 "-TTITLE=3D".$title, "-TTRACKNUMBER=3D".$num,=20 "-o", "track".$num.".flac", "track".$num.".cdda.wav"); if ($rc !=3D 0) {print "\nError,", $rc, "starting again";} } until $rc =3D=3D 0; } ----- make-flac ----- Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --gBBFr7Ir9EOA20Yy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkmyN8YACgkQEnfvsMMhpyXCCwCgp6V9uj0o2jcYZ/K+ZSiFWEiq E+oAoKhy5gPLPZkQEMTO8dVP4r/hu7KJ =JpZn -----END PGP SIGNATURE----- --gBBFr7Ir9EOA20Yy--