From owner-freebsd-multimedia Mon Feb 23 00:20:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA10642 for freebsd-multimedia-outgoing; Mon, 23 Feb 1998 00:20:42 -0800 (PST) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from pendor.McKusick.COM (root@pendor.bayarea.net [205.219.85.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA10636 for ; Mon, 23 Feb 1998 00:20:39 -0800 (PST) (envelope-from benco@pendor.McKusick.COM) Received: from localhost (benco@localhost [127.0.0.1]) by pendor.McKusick.COM (8.8.8/8.8.7) with SMTP id AAA11778 for ; Mon, 23 Feb 1998 00:20:31 -0800 (PST) Message-Id: <199802230820.AAA11778@pendor.McKusick.COM> X-Authentication-Warning: pendor.McKusick.COM: benco@localhost [127.0.0.1] didn't use HELO protocol cc: multimedia@FreeBSD.ORG Subject: Re: Creating MP3's under FreeBSD... In-reply-to: Your message of "Mon, 23 Feb 1998 11:09:08 +0300." <19980223110908.54543@sensi.org> Date: Mon, 23 Feb 1998 00:20:29 -0800 From: Ben Cottrell Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 23 Feb 1998 11:09:08 +0300, vadik likholetov wrote: > here's the script I'm using to create mp3's : Vadik, I notice your script stops and waits for each track before proceeding to the next. This is inefficient, as ripping is an I/O bound task and encoding a CPU-bound one. This is a perfect opportunity for multitasking. Here's the script I use :-) ~Ben #!/bin/csh -f set prog="$argv[1]" # program to encode mp3s with set dir="$argv[2]" # dir in which to store mp3s set tracks=(`cdd |& awk '/^ *[0-9][0-9] *CD-AUDIO *[^ ]* *[^ ]* *[^ ]* *[0-9][0-9]:[0-9][0-9]:[0-9][0-9] \/ [0-9][0-9][0-9][0-9][0-9][0-9] *[0-9]+ *$/ {print $1}'`) foreach i ($tracks) if(!(-e ${dir}/track-${i}.mp3)) then if(!(-e ${dir}/track-${i}.cda)) then cdd -a -t $i $dir >& /dev/null endif wait ($prog ${dir}/track-${i}.cda ${dir}/track-${i}.mp3;rm ${dir}/track-${i}.cda) & endif end wait To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message