Gentoo Archives: gentoo-user

From: "Lluís Batlle i Rossell" <viric@××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] re-encode mp3 files
Date: Wed, 08 Dec 2004 11:03:14
Message-Id: 20041208110251.GA23374@vicerveza.homeunix.net
In Reply to: Re: [gentoo-user] re-encode mp3 files by Ow Mun Heng
1 I personaly prefer using a pipe. :)
2
3 Here is my "mp32mp3.sh":
4 #!/bin/bash
5
6 echo "Converting mp3 to mp3..."
7 if [ $# -lt 2 ]; then
8 echo "Usage: $0 <dest-dir> <abr> <mp3_1> <mp3_2> ..."
9 exit 1
10 fi
11
12 DEST="$1"
13 ABR="$2"
14
15 shift
16 shift
17
18 for a in `seq 1 $#`; do
19 echo "* Converting \"$1\"... "
20 exit 1
21 fi
22
23 DEST="$1"
24 ABR="$2"
25
26 shift
27 shift
28
29 for a in `seq 1 $#`; do
30 echo "* Converting \"$1\"... "
31 mpg321 -q -w - "$1" | lame --abr $ABR - "$DEST"/"$1"
32 if [ $? = 0 ]; then
33 echo \[done\]
34 else
35 echo failed
36 fi
37 shift
38 done
39
40 % END
41
42 --
43 +-------------------------------------------------------+----------------------+
44 | Lluís Batlle i Rossell |Tel.Olot. 972 26 71 24|
45 | Membre de [s3os] (www.s3os.net) | BCN. 93 16 22 680|
46 | viric@××××××.org / ICQ# 9658637 | Mòb. 654 08 67 35|
47 | +info personal: http://vicerveza.homeunix.net/~viric/ | Santa Pau / Catalunya|
48 +-------------------------------------------------------+----------------------+
49 Cita:
50 - Press any key to accept the license.
51 (Dell Computers)
52
53 --
54 gentoo-user@g.o mailing list

Replies

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