INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: HOW-TO: Streaming from MC, including metadata  (Read 10068 times)

Shasta Mcnasty

  • Junior Woodchuck
  • **
  • Posts: 54
HOW-TO: Streaming from MC, including metadata
« on: February 16, 2008, 12:26:24 pm »

As far as I can tell, the only thing that Winamp handles better than MC is streaming output.  MC handles listening to internet streams just fine, but has no built-in support for broadcasting a stream.

With Winamp, you just use the Shoutcast plug-in and connect to a Shoutcast server (either one running locally or a publically-accessible one).  You automatically get metadata transmitted, and you just hear the music (not any other sounds that your PC's sound card might be producing).  Works a treat. 

Unfortunately the rest of Winamp pales in comparison to MC.  I really want to use MC but also broadcast an internet stream.  What to do?

Well, after a bunch of searching here, I found a number of ways to attack the problem.  Here's the flow I've settled on:

- use MC to play music to the audio card on a local PC
- Use Oddcast to stream my audio card output to a local Shoutcast server
- use xpTunes to make a webpage on the local PC with the necessary metadata
- configure Oddcast to read the metadata from that webpage
- connect to the Shoutcast server from a remote streaming media player (e.g. Roku Soundbridge, Winamp, etc.)

Here's a brief rundown.  It's probably not complete but will give you some hints:

1) Download the Shoutcast server here: http://www.shoutcast.com/download/serve.phtml 
(you don't need the Winamp plug-in, just the server)

2) Install the Shoutcast server (follow the directions on the page above...the only thing that's a bit tricky is knowing that
the Shoutcast server requires a password for Oddcast to connect...you can see/change this in C:\Program Files\SHOUTcast\sc_serv.ini)

3) Run the Shoutcast server (C:\Program Files\SHOUTcast\sc_serv.exe), probably the install put a shortcut on your desktop or in the Start menu.  I don't remember now whether this was automatic. 

3) Download the Oddcast v3 (standalone version) here: http://www.oddsock.org/tools/oddcastv3/

4) Install it.  Note that you'll get notices that you need an mp3 encoder (lame_enc.dll) and maybe another encoder.  Just ignore these right now.

5) Download lame_enc.dll from here: http://www.level-1.org.uk/lame_enc.dll, and put it into the Oddcast directory (probably C:\Program Files\OddcastV3).

6) Run Oddcast, and double-click on the encoder listed under "Encoder Settings".  The only things you really need to do are to set (under Basic Settings) the Encoder Type to "MP3 Lame", the Server Type to "Shoutcast", the Server IP to "localhost", the Server Port and Encoder Password to match whatever is in the Shoutcast configuration.  By default the Server Port is 8000.  Under YP Settings, uncheck "Public Server".

7) Click on the Connect button, you should see Oddcast connect to your Shoutcast server (if you look in its log window) and you should see the encoder change from "disconnected" to reporting some transfer rate

8. Make sure that you've got "Stereo Mix" selected in Oddcast.  Click on the Peak Meter and set the volume level appropriately so you're not clipping.

Now you can connect to the Shoutcast server with your favorite streaming client.  If this stuff is running on IP address 192.168.0.100 and the Shoutcast server port is 8000, you can just connect to http://192.168.0.100:8000 with your streaming client (in my case, a Roku Soundbridge). 

You should now be hearing music, but with no good metadata.  This is where it starts getting more tricky.  You need some way to get the metadata into the stream.  I use xpTunes to control MC remotely via a web browser, but I think it's still in beta.  One feature of xpTunes is that it can dynamically update a web page with info about the currently-playing track.  I set up a very simple webpage which just reports the track title, artist, album, and track #.  Click on "Edit" next to Metadata in Oddcast, then select the URL radio button and type in the url of the xpTunes webpage (in my case, http://192.168.0.100/miniplaying.html, but you can set this up however you like).

