How to Record Audio Streams
Background
This all started when I tried out a (now defunct) beta product from StreamBox;
StreamBox-VCR allowed me to:
-
record multiple audio streams, simultaneously!
-
record Real audio streams, even if the stream's "disable recording"
flag was set
-
on a lossy connection, SB-VCR would "rewind" across lost data and append
the file where it left off, resulting in complete stream captures
with no dropouts!
Unfortunately, the fact that StreamBox thwarted Real's recording prevention
scheme
landed them in court, they lost, and were forced to pull the beta
product. This left me
with no means of recording streams unattended. Today, StreamBox
no longer provides
audio tools and refuses to support previously purchased products
such as StreamBox
Ripper.
Goals and Successes
Successes:
-
Create a means of recording a list of archived audio programs with minimal
setup
and no interaction
-
Create a means of recording a live audio program at a scheduled time
-
Record streams direct to MP3 format (to avoid a separate encoding step)
Goals:
-
Find a means of automatically correcting for dropouts
-
This requires decoding the stream, e.g. writing your own Real player,
the
courts have already ruled on this in the StreamBox case
-
Find a way to detect that a stream has ended and kill the current record
session
(the purpose of this is only to move on to the next session as soon
as possible)
-
This is something that HighCriteria could add, e.g. stop recording after
N minutes of silence
-
Find a way to re-record a (non-live) stream if it died (network congestion...)
before
completion
Current Solution
This is where things stand today:
-
Installed TotalRecorder
from HighCriteria
-
This program records any single stream by intercepting the audio samples
going
to the audio adapter (i.e. recording the digital version of what
you're hearing on
your speakers)
-
Downloaded the free Lame DLL
MP3 encoder to record directly to MP3 format;
configured it to record 24 kbps at 16 khz mono (sufficient for many
streams).
-
Created batch files, using the lesser known
"start" command to launch the stream and
the recorder simultaneously
-
Used an OS dependent scheduler to launch the batch file
Batch Files
Feel free to modify my batch files to match your favorite site's
requirements. This zip file
contains a batch file for current and older Fresh
Airprograms and another for
John
Schaefer's New Sounds program from WNYC.
Example: Recording Fresh
Air archived shows (without a scheduler)
For shows dated 2001 January 01 and later the show segments
are currently in this form:
http://www.npr.org/ramfiles/fa/20010501.fa.02.ram
where "20010501" refers to the date in YYYYMMDD format, and the
"02" refers to
the segment within that show. If you want the entire show not just
one segment, then
this is the form to use:
http://www.npr.org/ramfiles/fa/20010501.fa.ram
The latter form must be used for archives dated between 1998 Jan
02 and 2000 Dec 29,
since those shows only exist in their entirety.
Using the fa.bat batch file several shows can be recorded
serially. For example
fa 20010501 02 60sBandLove 20010424 00 NSA
will record the segment on the 60's band Love (I actually
owned their first two
albums) and the Apr. 24th show with featuring an NSA investigator
(to separate
files).
Example: Recording New
Sounds archived shows (without a scheduler)
Using the batch file ns.bat in a similar fashion
ns 1633 PaulineOliveros 1531 JoanOfArc
will record two one hour programs to separate files. Here the four
digit numbers are
the program number and again the text is a short description.
Notes
FILE NAMES: The created sound files include the date-code, segment,
and text
description fields, but this can be simplified as you see fit.
SCHEDULER: Using a scheduler (I use the native one on Win 2000) to
launch is left
as an exercise for interested audio streaming enthusiasts.
CAVEAT: All audio programs tend to move around with regard to the
URL that launches
them. This is because their host sites reorganize and/or farm out
their audio streaming
services to other host sites. When the batch files no longer work,
it's time to edit the
URLs within.
Home