Gentoo Archives: gentoo-user

From: Ow Mun Heng <Ow.Mun.Heng@×××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] re-encode mp3 files
Date: Wed, 08 Dec 2004 10:53:32
Message-Id: 1102473305.22094.1.camel@neuromancer.home.net
In Reply to: Re: [gentoo-user] re-encode mp3 files by SHI Ning
1 On Mon, 2004-12-06 at 18:55, SHI Ning
2 wrote:
3 > I think you can use lame to do it.
4 >
5 > On 09:59 Mon 06 Dec , Khan wrote:
6 > > Hello,
7 > >
8 > > I have some mp3's that are encoded ok 160Kbps. I would like to lover
9 > > they bitrate to 30Kbps. Which software should I use.
10
11 You can take a page out of this script.
12
13 cat convert2mp3.pl
14 #!/usr/bin/perl -w
15 use strict;
16
17 foreach my $file (@ARGV) {
18 next if ($file !~ /\.wma$/i);
19 my $base = $file; $base =~ s/\.wma$//i;
20 system "mplayer \"$file\" -ao pcm -aofile \"$base.wav\"";
21 system "lame -h \"$base.wav\" \"$base.mp3\"";
22 unlink("$base.wav");
23 print "$base.wma converted to mp3.\n";
24 }
25
26
27 --
28 Ow Mun Heng
29 Gentoo/Linux on D600 1.4Ghz
30 Neuromancer 10:34:23 up 1:36, 6 users, 0.37, 0.32, 0.27
31
32
33
34 --
35 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] re-encode mp3 files "Lluís Batlle i Rossell" <viric@××××××××××××××××××.net>