Date: Mon, 22 Jul 2002 15:30:16 +0200 From: Stijn Hoop <stijn@win.tue.nl> To: "Christopher J. Umina" <uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com> Cc: FreeBSD Question Mailing List <questions@freebsd.org> Subject: Re: Mp3 Tags Message-ID: <20020722133016.GB4712@pcwin002.win.tue.nl> In-Reply-To: <20020722083723.A9211-100000@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com> References: <20020722083723.A9211-100000@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
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?
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQE9PAjnY3r/tLQmfWcRAuFSAJ0fRWARZlzwVp3Ds/9+X50DZDj19gCgjfC2
ANHhsz/R2RBe/L2t967xHKw=
=u0ng
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020722133016.GB4712>
