2004.06_Streamtuner-Listen and Capture Streamed Media-Save Directly as Mp3 Data Files.pdf
(
2403 KB
)
Pobierz
Layout 1
LINUX USER
Streamtuner
Soundgrabber
Many proud owners of broadband Internet connections
enjoy listening to Internet radio streams in the back-
ground. Although the enormous range of stations can
make it hard to keep track, the real question is how
do I go about recording a program that I really like?
BY JÖRG SCHUMANN AND CARSTEN SCHNOBER
Icecast [3] sites list hundreds of
Web radio stations. Web radio sta-
tions broadcast a continuous stream of
MP3 formatted music. You can use any
MP3 player, XMMS [4] for example, for
sound output, and the Streamripper [5]
command-line tool to capture the
stream. Streamtuner [6] provides the
GUI needed to coordinate the whole
setup.
Although XMMS has a native
Disk
Writer
plug-in, which will store a stream
locally, the plug-in decodes the incoming
stream, converting it to an enormous
wave file on the local disk. As you can
imagine, extracting your favorite track
from the stream can be tricky.
Red Hat, or
Mandrake,
ensure that you
are
root
, and enter
rpm -Uvh *.rpm
to
launch the Streamripper
and Streamtuner installs.
These programs require a few
additional packages such as the GTK
libraries, which are typically pre-
installed on most systems; Streamtuner
also needs
Curl
.
Streamripper and Streamtuner have
not found their way into the stable
Debian version,
Woody
, although there
are
backports
from future versions,
which are not currently in stable. Both
packages can be installed by following
the typical steps:
dpkg -i *.deb
in the
Debian
directory. Again Streamtuner
needs the
libcurl2
package.
To ensure that you have the latest ver-
sions, enter the following lines:
ing pack-
ages.
Streamtuner
uses the XMMS
MP3 player to play music.
This program is included with all the dis-
tributions mentioned so far.
Tune In!
If you have never tried out Web radio
before, check out the Shoutcast home-
page at [1] for a great selection (see
Figure 1). Fans of almost any genre
should find something to their liking.
Click the
Tune in!
button to the left of a
station to pop up a dialog that prompts
you to specify the player you want to
use. A MP3 stream is not just a simple
MP3 file, but a playlist with the
pls
or
m3u
suffix.
In the KDE browser, Konqueror, click
on
Open
in the first dialog box. A second
window will appear, if you have not pre-
viously assigned an application to this
Installation
Most major distributions do not include
this update, so check out the packages
from [7], [8], and [9]. If you have an
RPM-based Linux system, such as Suse,
deb http://www.back
U
ports.org/debian
U
stable streamtuner
deb http://www.back
U
ports.org/
U
debian stable stream
U
ripper
Figure 1: Shoutcast caters to every taste.
in your
/etc/apt/sources.list
file and, working as
root
,
type
apt-get update
, fol-
lowed by
apt-get install
streamripper streamtuner
to download the packages,
after updating your exist-
Figure 2: XMMS tells you the address for your
favorite stream.
84
June 2004
www.linux-magazine.com
Capturing Streams from Internet Broadcasts
T
he Shoutcast [1], Live365 [2], and
Streamtuner
LINUX USER
Figure 3: Streamripper stores the tracks from the stream in indi-
vidual files.
poll the stations in the dis-
play for latest details.
You can click on a genre to
display the streams assigned
to that genre. The arrow key
left of the genre name allows
you to open up a sub-cate-
gory of the genre.
The list of streams on the
right includes a description
written by the stream
provider. Many stations also
serve up the name of the current track
and artist. The next column tells you the
number of listeners, and
Maximum
shows you how many concurrent listen-
ers a server can support. If all of these
slots are taken, you will have to wait for
someone to close a connection to listen
to this stream.
If you are interested in the sound qual-
ity, check the column on the outside
right. The higher the bit-rate, the better
the sound quality.
After deciding on a station, click with
your mouse to select the station, and dis-
play three buttons in the toolbar with
your options.
Connect
launches XMMS
and play the stream.
Record
tells Stream-
ripper to save the track you are currently
playing in MP3 format,
Browse
will open
the browser and surf to the station’s
homepage. The
Stop
button has no effect
on Streamripper or XMMS. Streamtuner
simply calls these external programs, but
does not maintain a connection to them.
The
Preferences
entry opens a dialog box
with an overview of the genre, name,
and some technical details.
If you need to change the preferences
for the browser, you can select
Edit |
Preferences | Applications
to enter your
browser software, and its parameters.
Enter your browser in the
Visit Website
field, and your MP3 player in
Listen to a
.m3u-file
. The setting for
Record stream
will launch Streamripper in a separate
window if no further parameters are sup-
plied. You can specify
-d
and any
writable directory on your hard disk to
tell Streamripper to capture to this direc-
tory, otherwise, the files will be placed in
a directory with the name of the radio
station below your home directory.
You can use more parameters for
Streamripper. The
-l
parameter restricts
the recording time to a specific number
of seconds, and
-s
tells the program not
to create separate directories for each
stream. Check out the manpage for more
options, by typing
man streamripper
.
file type. In this case, you need to select
Open with:…
. Type
xmms
in the textbox
in the next dialog box that appears, or
select the program from the KDE menu.
Click on
OK
to launch the Web radio
stream in your player.
The Streamripper program is responsi-
ble for recording. Typing
streamripper
,
followed by the address of the required
stream
will open up a connection to the
target host, and save the tracks it serves
up in individual MP3 files on your local
disk. To find out the exact address of the
Web radio station, check the
File name
field in the
File Info
window in XMMS;
press [Ctrl-3] to display the window (see
Figures 2 and 3).
■
INFO
[
1] Shoutcast:
http://www.shoutcast.com/
[2] Live365:
http://www.live365.com/
[3] Icecast:
http://www.icecast.org/streamlist.php
[4] XMMS:
http://www.xmms.org/
[5] Streamripper:
http://streamripper.sourceforge.net/
[6] Streamtuner:
http://www.nongnu.org/streamtuner
[7] Suse packages for Streamripper and
Streamtuner:
http://apt.bygden.nu/SuSE/
9.0-i386/RPMS.suser-scorot/
[8] Red Hat packages for Streamripper and
Streamtuner:
ftp://newrpms.sunsite.dk/
projects/newrpms/www/htdocs/apt/
redhat/en/i386/9.0/RPMS.newrpms/
[9] Mandrake packages for Streamtuner and
Streamripper:
http://mandrake.binarycompass.org/
Mandrake-devel/contrib/i586/
More Ease of Use
The basic version 0.11 of Streamtuner
(see Figure 4) only provides an overview
of the Shoutcast list. The Streamtuner
homepage has additional plug-ins on
offer to support Live365 and Icecast’s
Xiph. Unfortunately, there are no bina-
ries available, and the stability of the
plug-ins is questionable, but if you enjoy
tinkering with your system, just down-
load, build, and enjoy.
When you type
streamtuner
to launch
the program, an overview with a typi-
cal file manager design
appears. The left hand
panel contains a tree view
with various genres. There
is also a list of top ranking
streams across all genres.
The find function below
the list allows you to
search for a keyword
against the list of entries,
and quickly discover a sta-
tion currently playing your
favorite artist. To search
for a keyword, click on
Update
; this button will
Secure Storage
Right-clicking a stream will pop-up a
context menu that has the above
options, and an
Add Bookmark
entry,
that can help you find the addresses of
your favorite streams in future sessions.
GLOSSARY
Figure 4: Streamtuner a complete overview.
Backport:
Some Debian users do not want to
switch from Woody to a version that is still
officially classified as unstable, just to keep
their machines up to date. To help these users,
http://www.backports.org/ provides newly-
built Debian packages that Woody does not
have, or where the Woody versions are obso-
lete.
www.linux-magazine.com
June 2004
85
Plik z chomika:
Kapy97
Inne pliki z tego folderu:
2010.10_Task Force-Command-Line Task Managers.pdf
(515 KB)
2010.10_Plan on It-Ultimate Gtd System with Org-Mode.pdf
(708 KB)
2010.10_Pdf Power-Creating Pdfs from the Command Line.pdf
(700 KB)
2010.10_Barely There-Lightweight Content Management with Barebones.pdf
(647 KB)
2010.09_One Fell Swoop-Batch Image Conversion with Converseen.pdf
(494 KB)
Inne foldery tego chomika:
Beginners
Business News
Comment
Community
Community Notebook
Zgłoś jeśli
naruszono regulamin