Realtime Audio Conversion And Serving
Hobadee writes "First of all, Happy Christmas and Merry New Year! This year for Christmas, my dad and I decided to give my mom a Linksys WMLS11B. (Radio which can play MP3 streams) Since my mom listens to a lot of international news radio on the Internet, we figured this would be great so that she wouldn't have to sit at the computer all the time. The problem is that most of the stations she listens to are either RealMedia or Windows Audio streams, while the player only supports MP3 streams. (It claims to support WMA, but we haven't had any luck in our fiddling yet.) So here is the question: Would it be possible to get other types of files to play on the device? My idea is to have an intermediate server download, convert to MP3, and re-stream the files, but I'm not sure of the implementation. Would this be easily do-able with something like Icecast and Lame?"
I did something like this for my office, streaming Christmas music using Icecast, Lame, and Shout. Here's one possible installation:
1) Setup Icecast as usual. Take note of the encoding password.
2) Install the Shout Perl libraries.
3) Use the example2.pl that comes with Shout.
For the example2.pl, I think it comes with the basic Perl library installation). By default it takes it the MP3 files specified on the command line, uses LAME to convert them to a bitrate you specify, and sends them to a mountpoint on the LAME server. I modified mine so that it loops indefinitely, and of course I hardcoded my Icecast IP address, mount point, and encoder password. You'll probably need to tweak it a bit to convert OGG / WMA / RM streams as well, but it should be fairly straightforward.
Gan Family Homepage
SlimServer / Squeezebox does precisely what you're asking for.
You might be able to get it to work with the WMLS11B if that device is capable of playing an arbitrary mp3 stream by URL, as SlimServer can convert and rebroadcast streams in
various formats.
But if you have the Squeezebox it will work so much better, because it's designed to do all of this, and you can choose the stations (or your own music collection) from the display.
SlimServer is also open source, so it supports just about every file format and radio format in existence. There is a free emulator included, SoftSqueeze, that you can use to try it
out.
PS I work for Slim. Mod up if you want me to answer questions in this thread; mod down if you don't care for self-promotion.
It is definitely doable, but would require a time offset. Transcoding the streams would cause a loss of quality and could not be done entirely realtime.
Check out http://darkice.sourceforge.net/ You should be able to get it to do what you want.
Ogg is not worthwhile to implement. It's only "free" if Linksys engineers' time is worthless.
Sincerely,
Joe Sixpack
VP, Engineering
Linksys
I'd imagine it's a result of listening to internation broadcasts that are already using the WMA or streaming RA formats. Jeez.
Publishers of commercial streams want to exclude people from downloading their streams. Unlike Windows Media Player and RealPlayer, MPEG-1 and Ogg (the most common containers for MP3 and Vorbis respectively) do not define a digital restrictions management layer. Thus, commercial publishers tend to shy away from MP3 and Ogg Vorbis. In addition, it is claimed that the MP3 royalty is greater than the Windows Media Player or RealPlayer royalty, and Ogg Vorbis doesn't have enough of an install base to be worth technicians' time.
One of the default options in Winamp's Shoutcast plugin is to broadcast from the sound card mixer. Wether it's microphone, line in, or WAV, it encodes and broadcasts it. Install the server, install the plugin, start streaming, then play whatever station you want to hear through whatever player you need to use. Shoutcast/Winamp handles the rest.
IIRC (I don't have the computer I use for this handy), the magic piece of the puzzle is xine or mplayer and the 12 MBish windows codec pack. One or the other of these can read realaudio streams and transcode them to mp3 files. From there it's a matter of pushing the mp3 files out over shoutcast, or whatever the relevant stream format is, which will hopefully be fairly easy if the Linksys box plays shoutcast streams.
FFmpeg may do what you want. It will take a file and convert it in realtime to various other formats (and stream them).
Another options would be any media streamer like icecast.
If none of these let you specify a media stream as a source input, you can convert it by a line-out -> line-in hack.
If you have a random Windows box sitting around doing nothing, you can setup Winamp along with Shoutcast to achieve exactly what you want. Use WA to listen to your streams/play songs and just have Shoutcast rebroadcasting all the time as a high-quality MP3 stream. So simple any idiot can do it, even me.
Hard work pays off tomorrow, but procrastination pays off NOW!
http://sparks.blogmatrix.com/
All you need is a copy of Winamp and the Shoutcast server/DSP. Have Winamp tune into whatever source you want (In the case of proprietary stuff like Real Audio you'd have to have the realaudio player to play, and set Winamp to record off "wave"), then use that same copy of Winamp to just stream via shoutcast.
There's a free software linux-based firmware for this device here:i p :)
http://www.turtlehead.co.uk/downloads/Wmamp-0.3.z
Great hacking potential for putting something like helix on it, and taking the pc out of the picture altogether
wmamp.img: Linux Compressed ROM File System data
Check out Helix Player
a litle program called totall recorder will record any sound you hear on a sound card it will do it in mp3 format if that helps it cost about $12 us
http://www.mp3-converter.com/total_recorder.htm
It is called ask slashdot for a reason moron. Maybe this dude did not even know what to search for to start with! I have not heard of DarIce or Slim Devices and I would not have known what either was based on the name. Take a chill. Have a merry fuckin Christmas.
I would have gone for a low tech solution by pluging the computer's audio line-out into a FM wireless mic/transmitter. It's not as fancy, without remote control and bells and whistles, but costs less and could be listened to by any FM radio in the house. (And neighbouring houses depending on your power and antenna.)
One line blog. I hear that they're called Twitters now.
Hard, very hard. You need to do alot of work.
First, you need to install MPlayer (1.0-preX), so you can play most of those streams. I'm not sure about RealMedia files, but Windows Media it should play 99% of.
Then, you need to set up MPlayer to shoot out raw audio and pipe it into LAME, and then IceS. The latter two you may want to try coding up a script with Icecast's Shout perl module, which should do the job roughtly.
--
# Canmephians for a better Linux Kernel
$Stalag99{"URL"}="http://stalag99.net";
Perhaps it's the my old crotchityness (if that is a word), but I've taken to writing parties that broadcast in the Real format. It usually starts out with "I'm not sure how you got swindled into broadcasting in the Real format, but..." and providing some links to show how really terrible the real client is to the user's computers.
I know this won't help your situation now, but gosh I can't wait until otherwise credible media producers--such as NPR or the BBC--drop Real for good. As far as I can tell the only benifit Real gives its customers is the claim that the streams can't easily be copied (though I understand that can 'easily' be circumvented).
Good luck with your device, and hopefully somebody can help you with an easy WMA or Real to MP3 conversion.
The Internet is generally stupid
VLC Stream output:
http://www.videolan.org/streaming/features.html
But one has to ask: Why didnt the original article poster (Hobadee) investigate what product would have suited his mother's needs better?
As they say a problem avoided is a problem solved, that is the geek way.
I spent several hours today trying to figure out how I could take NPR's All Music Considered programs which are in Real Media and convert them to MP3 to download to my MP3 player.
. com (look for rm recorder)
I wasn't terribly successful. Nothing said it could do streaming media and restream it. Several products claim to be able to take streams and record them, and then convert them for you to play back later.
I didn't find anything GPL'd.
Non GPL'd products can apparently be found at:
totalrecorder.com
replay-music.com
wmrecorder
From a blog entry I wrote a few weeks ago:
_ sunshine/video/Summer_Sunshine_video_458.wmvi s will give you a file called "cores" in your home-directory)
... it allows you to record the output audio stream of ... and line out jacks on the sound card.
/usr/lib/RealPlayer8/Common/rmacore.so.6.0: Cannot open shared object file: No such file or directory
/usr/lib when it was in /usr/local/ so I copied the directories over to where it wanted to find them and everything worked ok.
.m3u file so I had to download the m3u file with wget and look at it and then use streamripper http://url.ogg for it to work. Cool - now I can listen to the BBC and CBC and ABC (Australian Broadcasting) and Netherlands Broadcasting when I want to and where I want to.
/dev/dsp -t raw -c 2 -
I wanted to record a couple of radio shows so that I can listen to them later on my linux machine. Basically I would like to listen to a mix of realplayer, Windows Media, Ogg and MP3 streams and save them as mp3 or ogg files so I can listen to them later on my computer or iriver ogg/mp3 player.
First I tried mplayer's dumpstream command
1) mplayer -dumpfile cores -dumpstream http://wm.warnermusic.com/France/the_corrs/summer
(th
2) mplayer -vo null -vc null -ao pcm -aofile audio.wav cores
(this will convert the videofile to a wav audiofile)
3) lame audio.wav cores.mp3
(this will convert the file from wav to mp3)
However this process core dumped on realplayer recorder over 10 minutes. Also it doesn't know about ram files so you have to download them first (wget filename) and then open them to file the real link to the rm file. So I went on to look for some other tools.
Most of the tools seem to be wrappers around vsound and/or sox and lame/oggenc. Another tool I looked at is streamripper, which works for mp3 or ogg streams.
First I grabbed realcap which is a shell script front end to those tools. Downloaded, compiled and installed vsound.
Trick one - you have to ensure that realplayer is using OSS drivers
http://www.osl.iu.edu/~tveldhui/radio/
After that seemed to work I tried directly with vsound. vsound acts as a kind of virtual audio loopback cable
vsound --timing -f myfile.wav realplay http://www.radio.org/ra/show.ram
oggenc myfile.wav
I also checked out the trplayer - which is a command line wrapper to realplayer. http://www.linux-speakup.org/trplayer.html
Got the error:
Failed to load rmacore.so.6.0:
Well I figured out that they must be looking for the real player in
Also I tried out streamripper
http://streamripper.sourceforge.net/, which seemed to work fine ripping various streams. It didn't seem to be able to read the
Finally I had a look at mp3record - a bash shell wrapper for lame and sox
Basically it does this:
(sox -r $strFreqRate -t ossdsp -w -s
| lame -s 44.1 -x -b $strBitRate -m s - $strFileName) &
Things to get working...
1) streaming directly to ogg with no intermediary wav step.
2) see if I can get this running from a cron job...
Sera
Slashdot, where armchair scientists get shouted down and armchair theologians get modded up.
Where's my sex-with-a-mare option?
"It is not how things are in the world that is mystical, but that it exists." -Ludwig Wittgenstein
I was googling and just came across this SlimServer plugin that claims to be able to add support for RealAudio streams to SlimServer. Haven't tried it, but it looks promising.
Does anybody know of a music file server for the WMLS other than twonkyvision-musicserver? It "works" but the combination of it and the WMLS are not terribly reliable.
-russ
Don't piss off The Angry Economist
Wow, you're blind.
Hint: that last one is not Shockwave.
It would be cool if it didn't suck.
There is a much cheaper way of doing this. Just get a FM transmitter (Bestbuy, Radioshack or any electronics store should have it) that has power adapter and hook it to the speaker output. Then listen to this music on your favorite Radio/Music system that has FM radio. As far as not being able to read the song/artist title information goes, you already mentioned that you don't want your mom to sit in front of computer (or your linksys radio).
Maybe you still have time to return it and get something that will cost less (like the FM transmitter I mentioned) and give you more and with the remaining money, you can take your mom out for dinner.
Linksys isn't giving their product away. That point won't work here. I didn't say free anywhere.
funny munging
Such as this one or maybe these.
Or maybe go XM Radio?
I don't think any of these radio/internet things are ready for primetime yet........
It's either on the beat or off the beat, it's that easy.
I moderate therefore I rule!
--
for ogg i guess they dont relize how many people have winamp installed
Maybe, shoulda, woulda waited until the Jan 2005 Macworld where I hear there may be an announcement that Apple is making the iPod compatible with Sirius. Much better than listening to the crap pumped out by Clearchannel.
For that matter, mplayer with FIFOs and a little CGI may make an adequate ad-hoc solution, though I suspect real-time MP3 encoding is a lot trickier, and a package designed for that might be a good idea.
Sig:Why copyright isn't a fundamental human right
Somebody's been h4xing the poll-ahurtz!
Either that or somebody's been stealing all the vote-ahurtz.
Santa's suicide mission go!
I have copied Realplayer files using Gramofile. All you need to do is set up Gramofile to start recoring to a wav, then get realplayer on the station. And yes, you will want to adjust your mixer settings so the sound is good. I suggest running a test segment. I am not sure if this could be scripted, as I don't know if Realplayer or Gramofile takes command line options, but I do know they can be passed through aumix to the mixer. Rob
I've been working on BlogMatrix Sparks! for the last few months and it's definitely what this person is looking for:
Credit where credit is due: this is an integration project on top of MPlayer and Lame. Ongoing project news is in our blog.
- David Janes
However, DRM obviously refers to the rights of a publisher and therefore it refers to "rights".
Considering how DRM gives publishers more than their original rights that's a bit weird. I think digital restrictions management really describes the technology very well, because that's just exactly what it does. If nothing else, it's more accurate and to the point.
Switch back to Slashdot's D1 system.
Yes. It's called MPlayer.
iRecordMusic is somthing very similar for the Mac, and it integrates well with iTunes.. I don't work for theese folks, but I did buy the software, and it 'Does What It Says On The Tin," so to speak.
-- "...I'm a bad guy because I, well, I sing some rock-and-roll songs." M. Manson
seriously, that sound recorder app included with windows-- and it's 12$ cheaper
every day http://en.wikipedia.org/wiki/Special:Random
I was reading an article http://www.henshall.com/blog/archives/001056.html on dailywireless.org the other day talking about a 'new' craze on 'skypecasting'.
The author uses (windows) 'Virtual Audio Cable' to dump the audio from skype to wav (then to mp3).
Basically it acts as a virtual sound card which you can pipe (via a second 'virtual cable' instance) to another app as an input audio device.
It amounts to having a software cable from your speaker out to your mic in. Any windows based casting software that can take audio in from the soundcard should be enough to keep the tunes on their merry way from there...
I've had one for about 6 months now, and now, one of my friends picked one up as a Christmas gift.
I'm completely dissapointed in these devices. You can't control the streams, can't control any of the functions without having a Windows Client, and my attempts on breaking the protocol don't seem to work at all.
The stream listings on it go away (One of my favorite classical streams on this device was WBHM out of Birmingham, Alabama. They moved the streaming location, or moved to WMP, and then it borked. Went to Mostly Classical from Digitally Imported...worked for about a month, then borked). I noticed that they tried to push their own streaming service, but, I didn't sign up for it.
Once you do get it working, the sound quality isn't that bad. It even has optical outs, but I'm not sure how those work -- haven't tested them yet.
I disable sigs...do you?
"Postings like your remind us"
Are you posting this on behalf of a secret society of illiterates? Jeez, so I was totally misinformed about XM having no affiliations with ClearChannel, and live in hope of listening to Howerd Stern live on my iPod. Big Deal. Geat over it. Have fun with your Rio Grande XL
Media Center 11 has an elegant-but-beta Library Server that does realtime transcoding of bitrates and formats between its server and attached clients, across LAN or WAN. You can couple this with its "Media Scheduler" module to record internet radio streams and then serve them up in whatever format and bitrate a client specifies. What's nice is that you can also stream video and photos to clients. MC will also do bitrate transcoding while streaming from attached Tivo HMOs.
MC also has a beta uPNP module that lets you control attached media streaming devices and offload the transcoding duties to them.
And oh yeah, SlimServer is GPL'd. You can script this to do on-the-fly custom transcoding. It's more flexible than pre-rolled, but less friendly.
Da Blog
What challenge? Opened without a problem in mplayer... Stop spreading FUD just because you cannot configure your box correctly!
"This calls for a very special blend of psychology and extreme violence" - Vyvyan "The Young Ones"
Could we use this system for a sort of house PA system. I am thinking I could use such a thing. You know, make announcements that must be heard, through these wireless speakers. Maybe programs that at set times, play some music during a some time, and it must be heard. Do you kinda get what I am saying? A PA system, with the capability of making timed pre-recorded etc announcemnts.
Actually, there is a plugin that does this. I have it installed so I can listen to Swedish radio, which is in Real only.
/Hans
Check out AlienBBC which uses mplayer to reencode to mp3.
Works only on linux though, but has been made to work on Mac according to the site.
I don't have one
I think linksys thought a lot of things weren't significant enought to invest in with the WMLS11B.
great idea but poorly executed.
=1000101
You can do most of this in one step with mplayer's encoder, mencoder. You can reencode any format mplayer can read. It will even encode directly from real rtsp and microsoft mms streams if compiled with the appropriate libraries. I sometimes find it useful to "play" real video streams and output them to divx for later viewing. All you have to do is something like this:
mencoder http://sourcestream/ -ovc none -oac mp3lame -lameopts (see man page for the settings you want) -o output.mp3
BTW, there is a much simpler way to save anything "streamed" over http in it's original format if it doesn't need to be reencoded:
curl http://streamurl/ > output.mp3
(stream.ogg, whatever)
-- OpenVerse Visual Chat: http://openverse.com
streamtuner (frontend to streamripper) is really nice
life, what that??? relly?? where can i download one of them?
Thanks, Streamripper will break the shows into different files, add the IDV3 comments to the files and allow you to specify a specific number of seconds to record.
As I mentioned in the post - mplayer (latest) was core dumping on realplayer files over 10 min. I'm guessing mencoder might do the same. Searching forums, other users experience the same issue.
I wanted to record a couple of radio shows so that I can listen to them later on my linux machine.
Have a look at snatch, done by xiph as part of the vorbis project. It's only available in CVS (or subversion now!). You can find it here under trunk/snatch. Worked pretty well when I tried it last, and it has a scheduling GUI front-end.