Oddcast can scrape the metadata from any file or a window title, so there are probably other ways to get the metadata in.

So now I can listen to whatever my Media Center PC (a headless server in the basement) is playing on its audio card through my Roku Soundbridge.  The Soundbridge shows the relevant metadata.  I can manage the playlist from my laptop in xpTunes, or just let MC play in Radio Mode.

You may be asking, why go to all this trouble?  Why not just move the dang PC that's running Media Center upstairs and put it next to the stereo?  That's a good question.  The answer is that I don't want the dang PC and its necessary infrastructure next to the stereo.  It sits downstairs out of the way, usually hooked up to an FM transmitter.  That way I can play the same music anywhere in the house during a party, with no annoying lag between zones.  Allright, you say, but if I'm using an FM transmitter, why the Soundbridge nonsense?  Also a good question.  Two answers.  First, the FM transmitter sounds lousy.  It's fine for a party but not if I want to actually listen to music.  Second, I can still stream this to the Roku during a party, and it will show me what the FM transmitter is playing (even if I'm not actually listening to the Roku stream, but listening to the FM instead). 

Good luck!  Once this is all done, you can just connect with any streaming media player and listen away!  The downside is that you'll hear whatever is playing on the PC running MC/Oddcast/Shoutcast.  Not a problem for me because it's a dedicated media server PC.  But something to keep in mind if you set this up on a multi-use machine. 
Logged

)p(

  • Citizen of the Universe
  • *****
  • Posts: 579
Re: HOW-TO: Streaming from MC, including metadata
« Reply #1 on: February 16, 2008, 12:48:35 pm »

Why don't you not use mc's upnp server with the roku?

peter
Logged

Shasta Mcnasty

  • Junior Woodchuck
  • **
  • Posts: 54
Re: HOW-TO: Streaming from MC, including metadata
« Reply #2 on: February 16, 2008, 01:56:03 pm »

I do that also, actually that gives better sound quality than streaming to the Roku or listening to the FM transmitter.  If I want to just play a canned playlist, that's the way I do it. 

But the Roku control interface is pretty limited, while controlling MC directly and streaming the result to the Roku is a lot more powerful.  Even the xpTunes web interface to MC can do a lot more, a lot easier, than the Roku remote and 2-line screen.  Playing a specific album/artist/track/whatever is more annoying to do directly from the Roku remote than from MC/xpTunes. 

I have tried some of the other 3rd party software for the Roku that lets me control it directly from a PC, while still using the MC uPnP server to provide the library.  Those work well also, but still not as well as MC/xpTunes.  The best one that I have found is VisualMR: http://www.tl-it.de/media/pages/visualmr.php

Additionally, it's easier for my wife to use the Roku iin streaming mode.  Using the uPnP server requires navigating some menus to select what you want the Roku to play.  But if you turn the Roku off in streaming mode, when you turn it back on again it automatically re-connects to the stream and starts playing without any user intervention. 

In short, I really like how convenient it is to have the Roku display what's playing.  I dislike how (relatively) inconvenient it is to control what's playing through the Roku remote control.  I also like playing with stuff to figure out "off label" uses.  I knew the Roku could play streaming media and I wanted to see if there was any way to do that with MC. ;)  Turns out there is.  I saw some other people asking about using MC to stream music, so I thought I'd share my approach. 



Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: HOW-TO: Streaming from MC, including metadata
« Reply #3 on: February 16, 2008, 02:40:44 pm »

I have explained Oddcast/Shoutcast/MC setup in this old thread:
http://yabb.jriver.com/interact/index.php?topic=28560.0

