[I've re-edited this archived message to improve its contents.]

From: Rick Moen rick@linuxmafia.com
To: conspire@linuxmafia.com
Subject: Re: [conspire] RealAudio for Linux
User-Agent: Mutt/1.4i
Date: Thu, 3 Apr 2003 21:23:33 -0800

Quoting Sean Wolfe-Justice (mailjones@mouseandfrog.org):

> I have been snooping around on real.com's Unix forum. Does anybody
> have much experience making Realaudio work with Linux? Any pointers? I
> plan on installing it on my Debian box. (Once I *have* a Debian box
> 8^).

I haven't paid a lot of attention to the RealPlayer stuff because of the rather evil nature of much of that company's past deeds, including past incidents of including spyware.

I'll assume you're on i386 (i.e., x86), as opposed to any of the other ten CPU architectures that Debian supports.[1]

There used to be an official Debian package for RealPlayer that automated the process of pulling down the (very restricted, not legal for anyone else to distribute — and therefore subject to becoming permanently unavailable any time Real Networks wants[2]) RealPlayer tarball and install it. That seems to have been removed — but is still available from the unofficial marillat.free.fr package source.


[RM 2005 note: I'll soon be revising these instructions. 1. RealPlayer v. 10 is out, as RealPlayer10GOLD.rpm or RealPlayer10GOLD.bin. 2. Christian Marillat's marillat.free.fr site is gone, but it looks like ftp://ftp.nerim.net/debian-marillat/ is a functional replacement. Hmm, Christian says on ftp://ftp.nerim.net/debian-marillat/old-news.html that "I don't intend to package Realplayer 10. Somebody is working officially for that package see the Announce (http://lists.debian.org/debian-devel/2004/07/msg01736.html) in debian-devel." Per that announcement from packager Thomas Maurer, RealNetworks constructs RealPlayer by adding some proprietary codecs to the open-source HelixPlayer it sponsors lately that is being developed by Helix Community, http://helixcommunity.org/ . Maurer says he offers i386 packages from http://helix.alioth.debian.org/ . As of 2005-01, Maurer offers Helix Player .debs there, and comments: "RealPlayer will hopefully follow soon, but it's an application supported by RealNetworks, thus it needs special preparation."

However, http://helix.alioth.debian.org/deb/real/10.0.2/ furnishes real-player_10.0.2-1_i386.deb for Debian i386. Retrieving it and doing "dpkg -i real-player_10.0.2-1_i386.deb installs "RealPlayer 10.0.2.608 (gold)", a GTK+ application. It also auto-installs "Helix DNA Plugin: RealPlayer G2" into Mozilla Navigator but not Mozilla Firefox.

It is self-contained, and built from the https://player.helixcommunity.org/2004/downloads/ upstream site, which offers RealPlayer 10.0.2 Gold as either RealPlayer-10.0.2.608-20041214.i586.rpm , realplay-10.0.2.608-linux-2.2-libc6-gcc32-i586.bin , or RealPlayer-10.0.2-source.tar.bz . Note possible bug if RP8 is already installed on the system: "In the event that this configuration results in any problems with the embedded player (plugin) please delete the file rpnp.so from your mozilla plugins directory."

RealPlayer10 differs from the all-open-source Helix DNS Client player in adding proprietary, binary-only codecs for aacPlus, Sony ATRAC3, DolbyNet, ACELP(r).net, and possibly others I might have missed.]


1. Unofficial Debian Package Method:

The unofficial "realplayer" package available from marillat.free.fr installs in Debian fashion the rp8_linux20_libc6_i386_cs2_rpm file, i.e., redirecting its libs, binaries, etc. to more sensible directories.

Go to:
http://huxley.real.com/real/player/unix/unix.html?src=rpbform aka http://scopes.real.com/real/player/unix/unix.html?src=rpbform .
Select "Linux 2.x (libc6 i386) RPM". Filling out the mandatory marketing survey gets you access to a copy of rp8_linux20_libc6_i386_cs2_rpm. Download it into /tmp or wherever.

Then, add this to /etc/apt/sources.list:
deb http://marillat.free.fr/ testing main
Then, do "apt-get update; apt-get install realplayer".

2. Tarball Method:

Go to:
http://huxley.real.com/real/player/unix/unix.html?src=rpbform aka http://scopes.real.com/real/player/unix/unix.html?src=rpbform .
Select "Linux 2.x (libc6 i386)".

Filling out the mandatory marketing survey gets you access to a copy of rp8_linux20_libc6_i386_cs2.bin. Download it into /tmp or wherever.

$ su -
# cd /tmp
# chmod u+x rp8_linux20_libc6_i386_cs2.bin
# ./rp8_linux20_libc6_i386_cs2.bin

By default, that installer program installs the RealPlayer binary to:
/usr/local/RealPlayer8/realplay
...and adds the necessary plug-in and MIME type support to your copy of Mozilla, if any. You will probably find it useful to create a symlink in /usr/local/bin pointing to the realplay binary. (I can't remember whether that works, but it probably does.)

Updating to RP9:

Download and install
http://docs.real.com/docs/playerpatch/unix/rv9_libc6_i386_cs2.tgz and unpack, then follow instructions in the readme.txt to update the RealPlayer8 codecs to v. 9 levels . You'll drop the codecs into wherever the v. 8 ones went, e.g., /usr/local/RealPlayer8/Codecs/ .

If you've used the marillat.free.fr package to install RealPlayer8, then drop the RealPlayer9 codecs into directory /usr/lib/RealPlayer8/Codecs . Otherwise, the correct directory is probably /usr/local/RealPlayer8/Codecs/ .

The exact MIME setup to create in Web browsers if you need to do it manually, is at http://linux.bryanconsulting.com/stories/storyReader$21 .

2004-11 note: Above link appears to be severely broken, but a suitable substitute is at http://www.yolinux.com/TUTORIALS/LinuxTutorialMozillaConfiguration.html.

[1] Real Networks also provides RealPlayer for DEC Alpha, PowerPC, and SPARC Linux — and variants for all platforms in various languages.

[2] The RP8 files can also currently be found at some third-party ftp/http sites, but Real Networks has the legal right to shut those down if/when it wishes, since the software was issued without the right of redistribution.

[remainder snipped, as being on a different topic.]




RealOne alpha release (July 2003):
http://proforma.real.com/real/player/unix/unix.html
See comments at
http://linuxtoday.com/news_story.php3?ltsn=2003-04-24-012-26-NW-DT-SW&tbovrmode=1




From: rick@linuxmafia.com (Rick Moen)
Date: Fri, 4 Apr 2003 14:44:14 -0800
Subject: [conspire] RealAudio for Linux
To: conspire@linuxmafia.com

Quoting Sean Wolfe-Justice (mailjones@mouseandfrog.org):"

> Hmmm. I'd heard similar. Are there any alternatives to RA for
> streaming audio? It's one of my favorite things on the Internet. But
> everybody seems to do just realaudio.

When you need RealPlayer, you need RealPlayer.

This is partly through the good offices of Real Networks's legal department, which has done its level best to sue into oblivion anyone who's done the relatively easy task of reverse-engineering their protocols (which are a slight modification of open-documented ones) for compatibility with other software. It's still possible to find redistributed versions of third-party software that can read or convert RealAudio / RealVideo, but it's not easy to find, on account of the legal threats. (Even modifications to system sound drivers to allow capture of sound output to disk are considered legally risky, and available only very quietly.)

The topic of audio-video on *ix has been massively muddled not just by legal follies, but also by people talking about it without any understanding of what the pieces are and what they do. People talk about filename extensions and client applications as if they uniquely specified a codec, a data-storage format, a streaming protocol, or all of the above. More often, they have no clue that such concepts exist, and just say "It's QuickTime" or "It's a RealVideo stream". This is sort of like saying "What do you mean, what type of road was it? It was a Chevy road!"

Anyhow, your question "Are there any alternatives to RA for streaming audio?" can't be answered as posed, because it's unclear which question you're asking about solving.

You could be saying: "Suppose I wanted to serve up streaming audio. What software is available that will do this on Linux, and what does it do?" You can use Icecast, http://www.icecast.org/ . You can use Darwin Streaming Server to server streaming MP3s over http or RTP/RTSP, http://developer.apple.com/darwin/projects/streaming/. You can use Real Networks's server software for quite a variety of things (but it's expensive). You can use MPEG4IP to stream MP3, http://mpeg4ip.sourceforge.net/ . You can use FFmpeg, http://sourceforge.net/projects/ffmpeg or FFQuickTime, http://sourceforge.net/projects/ffquicktime/. There are probably lots of others; I'm not an expert at this.

Or you could be saying: "What do I install on Linux as client software to be able to listed to common audio streams over common streaming protocols compressed using common codecs?" You have part of the answer in the form of RealPlayer. There are lots of others, starting with XMMS, the proprietary mpg123 utility (with various graphical front-ends to it such as Apollo), open-source imitators such as mpg321, etc.

If your question is "What do I need on Linux to listen to public audio streaming source Foo?", then it obviously depends on what (and how) Foo is streaming.

Most of the "appeal" of both Real Networks's streaming framework and Microsoft's imitation is that both companies aggressively sue people creating interoperable software. (A Microsoft legal threat shut down one open-source Linux project that had developed working support for Microsoft video streaming, but a couple of others persist.) Why? Because then they can sell their software solutions to the MPAA and RIAA as a "safe" way to offer copyright-covered creations without the risk that the user might capture it to disk and use it in ways not authorised by the copyright holders. Have you noticed that "free" movie trailers and songs tend to be offered for streaming for a limited time and then no longer available? "You want to replay that trailer you looked at last year? Too bad. You had it on your hard drive only for buffering purposes as it streamed in, and although theoretically you might have been able to save it from the cache for viewing later, we'll never tell you how."

That having been said, Linux solutions — and even some involving part or all open-source code — have been created for almost all such works. But that's against determined opposition from the industry.




From: John Moylan (john@rte.ie)
To: ilug@linux.ie
Organization: Radio Telifis Eireann
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5)
Date: 06 Oct 2003 12:14:32 +0100
Subject: Re: [ILUG] Mplayer and RTE news

On Sun, 2003-10-05 at 12:56, David Cathcart wrote:

> Tried latest mplayer on streaming Real Media (rstp://) works brilliantly
> both Linux and Windows versions. The odd thing is though that when playing
> rte news bulletins (you have to download the siml file and extract the
> rstp:// url) is that they start anything up to 30 mins before the news. As
> in when you start playing the file you see the game show that was on before
> the news. This can be seen in their siml playlist:
>
> <video id="video1" region="video"
> src="rtsp://streaming2.rte.ie/2003/1004/9news56.rm"
> clip-begin="00:22:56"
> clip-end="00:41:44" />
>
> note 'clip-begin="00:22:56"'.
> Anyone know why they do this or how to start mplayer playing at a
> different start point?

The seeking code in the SMIL/RAM file is interpreted by the Real Player client. The shows are all encoded automatically and then indexed by an online journalist. If the start of the news has been delayed or a change in schedule has occurred, then the client indexing also negates the need for the journalists to cut files, they simply enter the index times into a template system and auto publish the SMIL/ram files.

MPlayer does not interpret the indexing because it is a media player and it is not bothered interpreting client specific play lists. I recommend you install the Linux RealPlayer: AFAIK it does not use any spyware, it's free too.

If you are running with Redhat 9 you will also need to create the following wrapper script for realplay in you $PATH:

#!/bin/bash
export LD_ASSUME_KERNEL=2.2.5
/usr/bin/X11/realplay

Also, you will need to download the RealVideo9 codecs (you would have needed these for MPlayer anyway.)

Avoid the Linux version of RealOne for the moment - it's really flakey.

Kind Regards,
John





Date: Thu, 06 Oct 2005 19:25:54 -0400
From: Robert Glueck rglk@web.de
User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317)
Newsgroups: comp.os.linux.misc
Subject: Re: Recording streaming audio

Kevin the Drummer wrote:

> Where does one find realcap?

realcap can be obtained from http://homepage.eircom.net/~wastedyouth/realcap/

It's a bash shell script that allows you to capture an audio stream from RealPlayer to audio files in wav, ogg or mp3 format. To exploit its full functionality you should have realplay, vsound, lame and oggenc installed. I put realcap into /usr/local/bin.

The following tests worked for me:
realcap -c 45 -q 2 -a BBC -t Radio3 -d http://www.bbc.co.uk/radio3/ram/r3g2.ram
This writes about half a minute of this stream - after some 15 secs of buffering - in ogg format using oggenc.

realcap -c 45 -m 32 -a BBC -t Radio3 -d http://www.bbc.co.uk/radio3/ram/r3g2.ram
This writes about half a minute in mp3 format at 32 kbps using lame.

realcap -c 45 -m 48 -a BBC -t Radio3 -d http://www.bbc.co.uk/radio3/ram/r3g2.ram
This writes the half min clip in mp3 format at better quality (48 kbps) again using lame.

realcap -c 45 -m 48 -a NPR -t Knuth -d rtsp://real.npr.na-central.speedera.net:80/real.npr.na-central/me/20050314_me_0 6.rm
(all one long line) This writes a half min clip from a different source.

Robert





From: Chiefy lgb@non.existent.invalid
Newsgroups: comp.os.linux.misc
Subject: Re: Recording streaming audio
Date: Thu, 06 Oct 2005 21:00:17 -0000
Organization: SlackHeads[TM] - Let the good times roll
User-Agent: slrn/0.9.8.1 (Linux)

05 Oct 2005 19:17 UTC, Robert Glueck typed:

> realcap (a shell script that uses vsound, lame and oggenc)
> works in my system with the above alsamixer settings in
> capturing a RealAudio stream in ogg or mp3 format when I
> provide it with a .rm or .ram URL.

As Spike has pointed out, mplayer will do this too (with the help of lame etc). I regularly save a .ra stream for later listening using mplayer. It can easily dump the stream in original format, or create a .wav for further re-encoding.





Date: Thu, 06 Oct 2005 20:35:47 -0400
From: Robert Glueck rglk@web.de
User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317)
Newsgroups: comp.os.linux.misc
Subject: Re: Recording streaming audio

Alan Searle wrote:

> I have been experimenting with Audacity and with Streamripper to try
> to either record directly from an audio stream (smil and ram) or to
> record from an analogue input (to mp3) and seem to keep running into
> problems:
>
> I find that, with KStreamripper, I can record (to mp3) URLs like the
> following: http://207.200.96.226:8038 (monkey radio) but when I try
> to record specific formats like smil (e.g.:
> http://www.wdr.de/wdrlive/media/wdr2.smil) both KStreamripper and Xmms
> seem to be unable to connect to the source. But this source URL would
> play OK with RealPlayer.
>
> I then tried (instead) to record an analogue input using Audacity but
> found that although my PC could receive the signal from an analogue
> source (and play the input over the computer speakers), I could not
> find how to get Audacity to recognise the audio source.
>
> If anyone has got any tips on either of these points
> (recording/editing/splitting streaming-audio and/or recording an
> analogue input to mp3) then that would be a great help.
>
> Many thanks, Alan Searle

I have the same objectives as the OP, i.e. to record streaming audio from the internet using a Linux box. I have no trouble doing this with most sources for which I have a URL (e.g. http or rtsp); realcap, MPlayer, and Streamtuner generally handle these. But I haven't succeeded with "direct stream recording", i.e. situations where I don't have a URL.

For example, I'd like to be able to record some on-demand audio programs from the BBC (what they call "listen again") which can only be accessed via their "Radio Player" which uses the RealPlayer embedded in the browser as a plug-in, i.e. not as a stand-alone player. In this situation, one can't ascertain a URL that a recorder could connect to, and the only option would be to capture the audio stream directly from the soundcard.

In any case, here are the programs that I have explored:

1. realcap (using vsound), e.g.

realcap -c 45 -m 48 -a NPR -t Knuth -d rtsp://real.npr.na-central.speedera.net:80/real.npr.na-central/me/20050314_me_0 6.rm

2. MPlayer, e.g.

mplayer -noframedrop -dumpfile out.rm -dumpstream rtsp://real.npr.na-central.speedera.net:80/real.npr.na-central/me/20050314_me_0 6.rm

3. Streamtuner, an internet audio stream directory browser This program (with GUI) allows you to access thousands of internet radio stations/programs and other sound sources. It has a "record" option that will capture the audio stream you're listening to in mp3 format.

4. Streamripper, a utility that rips online audio streams to separated mp3 files I haven't tested this as yet.

5. rawrec/rawplay, a buffered raw audio recorder/player I played around with this for an hour but couldn't get it to work. It looks good though, and I'll try again.

6. Audacity, a full-fledged audio editor This program has a complex interface which I certainly haven't mastered. It has a "record" button which presumably allows you to capture in raw audio format whatever audio goes through the soundcard. In fiddling around with this program, I did manage once to accomplish just that although the recording was horribly distorted, and I just don't remember how I got there.

Robert





From: gbzzl me@nospam.invalid
Organization: not organised
Subject: Re: Recording streaming audio
Newsgroups: comp.os.linux.misc
Date: Fri, 07 Oct 2005 04:57:14 GMT

On Tue, 04 Oct 2005 18:39:45 +0000, spike1 wrote:

> mplayer's easy enough... > mplayer -ao pcm:file=filename.wav > rtsp://rmv8.bbc.net.uk/bbc7/2300_thu.ra

This is the approach I have used for some time, though this command format is a slight change from older versions of mplayer.

Generally the downloaded .ram file is a container which holds the actual stream url, I prefer to listen in xmms, so throw all the steps into a shell script which will extract the address and invoke lame taking input from a pipe, the full script looks like this

#!/bin/bash

for i in `ls -1 *.ram`
do
        streamurl=`cat $i`

        if [ -e $i.mp3 ]; then
                echo "-Warning- output file $i.mp3 already exists, renaming old copy"
                mv $i.mp3 $i-`date +%s`.mp3
        fi

        lame -t -b 96 -m j --quiet /tmp/myfifo.wav $i.mp3 &
        mplayer -cache 1024 -ao pcm:file=/tmp/myfifo.wav $streamurl
        RC=$?

        if [ "$RC" = "0" ]; then
                if [ -e $i.mp3 ]; then
                        mv $i $i.done
                fi
        else

                echo "-Warning- mplayer exited bad"
        fi
done

Before using the script create the desired pipe with mkfifo /tmp/myfifo.wav

This will process a batch of .ram files in the current directory and generate corresponding mp3's, it's a good idea to give meaningful names and dates to the .ram files you download, so the created mp3's are easily identifiable. Different source material may not justify a bit-rate of 96kbps or joint-stereo.

Some issues remain however:

If mplayer exits bad (e.g. user hit's ctrl-c), the instance of lame invoked in that iteration remains running, it needs to kill that specific instance of lame in that event, and not any/all running copies of lame owned by that user

It runs in real time, which isn't so bad if you want to begin listening immediately, but is time-consuming if capturing a series or number of files or other activities affect available bandwidth with the possible risk of network errors, though the cache helps somewhat.





Date: Fri, 07 Oct 2005 03:32:41 -0400
From: Robert Glueck rglk@web.de
User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317)
Newsgroups: comp.os.linux.misc
Subject: Re: Recording streaming audio

I've got direct stream recording working now, and I'll post a summary of my findings in this thread tomorrow.

The critical factor is the alsamixer setting: rather than enabling capture for the device "line" as I'd done before, one has to enable capture for the device "mix". Now both arecord and rawrec work in my system.

I also came across an excellent program for direct stream recording which is part of the KDE suite, i.e. Krecord. It's actually part of my distribution (Xandros, a variant of Debian). It has some nice features including an input level indicator and a frequency spectrum display. The former is very handy for setting the proper record input level with the "Capture" slider in the alsamixer console.

Further, it turns out that the "Record" mode in Streamtuner actually relies on Streamripper which therefore has to be installed if one wants to use this mode in Streamtuner.

Robert