Internet Radio

From LinuxMCE
Jump to: navigation, search
Version Status Date Updated Updated By
710 Working 13th Oct 2010 cht_winston
810 Working 23rd June 2010 Metoer
1004 Working 14th Oct 2011 sambuca
1204 Unknown N/A N/A
Usage Information


1004

Overview

The Radio scenario is added automatically and lists audio streams by genre.

How to use

To add streams to the database, go to the Web Admin -> Files & Media -> Media Browser. In the left section, you will find a "Add new" link. Clicking on this will open the normal file view screen in the right pane, and allow you to add a new file. (This can be any file, it does not have to be a stream).

If you are adding an audio stream, be sure to set the type to "LinuxMCE streamed Audio". Enter the URL into the file input box and press 'add' to save it. Then the saved item appears. Add at least one genre and one channel name attribute. Those attributes are expected by LinuxMCE and should always be added. The path field is not used.

When going to a orbiter, you should now see all genres containing any streamed audio items. Selecting a genre will list all channels in that genre. Selecting a channel will open the file detail screen and allows you to press play to play the stream.

As of 2012-02-22, Xine_Player also supports playing playlist URLs directly.


Radio alarm

If you wish to use to use a radio stream as a radio alarm, do the following:

  • Under "Timed Events" in web admin, add a new "Day of week based" event and edit it.
  • Choose a time and days etc.
  • Add a "Media Plug-in" and choose the "MH Play Media" command.
  • Then fill out:
    • '#13 Filename (string)
    • '#45 PK_EntertainArea (string)
    • '#29 PK_MediaType (int)

Where...

Hint: If you don't know what the EntertainArea ID is, on the core...

sudo su <ENTER>
mysql -u root -p pluto_main <ENTER>
mysql> SELECT PK_EntertainArea, Description FROM EntertainArea; <ENTER>

Make a note of the ID, and then...

mqsql> quit <ENTER>


Top tip: You can also set the volume level with the "MH Set Volume" command (otherwise it will simply play at the volume level you left it on). Place the command immediately after the radio stream - the volume will only be set if something is already playing (it is not necessary to add a delay).




Older releases (810/710)

Older releases does not have any direct support for the Internet Radio station list. However, you can create the scenario shortcut to quick-start your favorite station.

Here is a link to a page with a few stations that you can choose from, I tried a couple and they all seemed to work with this wiki. http://slhungary.hu/print.php?plugin:content.40


  • Go to LinuxMCE Admin Website --> Advanced --> Configuration --> Scenarios --> Media Scenarios" and press "Add My Scenario" button.
  • Under "Add My Scenario" type a description, like "DI - Lounge". Check in which room you want this scenario to appear. Press "Save".
  • Click on the description of the scenario that you've just added.
  • In "Scenario commands" select "Media Plug-in" from the "Device:" drop-down and "MH Play Media" from the "Command:" drop-down. Press the "Add" button.
  1. In the "#13 Filename (string)" field type the URL of your online radio station ( e.g.: http://scfire-chi0l-1.stream.aol.com/stream/1009 ).
  2. In the "#29 PK_MediaType (int)" type 4.
  3. In the "#45 PK_EntertainArea (string)" put the number of the Entertaining Area (it usually starts from 1, see the note below). Press the "Save" button and the "Test Command" to see if it works.
  • Do a Quick Reload & Regen and you'll be able to see you radio on the media menu of your Orbiter. Click on the button and it should start playing.



Where to Find Compatible Internet Radio Stations

If you're in the U.S. like me, you'll probably have a hard time finding "direct URLs" that you can create scenarios with that are compatible with LMCE. Like many of you, I wanted to use ShoutCast stations, however, ShoutCast has changed their webpage in such a way that it will open up it's own propreitary plug-in that doesn't provide you with the actual station's direct URL. Useless, if you want to create a new station scenario in LMCE.

I recommend doing the following:

1. Download WinAmp onto a Windows Box

2. Open up WinAmp and browse to your favorite Station (I use shoutcast stations)

3. Right click on the Winamp window where it lists what you're currently listening to

4. Click "View File Info"

5. This will provide the direct URL link you'll need to include in the steps below when you're creating your stations.

  • I hope this helps... I had a hard time finding useful information on where to go to actually get "legitimate" direct URLs for Internet Radio Stations.



Notes and troubleshooting

  • The media type "4" corresponds to a workaround, MEDIATYPE_pluto_StoredAudio_CONST. When all stuff eventually works, it will be changed to the "6" (MEDIATYPE_pluto_LiveRadio_CONST)
  • If radio station playback doesn't start - try playing it a couple times more. There is an issue in xine-lib which sometimes causes it to fail the first time.
  • Be sure not to put the URL of the playlist in "#13 Filename" parameter - it should be the URL of the station itself. Playlist URLs usually end with ".m3u" and ".pls". Download the playlist and get the URL of station from it (there can be many entries, each representing a mirror).
  • If you have issues identifying your Entertainment Area ID, you can query the DB directly:
  • At the terminal, start the mysql commandline:
mysql -u root -p pluto_main <enter>
then issue the following query
mysql> SELECT PK_EntertainArea, Description FROM EntertainArea;
  • Select the ID of the desired area from the list:
+------------------+------------------+
| PK_EntertainArea | Description      |
+------------------+------------------+
|                1 | Bedroom (Master) |
+------------------+------------------+
1 row in set (0.00 sec)
type 'quit' to exit:
mysql> quit <enter>