You configuration is quite similar, except that I don't use/need metadata and I use PCs as clients.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

)p(

  • Citizen of the Universe
  • *****
  • Posts: 579
Re: HOW-TO: Streaming from MC, including metadata
« Reply #4 on: February 16, 2008, 04:00:35 pm »



In short, I really like how convenient it is to have the Roku display what's playing.  I dislike how (relatively) inconvenient it is to control what's playing through the Roku remote control.  I also like playing with stuff to figure out "off label" uses.  I knew the Roku could play streaming media and I wanted to see if there was any way to do that with MC. ;)  Turns out there is.  I saw some other people asking about using MC to stream music, so I thought I'd share my approach. 





Thanks for the explanation, I think I understand now why you went this route. I was just curious. I am not yet using mc for music, but I try to get an idea what is possible.

peter
Logged

Shasta Mcnasty

  • Junior Woodchuck
  • **
  • Posts: 54
Re: HOW-TO: Streaming from MC, including metadata
« Reply #5 on: February 16, 2008, 04:36:48 pm »

I have explained Oddcast/Shoutcast/MC setup in this old thread:
http://yabb.jriver.com/interact/index.php?topic=28560.0

You configuration is quite similar, except that I don't use/need metadata and I use PCs as clients.

Wish I had known about that thread yesterday  ::)

I did some searching here for exactly this type of info, but somehow missed your very detailed post. 
Logged

adamsp70

  • Regular Member
  • World Citizen
  • ***
  • Posts: 247
  • Unwired for sound...
Re: HOW-TO: Streaming from MC, including metadata
« Reply #6 on: March 28, 2008, 05:46:15 am »

Excellent posts from Shasta and Alex - saved me a lot of time, thanks!

Shasta - what is the format of your "miniplaying.html" for xpTunes?

Alex - I have MC acting as a streaming client like you. If I stop whatever is playing on the server and leave the client still playing that stream (albeit silence) i was hoping that starting the server playing again the next day would make the client play music without having to touch anything, but all i get is silence. Do you have this too, or have you got a workaround?

Many thanks....
   Paul
Logged

Shasta Mcnasty

  • Junior Woodchuck
  • **
  • Posts: 54
Re: HOW-TO: Streaming from MC, including metadata
« Reply #7 on: April 01, 2008, 08:23:43 am »

I'm at work now and my PC is at home, but I think the format was something simple like

XPTUNES_CURRENTFILE_NAME - XPTUNES_CURRENTFILE_ARTIST - XPTUNES_CURRENTFILE_ALBUM

No other HTML directives (no <HEAD>, <BODY>, etc.), just that single line above in miniplaying.html. 
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: HOW-TO: Streaming from MC, including metadata
« Reply #8 on: April 01, 2008, 09:42:26 am »

Alex - I have MC acting as a streaming client like you. If I stop whatever is playing on the server and leave the client still playing that stream (albeit silence) i was hoping that starting the server playing again the next day would make the client play music without having to touch anything, but all i get is silence. Do you have this too, or have you got a workaround?

Perhaps one of the involved components starts a new stream when playback is restarted. The player program on the receiving PC probably detects that the stream is interrupted and playback needs to be restarted.

My setup seems to be able to survice short "stop" periods, but I have not tried to keep the connection alive longer than a few minutes.

Couldn't you restart playback remotely if the receiving PC cannot be controlled directly?
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

flik242

  • Recent member
  • *
  • Posts: 5
Re: HOW-TO: Streaming from MC, including metadata
« Reply #9 on: April 02, 2010, 05:24:30 am »

I'm having troubles with Oddcast/Edcast - it just doesn't "hear" the audio stream from the MC. I tried to toggle between several output  formats in MC (Wave Out, WASAPI, ASIO) with the same result. Could anybody tell me the settings that do work? I'm using MC'14, edcast and Realtek HD Audio sound card.
Logged

LeoKurz

  • Recent member
  • *
  • Posts: 13
Re: HOW-TO: Streaming from MC, including metadata
« Reply #10 on: August 12, 2010, 01:09:08 am »

Hello,

any chance to have this function integrated in MC? I think this can only be a work around...

__Leo
Logged
Pages: [1]   Go Up