Audio stream recording from the Internet...
This is the first attempt I've made to document my approaches to capturing audio streams.
Capturing the stream versus Recording the Audio
Internet
audio is subjected to what is called "lossy compression." The various
formats - mp3, Windows Media, Real, etc. - are ways of reducing the
huge amount of data required for full-fidelity sound while still
sounding halfway decent. Each has its advantages, disadvantages, and
adherents, and there are all kinds of comparative tests on which sounds
best at different bitrates, etc.
At first, I just used an audio
recording program to record the audio directly from the player program
onto the hard disk. If you recorded it to a CD-quality uncompressed
file - usually 16-bit WAV files at a 44.1 kHz sample rate
(lossless format, no "lossy compression" involved - you would have no
loss of quality from the original, but you've increased the file size
tremendously. Now, if you were to recompress the files to, say, a
typical 128 kbps mp3 file, you will have gained some hard disk space,
but added ANOTHER step of "lossy" compression. So even if you were
listening to 128 kbps mp3 off the Internet, saving it as an
uncompressed WAV file, and re-compressing it to 128 kbps mp3... you
have just submitted the audio to TWO steps of lossy compression, which
is less than desirable. If the original source were of lower quality,
say a 48 kbps Windows Media stream, you would probably be even worse
off if you re-compressed it into another "lossy" format. Various added
audio distortions and artifacts can result depending on how closely you
listen.
Thus began my quest to capture the streams directly, at their original quality.
The tools are out there. This site, all-streaming-media, was my starting point. You want to make it easy? Just go there and buy their recommended commercial products!
But
no, not me! The open-source software movement has provided free
community-supported tools to do this, if you want to get your hands
dirty with scripting, using command-line interfaces, and so on. That's
the approach I've dealt with here.
A lot of this is closely associated with Linux. I use Windows for most day-to-day work, but with many forays into Ubuntu Linux
on the desktop as well. Since the kids usually want to do their thing
on most of the good computers, constantly logging in and out, I wanted
to have one or two machines dedicated to server and multimedia
recording functions 24/7. And with some older slower machines lying
around, why pay for more copies of Windows XP or <gasp!> Vista
for these older machines? A server with Ubuntu Server (no fancy
grapical interface) is an old Celeron 500 MHz machine with only 256 MB
RAM, and keeps up pretty well for light-duty file and web serving. And
my "old faithful" first PC, a 600 MHz Pentium 3 with 256 MB RAM, runs
Ubuntu in full graphical mode, and is accessed remotely via VNC from
any computer in the house, and sometimes the world too! My personal
e-mail is also on this machine.
The combination of the
multimedia programs VLC Media Player and mPlayer with the powerful
scripting and scheduled task capabilities of Linux takes care of
capturing Internet radio automatically at various scheduled times.
These programs are available for Windows as well, and much of this can
be done with the Windows "scheduled task" function and "batch files"
capability. But a dedicated machine for recording would be most
desirable, otherwise all the background tasks popping up while you or
the family are doing something else might be a problem, and the
constant logon-logoff of users would also cause problems.
VLC
is a veritable "Swiss Army Knife" of media playback, saving, streaming,
and transcoding capabilities. It is also more complicated to use, with
a mind-boggling array of interfaces and capabilities and a labyrinth of
command-line structures that can just fry your brain. mPlayer is a
bit simpler, and with some help from cron (Linux task scheduler) or
"Scheduled Tasks" (in Windows) you can do most of what you need with
it. But VLC is worth learning, too, as I found some Internet radio
sources which for mysterious reasons mPlayer could not handle that VLC
could. Helps to have those alternate tools on hand...