From owner-freebsd-questions Mon Jul 22 11:43:13 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9FB537B400 for ; Mon, 22 Jul 2002 11:43:09 -0700 (PDT) Received: from 216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com (216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com [216.164.225.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id D30B043E67 for ; Mon, 22 Jul 2002 11:43:08 -0700 (PDT) (envelope-from uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com) Received: from localhost (uminac@localhost) by 216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com (8.11.6/8.11.6) with ESMTP id g6MIgim27287; Mon, 22 Jul 2002 14:42:44 -0400 (EDT) (envelope-from uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com) Date: Mon, 22 Jul 2002 14:42:43 -0400 (EDT) From: "Christopher J. Umina" To: Stijn Hoop Cc: FreeBSD Question Mailing List Subject: Re: Mp3 Tags In-Reply-To: <20020722133016.GB4712@pcwin002.win.tue.nl> Message-ID: <20020722144206.L27260-100000@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG What does dowarn need to work? I get errors because of it, what else do I need to do? Use::dowarn; ?? On Mon, 22 Jul 2002, Stijn Hoop wrote: > On Mon, Jul 22, 2002 at 08:38:46AM -0400, Christopher J. Umina wrote: > > Hi guys, > > > > Is there a command that I can use to strip the tags off of Mp3's? > > I want to strip the ID3v1 and ID3v2 tags out. Or does anybody have a clue > > about how I could do it in C or C++? > > You could use the perl library /usr/ports/audio/p5-MP3-Info. The following > snippet shows how I did it: > > # Now remove ID3v{1,2} tags > my $tag = get_mp3tag($filename); > if (defined($tag)) { > # make a backup > my $backupname = $filename . ".BAK"; > system("cp", $filename, $backupname); > my $bytes = remove_mp3tag($filename, "ALL"); > if (!defined($bytes)) { > # restore backup > system("mv", "-f", $backupname, $filename); > dowarn("could not remove ID3 tag from $path"); > } elsif ($bytes == -1) { > # restore backup > system("mv", "-f", $backupname, $filename); > dowarn("no ID3 tag found in $path, should not happen"); > } else { > system("rm", $backupname); > dowarn("mp3 changed ($path): tag of $bytes bytes " . > "removed"); > } > } > > HTH, > > --Stijn > > -- > In the force if Yoda's so strong, construct a sentence with words in > the proper order then why can't he? > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message